diff options
Diffstat (limited to 'engines/sci/gui')
-rw-r--r-- | engines/sci/gui/gui.cpp | 10 | ||||
-rw-r--r-- | engines/sci/gui/gui.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index 48f99ffa51..93a40bb378 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -844,6 +844,16 @@ void SciGui::addScreenItem(reg_t object) { _screenItemCount++; } +void SciGui::deleteScreenItem(reg_t object) { + for (int itemNr = 0; itemNr < _screenItemCount; itemNr++) { + if (_screenItems[itemNr] == object) { + _screenItems.remove_at(itemNr); + _screenItemCount--; + return; + } + } +} + void SciGui::frameOut() { for (int itemNr = 0; itemNr < _screenItemCount; itemNr++) { reg_t viewObj = _screenItems[itemNr]; diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h index 2017c1b1fe..a81e61d7e9 100644 --- a/engines/sci/gui/gui.h +++ b/engines/sci/gui/gui.h @@ -155,6 +155,7 @@ public: // SCI32 virtual void addScreenItem(reg_t object); + virtual void deleteScreenItem(reg_t object); virtual void frameOut(); virtual bool debugUndither(bool flag); |