From 2e4fc11320b90db0485a937ec14b3464f3195e0a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 21 Sep 2016 07:26:24 -0400 Subject: XEEN: Refactored doScroll to have it available to cutscenes --- engines/xeen/dialogs.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'engines/xeen/dialogs.h') diff --git a/engines/xeen/dialogs.h b/engines/xeen/dialogs.h index 51eafa5f54..93e9a86685 100644 --- a/engines/xeen/dialogs.h +++ b/engines/xeen/dialogs.h @@ -26,6 +26,7 @@ #include "common/array.h" #include "common/stack.h" #include "common/rect.h" +#include "xeen/cutscenes.h" #include "xeen/sprites.h" #include "xeen/xsurface.h" @@ -46,21 +47,21 @@ public: UIButton() : _value(0), _sprites(nullptr), _draw(false) {} }; -class ButtonContainer { +class ButtonContainer : public Cutscenes { private: Common::Stack< Common::Array > _savedButtons; protected: Common::Array _buttons; int _buttonValue; + bool checkEvents(XeenEngine *vm); + /** * Draws the scroll in the background */ - void doScroll(XeenEngine *vm, bool drawFlag, bool doFade); - - bool checkEvents(XeenEngine *vm); + virtual void doScroll(bool drawFlag, bool doFade); public: - ButtonContainer() : _buttonValue(0) {} + ButtonContainer(XeenEngine *vm) : Cutscenes(vm), _buttonValue(0) {} /** * Saves the current list of buttons @@ -85,20 +86,16 @@ public: class SettingsBaseDialog : public ButtonContainer { protected: - XeenEngine *_vm; - virtual void showContents(SpriteResource &title1, bool mode); public: - SettingsBaseDialog(XeenEngine *vm) : ButtonContainer(), _vm(vm) {} + SettingsBaseDialog(XeenEngine *vm) : ButtonContainer(vm) {} virtual ~SettingsBaseDialog() {} }; class CreditsScreen: public ButtonContainer { private: - XeenEngine *_vm; - - CreditsScreen(XeenEngine *vm) : ButtonContainer(), _vm(vm) {} + CreditsScreen(XeenEngine *vm) : ButtonContainer(vm) {} void execute(); public: -- cgit v1.2.3