ScummVM API documentation
menu_nebular.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 MADS_MENU_NEBULAR_H
23 #define MADS_MENU_NEBULAR_H
24 
25 #include "common/scummsys.h"
26 #include "mads/game.h"
27 #include "mads/menu_views.h"
28 #include "mads/msurface.h"
29 #include "mads/nebular/dialogs_nebular.h"
30 
31 namespace MADS {
32 
33 class MADSEngine;
34 
35 namespace Nebular {
36 
37 enum MADSGameAction {
38  START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT,
39  SETS, EVOLVE
40 };
41 
42 class MainMenu: public MenuView {
43 private:
44  SpriteAsset *_menuItems[7];
45  int _menuItemIndexes[7];
46  int _menuItemIndex;
47  int _frameIndex;
48  uint32 _delayTimeout;
49  bool _skipFlag;
50  bool _showEvolve, _showSets;
51 
55  int _highlightedIndex;
56 
60  bool _buttonDown;
61 
65  int _selectedIndex;
66 
70  int getHighlightedItem(const Common::Point &pt);
71 
75  void unhighlightItem();
76 
80  void handleAction(MADSGameAction action);
81 
85  void addSpriteSlot();
86 
91  bool shouldShowQuotes();
92 
96  void showBonusItems();
97 protected:
101  void display() override;
102 
106  void doFrame() override;
107 
111  bool onEvent(Common::Event &event) override;
112 public:
113  MainMenu(MADSEngine *vm);
114 
115  ~MainMenu() override;
116 };
117 
118 class AdvertView : public EventTarget {
119 private:
123  MADSEngine *_vm;
124 
128  bool _breakFlag;
129 protected:
133  bool onEvent(Common::Event &event) override;
134 public:
135  AdvertView(MADSEngine *vm);
136 
137  ~AdvertView() override {}
138 
142  void show();
143 };
144 
146 protected:
147  void scriptDone() override;
148 public:
150 };
151 
152 class RexTextView : public TextView {
153 public:
154  RexTextView(MADSEngine *vm) : TextView(vm) {}
155 };
156 
157 } // End of namespace Nebular
158 
159 } // End of namespace MADS
160 
161 #endif /* MADS_MENU_NEBULAR_H */
Definition: events.h:41
MADSEngine * _vm
Definition: dialogs.h:266
Definition: menu_views.h:67
Definition: menu_nebular.h:118
void display() override
Definition: menu_nebular.h:42
Definition: menu_nebular.h:152
Definition: events.h:199
Definition: rect.h:45
bool onEvent(Common::Event &event) override
Definition: menu_nebular.h:145
Definition: mads.h:87
Definition: assets.h:61
Definition: menu_views.h:34
Definition: action.h:28
Definition: menu_views.h:166
void doFrame() override