mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-26 14:27:14 +00:00
XEEN: Fix using mouse click to close message dialogs
This commit is contained in:
parent
52f110325c
commit
c2854a8318
@ -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) {
|
||||
|
@ -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) {}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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() {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user