diff options
author | Paul Gilbert | 2014-12-31 11:12:18 -1000 |
---|---|---|
committer | Paul Gilbert | 2014-12-31 11:12:18 -1000 |
commit | 5c88d2cc42d9b6124f552464b9c02e800f3956df (patch) | |
tree | 8e29758709f81b2bdb431b7e691d81eea79e0642 /engines/xeen/menus.h | |
parent | 9506635bad402d58886cc9a47512871b321a10a2 (diff) | |
download | scummvm-rg350-5c88d2cc42d9b6124f552464b9c02e800f3956df.tar.gz scummvm-rg350-5c88d2cc42d9b6124f552464b9c02e800f3956df.tar.bz2 scummvm-rg350-5c88d2cc42d9b6124f552464b9c02e800f3956df.zip |
XEEN: Implement window framing code and dialog event handling
Diffstat (limited to 'engines/xeen/menus.h')
-rw-r--r-- | engines/xeen/menus.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/engines/xeen/menus.h b/engines/xeen/menus.h index 774c7cfcb9..07a7bb7e8d 100644 --- a/engines/xeen/menus.h +++ b/engines/xeen/menus.h @@ -45,14 +45,17 @@ public: class Dialog { private: - Common::Array<DialogButton> _buttons; Common::Stack< Common::Array<DialogButton> > _savedButtons; protected: XeenEngine *_vm; + Common::Array<DialogButton> _buttons; + char _key; virtual void doScroll(bool drawFlag, bool doFade) = 0; + + void checkEvents(); public: - Dialog(XeenEngine *vm): _vm(vm) {} + Dialog(XeenEngine *vm): _vm(vm), _key('\0') {} void saveButtons(); @@ -63,17 +66,23 @@ public: void addButton(const Common::Rect &bounds, char c, SpriteResource *sprites, bool d); }; -class OptionsMenu: public Dialog { +class SettingsBaseDialog : public Dialog { +protected: + virtual void showContents(SpriteResource &title1, bool mode); +public: + SettingsBaseDialog(XeenEngine *vm) : Dialog(vm) {} +}; +class OptionsMenu : public SettingsBaseDialog { private: void execute(); protected: - OptionsMenu(XeenEngine *vm) : Dialog(vm) {} + OptionsMenu(XeenEngine *vm) : SettingsBaseDialog(vm) {} protected: virtual void startup(Common::String &title1, Common::String &title2); virtual void setBackground() {} - virtual void showTitles1(const Common::String &title); + virtual void showTitles1(SpriteResource &sprites); virtual void showTitles2(); @@ -103,6 +112,8 @@ public: }; class WorldOptionsMenu : public DarkSideOptionsMenu { +private: + int _bgFrame; protected: virtual void startup(Common::String &title1, Common::String &title2); @@ -113,8 +124,10 @@ protected: virtual void setupButtons(SpriteResource *buttons); virtual void openWindow(); + + virtual void showContents(SpriteResource &title1, bool mode); public: - WorldOptionsMenu(XeenEngine *vm) : DarkSideOptionsMenu(vm) {} + WorldOptionsMenu(XeenEngine *vm) : DarkSideOptionsMenu(vm), _bgFrame(0) {} }; } // End of namespace Xeen |