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 /engines/xeen/dialogs | |
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
Diffstat (limited to 'engines/xeen/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 |
3 files changed, 12 insertions, 2 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: |