From ffc24d4e7d87497e929b3719978260288eb333c7 Mon Sep 17 00:00:00 2001 From: zilmar Date: Tue, 23 Apr 2019 07:01:10 +0930 Subject: [PATCH] Fix up DisplayMessage for android --- Source/Android/Bridge/NotificationClass.cpp | 17 +++++++++++++++++ Source/Android/Bridge/NotificationClass.h | 3 +++ 2 files changed, 20 insertions(+) diff --git a/Source/Android/Bridge/NotificationClass.cpp b/Source/Android/Bridge/NotificationClass.cpp index 90a8662c8..f777b11ff 100644 --- a/Source/Android/Bridge/NotificationClass.cpp +++ b/Source/Android/Bridge/NotificationClass.cpp @@ -72,6 +72,23 @@ void CNotificationImp::FatalError(const char * Message) const } } +void CNotificationImp::DisplayWarning(const char * Message) const +{ +#ifdef ANDROID + g_JavaBridge->DisplayError(Message); +#else + Message = NULL; // not used +#endif +} + +void CNotificationImp::DisplayWarning(LanguageStringID StringID) const +{ + if (g_Lang) + { + DisplayError(g_Lang->GetString(StringID).c_str()); + } +} + void CNotificationImp::DisplayMessage(int DisplayTime, LanguageStringID StringID) const { DisplayMessage(DisplayTime, g_Lang->GetString(StringID).c_str()); diff --git a/Source/Android/Bridge/NotificationClass.h b/Source/Android/Bridge/NotificationClass.h index f51b51584..09a19ff29 100644 --- a/Source/Android/Bridge/NotificationClass.h +++ b/Source/Android/Bridge/NotificationClass.h @@ -27,6 +27,9 @@ public: void FatalError(LanguageStringID StringID) const; //User Feedback + void DisplayWarning(const char * Message) const; + void DisplayWarning(LanguageStringID StringID) const; + void DisplayMessage(int DisplayTime, const char * Message) const; void DisplayMessage(int DisplayTime, LanguageStringID StringID) const;