diff options
author | Paul Gilbert | 2013-11-24 16:59:44 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-11-24 16:59:44 -0500 |
commit | c26ed6505f4a3c12c082473a1ebaaabd32d40a88 (patch) | |
tree | c9298cf61976f89aff563f7d68ff91e514577aa9 /engines | |
parent | bd8f260d9b128ba03131c7002d8dcf750765f208 (diff) | |
download | scummvm-rg350-c26ed6505f4a3c12c082473a1ebaaabd32d40a88.tar.gz scummvm-rg350-c26ed6505f4a3c12c082473a1ebaaabd32d40a88.tar.bz2 scummvm-rg350-c26ed6505f4a3c12c082473a1ebaaabd32d40a88.zip |
TSAGE: Fixes for R2R right click dialog choosing cursor or help/player dialog
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_dialogs.cpp | 15 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_dialogs.h | 3 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 7 |
3 files changed, 17 insertions, 8 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp index 12147f7ee5..a0675bc292 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp +++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp @@ -50,6 +50,7 @@ RightClickDialog::RightClickDialog() : GfxDialog() { _btnList[5] = Common::Point(83, 47); // Set the palette and change the cursor + _previousCursor = R2_GLOBALS._events.getCursor(); R2_GLOBALS._events.setCursor(CURSOR_ARROW); setPalette(); @@ -136,7 +137,7 @@ bool RightClickDialog::process(Event &event) { return false; } -void RightClickDialog::execute() { +int RightClickDialog::execute() { // Draw the dialog draw(); @@ -157,7 +158,8 @@ void RightClickDialog::execute() { } // Execute the specified action - CursorType cursorNum = CURSOR_NONE; + CursorType cursorNum = _previousCursor; + int result = -1; switch (_selectedAction) { case 0: // Look action @@ -177,17 +179,18 @@ void RightClickDialog::execute() { break; case 4: // Change player - CharacterDialog::show(); + result = 0; break; case 5: // Options dialog + result = 1; break; } - if (cursorNum != CURSOR_NONE) - R2_GLOBALS._events.setCursor(cursorNum); - + R2_GLOBALS._events.setCursor(cursorNum); _gfxManager.deactivate(); + + return result; } /*--------------------------------------------------------------------------*/ diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.h b/engines/tsage/ringworld2/ringworld2_dialogs.h index 02a1aed81c..0c19ae4371 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.h +++ b/engines/tsage/ringworld2/ringworld2_dialogs.h @@ -50,13 +50,14 @@ private: int _highlightedAction; int _selectedAction; + CursorType _previousCursor; public: RightClickDialog(); ~RightClickDialog(); virtual void draw(); virtual bool process(Event &event); - void execute(); + int execute(); }; class CharacterDialog: public GfxDialog { diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index e735f4ffb1..92d4770930 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -1238,8 +1238,13 @@ void Ringworld2Game::processEvent(Event &event) { void Ringworld2Game::rightClick() { RightClickDialog *dlg = new RightClickDialog(); - dlg->execute(); + int option = dlg->execute(); delete dlg; + + if (option == 0) + CharacterDialog::show(); + else if (option == 1) + HelpDialog::show(); } /*--------------------------------------------------------------------------*/ |