summaryrefslogtreecommitdiff
path: root/src/scenes/sceneManager.c
diff options
context:
space:
mode:
authorPhysick <96335032+DegustatorPonos@users.noreply.github.com>2026-09-03 01:54:55 +0500
committerPhysick <96335032+DegustatorPonos@users.noreply.github.com>2026-09-03 01:54:55 +0500
commit2f811f69c13c3ad9b05d15e6510192a7dde95c71 (patch)
treef65eda3ceef69243de609560c24538e9bf38c7b1 /src/scenes/sceneManager.c
parentda295397942073453ed9f82cc88dafd083d4c782 (diff)
scene reopen API
Diffstat (limited to 'src/scenes/sceneManager.c')
-rw-r--r--src/scenes/sceneManager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/scenes/sceneManager.c b/src/scenes/sceneManager.c
index e5ab397..f500972 100644
--- a/src/scenes/sceneManager.c
+++ b/src/scenes/sceneManager.c
@@ -34,8 +34,15 @@ bool AddScene(Scene *newScene) {
void DeleteSceneFromStack() {
Scene *currentScene = getCurrentScene();
if (currentScene == NULL) return;
+ PopUpState currentSceneState = POPUP_ACTIVE;
+ if (currentScene != NULL)
+ currentSceneState = currentScene->GetCurrentState(currentScene);
currentScene->Deint(currentScene);
sceneStack[--sceneStackDepth] = NULL;
+
+ Scene *prevoiusScene = getCurrentScene();
+ if (prevoiusScene == NULL || prevoiusScene->Reopen == NULL) return;
+ prevoiusScene->Reopen(prevoiusScene, currentSceneState);
}
bool DrawScene() {