ScummVM API documentation
worldofxeen_menu.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef XEEN_WORLDOFXEEN_WORLDOFXEEN_MENU_H
23 #define XEEN_WORLDOFXEEN_WORLDOFXEEN_MENU_H
24 
25 #include "mm/xeen/xeen.h"
26 #include "mm/xeen/dialogs/dialogs.h"
27 #include "common/array.h"
28 
29 namespace MM {
30 namespace Xeen {
31 namespace WorldOfXeen {
32 
33 class MenuContainerDialog;
34 
36 private:
37  uint _animateCtr;
38  uint _frameCount;
39  Common::Array<SpriteResource> _backgroundSprites;
40  MenuContainerDialog *_dialog;
41 protected:
45  void draw();
46 
50  virtual void display() = 0;
51 
55  virtual void showMenuDialog() = 0;
56 public:
60  static void show();
61 public:
65  MainMenuContainer(const char *spritesName1, const char *spritesName2 = nullptr, const char *spritesName3 = nullptr);
66 
70  virtual ~MainMenuContainer();
71 
75  void execute();
76 
80  void setOwner(MenuContainerDialog *dlalog) {
81  _dialog = dlalog;
82  }
83 };
84 
86 protected:
90  void display() override;
91 
95  void showMenuDialog() override;
96 public:
98 };
99 
101 private:
102  SpriteResource _background;
103 protected:
107  void display() override;
108 
112  void showMenuDialog() override;
113 public:
115 };
116 
118 protected:
122  void display() override;
123 
127  void showMenuDialog() override;
128 public:
130 };
131 
133 protected:
137  void display() override;
138 
142  void showMenuDialog() override;
143 public:
145 };
146 
148 protected:
149  MainMenuContainer *_owner;
150 public:
154  MenuContainerDialog(MainMenuContainer *owner) : ButtonContainer(g_vm), _owner(owner) {}
155 
159  ~MenuContainerDialog() override {
160  _owner->setOwner(nullptr);
161  }
162 
166  virtual void draw() = 0;
167 
171  virtual bool handleEvents() = 0;
172 };
173 
175 public:
180 
184  ~MainMenuDialog() override {}
185 
189  void draw() override = 0;
190 
194  bool handleEvents() override;
195 
196 };
197 
199 private:
200  SpriteResource _buttonSprites;
201 private:
205  void loadButtons();
206 public:
211 
215  ~CloudsMenuDialog() override;
216 
220  void draw() override;
221 
225  bool handleEvents() override;
226 };
227 
229 private:
230  SpriteResource _buttonSprites;
231  bool _firstDraw;
232 private:
236  void loadButtons();
237 public:
242 
246  ~DarkSideMenuDialog() override;
247 
251  void draw() override;
252 
256  bool handleEvents() override;
257 };
258 
260 private:
261  SpriteResource _buttonSprites;
262 private:
266  void loadButtons();
267 public:
272 
276  ~WorldMenuDialog() override;
277 
281  void draw() override;
282 
286  bool handleEvents() override;
287 };
288 
290 private:
291  SpriteResource _buttonSprites;
292 private:
296  void loadButtons();
297 public:
302 
306  ~OtherOptionsDialog() override;
307 
311  void draw() override;
312 
316  bool handleEvents() override;
317 };
318 
319 } // End of namespace WorldOfXeen
320 } // End of namespace Xeen
321 } // End of namespace MM
322 
323 #endif
MainMenuDialog(MainMenuContainer *owner)
Definition: worldofxeen_menu.h:179
Definition: worldofxeen_menu.h:259
Definition: worldofxeen_menu.h:228
Definition: worldofxeen_menu.h:147
~MainMenuDialog() override
Definition: worldofxeen_menu.h:184
Definition: worldofxeen_menu.h:117
Definition: worldofxeen_menu.h:174
Definition: array.h:52
Definition: worldofxeen_menu.h:100
Definition: sprites.h:52
MainMenuContainer(const char *spritesName1, const char *spritesName2=nullptr, const char *spritesName3=nullptr)
Definition: worldofxeen_menu.h:85
~MenuContainerDialog() override
Definition: worldofxeen_menu.h:159
Definition: worldofxeen_menu.h:198
Definition: detection.h:27
Definition: worldofxeen_menu.h:35
Definition: dialogs.h:74
void setOwner(MenuContainerDialog *dlalog)
Definition: worldofxeen_menu.h:80
Definition: worldofxeen_menu.h:289
MenuContainerDialog(MainMenuContainer *owner)
Definition: worldofxeen_menu.h:154