diff options
author | Paul Gilbert | 2018-07-04 21:58:15 -0700 |
---|---|---|
committer | Paul Gilbert | 2018-07-04 21:58:15 -0700 |
commit | c2854a83182b5d474b72ffd9d0c17d0b99c2218a (patch) | |
tree | 831790a85f01c285acf216a550f4b1a08f778890 | |
parent | 52f110325c440cad4f752925ddd07b19cf242e44 (diff) | |
download | scummvm-rg350-c2854a83182b5d474b72ffd9d0c17d0b99c2218a.tar.gz scummvm-rg350-c2854a83182b5d474b72ffd9d0c17d0b99c2218a.tar.bz2 scummvm-rg350-c2854a83182b5d474b72ffd9d0c17d0b99c2218a.zip |
XEEN: Fix using mouse click to close message dialogs
-rw-r--r-- | engines/xeen/dialogs/dialogs.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs.h | 6 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_message.h | 4 | ||||
-rw-r--r-- | engines/xeen/interface.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/locations.h | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/engines/xeen/dialogs/dialogs.cpp b/engines/xeen/dialogs/dialogs.cpp index d5c732e51a..88fed8dfd5 100644 --- a/engines/xeen/dialogs/dialogs.cpp +++ b/engines/xeen/dialogs/dialogs.cpp @@ -185,6 +185,10 @@ void ButtonContainer::loadStrings(const Common::String &name, int ccMode) { f.close(); } +void ButtonContainer::setWaitBounds() { + _waitBounds = Common::Rect(8, 8, 224, 140); +} + /*------------------------------------------------------------------------*/ void SettingsBaseDialog::showContents(SpriteResource &title1, bool waitFlag) { diff --git a/engines/xeen/dialogs/dialogs.h b/engines/xeen/dialogs/dialogs.h index e97e46c5d3..2350bb8392 100644 --- a/engines/xeen/dialogs/dialogs.h +++ b/engines/xeen/dialogs/dialogs.h @@ -102,6 +102,12 @@ protected: * @param ccMode Optional cc file number to explicitly use */ void loadStrings(const Common::String &name, int ccMode); + + /** + * Sets the wait bounds, the area where clicking with the mouse generates + * the equivalent of a space bar press, to the main interface area + */ + void setWaitBounds(); public: ButtonContainer(XeenEngine *vm) : Cutscenes(vm), _buttonValue(0) {} diff --git a/engines/xeen/dialogs/dialogs_message.h b/engines/xeen/dialogs/dialogs_message.h index 95d942858c..6555ac4c87 100644 --- a/engines/xeen/dialogs/dialogs_message.h +++ b/engines/xeen/dialogs/dialogs_message.h @@ -33,7 +33,7 @@ enum MessageWaitType { WT_FREEZE_WAIT = 0, WT_NONFREEZED_WAIT = 1, class MessageDialog : public ButtonContainer { private: - MessageDialog(XeenEngine *vm) : ButtonContainer(vm) {} + MessageDialog(XeenEngine *vm) : ButtonContainer(vm) { setWaitBounds(); } void execute(const Common::String &msg, MessageWaitType waitType); public: @@ -49,7 +49,7 @@ public: class CantCast: public ButtonContainer { private: - CantCast(XeenEngine *vm) : ButtonContainer(vm) {} + CantCast(XeenEngine *vm) : ButtonContainer(vm) { setWaitBounds(); } void execute(int spellId, int componentNum); public: diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 82a2cbd7d1..63c0483c73 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -163,7 +163,7 @@ Interface::Interface(XeenEngine *vm) : ButtonContainer(vm), InterfaceScene(vm), _upDoorText = false; _tillMove = 0; Common::fill(&_charFX[0], &_charFX[MAX_ACTIVE_PARTY], 0); - _waitBounds = Common::Rect(8, 8, 224, 140); + setWaitBounds(); } void Interface::setup() { diff --git a/engines/xeen/locations.h b/engines/xeen/locations.h index ad0a8e2cee..ac9a75b75b 100644 --- a/engines/xeen/locations.h +++ b/engines/xeen/locations.h @@ -344,7 +344,7 @@ class LocationMessage : public Locations::BaseLocation { private: SpriteResource _iconSprites; - LocationMessage() : Locations::BaseLocation(NO_ACTION) {} + LocationMessage() : Locations::BaseLocation(NO_ACTION) { setWaitBounds(); } bool execute(int portrait, const Common::String &name, const Common::String &text, int confirm); |