diff options
Diffstat (limited to 'engines/pink')
-rw-r--r-- | engines/pink/pda_mgr.cpp | 8 | ||||
-rw-r--r-- | engines/pink/pda_mgr.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/engines/pink/pda_mgr.cpp b/engines/pink/pda_mgr.cpp index 8e8b6eca8b..60b51a4934 100644 --- a/engines/pink/pda_mgr.cpp +++ b/engines/pink/pda_mgr.cpp @@ -50,6 +50,12 @@ void PDAMgr::execute(const Command &command) { case Command::kGoToPage: goToPage(command.arg); break; + case Command::kGoToPreviousPage: { + assert(_previousPages.size() >= 2); + _previousPages.pop(); + goToPage(_previousPages.pop()); + break; + } case Command::kClose: close(); break; @@ -75,6 +81,8 @@ void PDAMgr::goToPage(const Common::String &pageName) { } _cursorMgr.setPage(_page); + + _previousPages.push(_page->getName()); } void PDAMgr::onLeftButtonClick(Common::Point point) { diff --git a/engines/pink/pda_mgr.h b/engines/pink/pda_mgr.h index 08c3d96b62..246679dee1 100644 --- a/engines/pink/pda_mgr.h +++ b/engines/pink/pda_mgr.h @@ -68,6 +68,7 @@ private: CursorMgr _cursorMgr; Array<Actor *> _globalActors; Common::String _savedPage; + Common::Stack<Common::String> _previousPages; }; } // End of namespace Pink |