diff options
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 15 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index b5465e7c40..87f1614389 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -681,6 +681,21 @@ void SceneExt::postInit(SceneObjectList *OwnerList) { } } +void SceneExt::remove() { + BF_GLOBALS._uiElements.hide(); + BF_GLOBALS._uiElements.resetClear(); + + // Below code originally in Blue Force Scene::remove(). Placed here to avoid contaminating + // core class with Blue Force specific code + if (_action) { + if (_action->_endHandler) + _action->_endHandler = NULL; + _action->remove(); + } + + _focusObject = NULL; +} + void SceneExt::process(Event &event) { _objArray2.process(event); if (!event.handled) diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h index dcaea52444..a39e19ae3d 100644 --- a/engines/tsage/blue_force/blueforce_logic.h +++ b/engines/tsage/blue_force/blueforce_logic.h @@ -211,6 +211,7 @@ public: virtual Common::String getClassName() { return "SceneExt"; } virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void remove(); virtual void process(Event &event); virtual void dispatch(); virtual void loadScene(int sceneNum); |