summaryrefslogtreecommitdiff
path: root/src/scenes/sceneManager.c
diff options
context:
space:
mode:
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() {