-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "mh_z19_scene.h" | ||
|
||
// Array of on_enter handlers | ||
AppSceneOnEnterCallback mh_z19_scene_on_enter_handlers[MhZ19AppSceneCount] = { | ||
mh_z19_scene_setup_on_enter, | ||
mh_z19_scene_main_on_enter, | ||
mh_z19_scene_menu_on_enter}; | ||
|
||
// Array of on_event handlers | ||
AppSceneOnEventCallback mh_z19_scene_on_event_handlers[MhZ19AppSceneCount] = { | ||
mh_z19_scene_setup_on_event, | ||
mh_z19_scene_main_on_event, | ||
mh_z19_scene_menu_on_event}; | ||
|
||
// Array of on_exit handlers | ||
AppSceneOnExitCallback mh_z19_scene_on_exit_handlers[MhZ19AppSceneCount] = { | ||
mh_z19_scene_setup_on_exit, | ||
mh_z19_scene_main_on_exit, | ||
mh_z19_scene_menu_on_exit}; | ||
|
||
const SceneManagerHandlers mh_z19_scene_handlers = { | ||
.on_enter_handlers = mh_z19_scene_on_enter_handlers, | ||
.on_event_handlers = mh_z19_scene_on_event_handlers, | ||
.on_exit_handlers = mh_z19_scene_on_exit_handlers, | ||
.scene_num = MhZ19AppSceneCount}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
#pragma once | ||
|
||
#include <gui/scene_manager.h> | ||
|
||
extern const SceneManagerHandlers mh_z19_scene_handlers; | ||
|
||
// For MhZ19AppSceneSetup | ||
void mh_z19_scene_setup_on_enter(void* context); | ||
bool mh_z19_scene_setup_on_event(void* context, SceneManagerEvent event); | ||
void mh_z19_scene_setup_on_exit(void* context); | ||
|
||
// For MhZ19AppSceneMain | ||
void mh_z19_scene_main_on_enter(void* context); | ||
bool mh_z19_scene_main_on_event(void* context, SceneManagerEvent event); | ||
void mh_z19_scene_main_on_exit(void* context); | ||
|
||
// For MhZ19AppSceneMenu | ||
void mh_z19_scene_menu_on_enter(void* context); | ||
bool mh_z19_scene_menu_on_event(void* context, SceneManagerEvent event); | ||
void mh_z19_scene_menu_on_exit(void* context); | ||
|
||
typedef enum MhZ19AppScene { | ||
MhZ19AppSceneSetup, | ||
MhZ19AppSceneMain, | ||
MhZ19AppSceneMenu, | ||
MhZ19AppSceneCount, | ||
} MhZ19AppScene; | ||
} MhZ19AppScene; |