diff options
author | volzhs <volzhs@gmail.com> | 2016-11-28 10:20:57 +0900 |
---|---|---|
committer | volzhs <volzhs@gmail.com> | 2016-11-28 10:20:57 +0900 |
commit | 9a20068ab7108357c78e9ac00eb90a3d72da7651 (patch) | |
tree | 4e5b22614c60b89d9bd797695315f072dfbc1d58 /platform/android/os_android.cpp | |
parent | cefb2de339b3da78bacb80241280987e2a1e2df8 (diff) |
Add alert window on Android
Diffstat (limited to 'platform/android/os_android.cpp')
-rw-r--r-- | platform/android/os_android.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 862709fc7d..3513e6fc04 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -246,9 +246,11 @@ void OS_Android::print(const char *p_format, ... ) { } -void OS_Android::alert(const String& p_alert) { +void OS_Android::alert(const String& p_alert,const String& p_title) { print("ALERT: %s\n",p_alert.utf8().get_data()); + if (alert_func) + alert_func(p_alert, p_title); } @@ -812,7 +814,7 @@ String OS_Android::get_joy_guid(int p_device) const { return input->get_joy_guid_remapped(p_device); } -OS_Android::OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func,GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient,GetUniqueIDFunc p_get_unique_id,GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, bool p_use_apk_expansion) { +OS_Android::OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func,GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient,GetUniqueIDFunc p_get_unique_id,GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion) { use_apk_expansion=p_use_apk_expansion; default_videomode.width=800; @@ -846,6 +848,7 @@ OS_Android::OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFu set_screen_orientation_func=p_screen_orient; set_keep_screen_on_func = p_set_keep_screen_on_func; + alert_func = p_alert_func; use_reload_hooks=false; } |