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:
151  bool _ttsVoiceText;
152 public:
156  MenuContainerDialog(MainMenuContainer *owner) : ButtonContainer(g_vm), _owner(owner), _ttsVoiceText(true) {}
157 
161  ~MenuContainerDialog() override {
162  _owner->setOwner(nullptr);
163  }
164 
168  virtual void draw() = 0;
169 
173  virtual bool handleEvents() = 0;
174 };
175 
177 public:
182 
186  ~MainMenuDialog() override {}
187 
191  void draw() override = 0;
192 
196  bool handleEvents() override;
197 
198 };
199 
201 private:
202  SpriteResource _buttonSprites;
203 private:
207  void loadButtons();
208 public:
213 
217  ~CloudsMenuDialog() override;
218 
222  void draw() override;
223 
227  bool handleEvents() override;
228 };
229 
231 private:
232  SpriteResource _buttonSprites;
233  bool _firstDraw;
234 private:
238  void loadButtons();
239 public:
244 
248  ~DarkSideMenuDialog() override;
249 
253  void draw() override;
254 
258  bool handleEvents() override;
259 };
260 
262 private:
263  SpriteResource _buttonSprites;
264 private:
268  void loadButtons();
269 public:
274 
278  ~WorldMenuDialog() override;
279 
283  void draw() override;
284 
288  bool handleEvents() override;
289 };
290 
292 private:
293  SpriteResource _buttonSprites;
294 private:
298  void loadButtons();
299 public:
304 
308  ~OtherOptionsDialog() override;
309 
313  void draw() override;
314 
318  bool handleEvents() override;
319 };
320 
321 } // End of namespace WorldOfXeen
322 } // End of namespace Xeen
323 } // End of namespace MM
324 
325 #endif
MainMenuDialog(MainMenuContainer *owner)
Definition: worldofxeen_menu.h:181
Definition: worldofxeen_menu.h:261
Definition: worldofxeen_menu.h:230
Definition: worldofxeen_menu.h:147
~MainMenuDialog() override
Definition: worldofxeen_menu.h:186
Definition: worldofxeen_menu.h:117
Definition: worldofxeen_menu.h:176
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:161
Definition: worldofxeen_menu.h:200
Definition: detection.h:27
Definition: worldofxeen_menu.h:35
Definition: dialogs.h:88
void setOwner(MenuContainerDialog *dlalog)
Definition: worldofxeen_menu.h:80
Definition: worldofxeen_menu.h:291
MenuContainerDialog(MainMenuContainer *owner)
Definition: worldofxeen_menu.h:156