mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 18:42:40 +08:00
dispatch show/hide event to js (#1424)
This commit is contained in:
@@ -101,6 +101,7 @@ void AppDelegate::applicationDidEnterBackground()
|
||||
struct CustomEvent event;
|
||||
event.name = EVENT_COME_TO_BACKGROUND;
|
||||
EventDispatcher::dispatchCustomEvent(&event);
|
||||
EventDispatcher::dispatchEnterBackgroundEvent();
|
||||
}
|
||||
|
||||
// this function will be called when the app is active again
|
||||
@@ -109,4 +110,5 @@ void AppDelegate::applicationWillEnterForeground()
|
||||
struct CustomEvent event;
|
||||
event.name = EVENT_COME_TO_FOREGROUND;
|
||||
EventDispatcher::dispatchCustomEvent(&event);
|
||||
EventDispatcher::dispatchEnterForegroundEvent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user