xoreos  0.0.5
menu.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos 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 xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef ENGINES_KOTOR_GUI_INGAME_MENU_H
26 #define ENGINES_KOTOR_GUI_INGAME_MENU_H
27 
29 
33 
42 
43 namespace Engines {
44 
45 namespace KotOR {
46 
47 class Menu : public GUI {
48 public:
49  Menu(Module &module, ::Engines::Console *console = 0);
50 
52  void setReturnStrref(uint32);
56  void setReturnEnabled(bool);
57 
58  void showMenu(const Common::UString &tag);
59 
60 private:
61  enum MenuType {
70 
72  };
73 
74  struct SubMenu {
77 
79 
80  SubMenu() : protoItem(0), button(0) { }
81  };
82 
83  void callbackRun();
84  void callbackActive(Widget &widget);
85 
87 
90 
93 
94 
95  void showMenu(MenuType type);
96 };
97 
98 } // End of namespace KotOR
99 
100 } // End of namespace Engines
101 
102 #endif // ENGINES_KOTOR_GUI_INGAME_MENU_H
void showMenu(const Common::UString &tag)
Definition: menu.cpp:135
A class holding an UTF-8 string.
Definition: ustring.h:48
void callbackRun()
Callback that&#39;s triggered periodically in the run() method.
Definition: menu.cpp:112
void callbackActive(Widget &widget)
Callback that&#39;s triggered when a widget was activated.
Definition: menu.cpp:144
Common::ScopedPtr< GUI > menu
Definition: menu.h:78
Load/save game menu.
void setReturnQueryStrref(uint32)
Set the return query string ref.
Definition: menu.cpp:86
Generic Aurora engines (debug) console.
WidgetButton * button
Definition: menu.h:76
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
void setReturnEnabled(bool)
Set the return button enabled/disabled.
Definition: menu.cpp:90
Module & _module
Definition: menu.h:86
A KotOR GUI.
SubMenu _menu[kMenuTypeMAX]
Definition: menu.h:88
Menu(Module &module, ::Engines::Console *console=0)
Definition: menu.cpp:35
A widget in a GUI.
Definition: widget.h:40
uint32_t uint32
Definition: types.h:204
A protoitem widget for Star Wars: Knights of the Old Republic and Jade Empire.
Common::ScopedPtr< SaveLoadMenu > _menuSave
Definition: menu.h:92
A KotOR GUI.
Definition: gui.h:57
void setReturnStrref(uint32)
Set the return string ref.
Definition: menu.cpp:82
Common::ScopedPtr< SaveLoadMenu > _menuLoad
Definition: menu.h:91
WidgetProtoItem * protoItem
Definition: menu.h:75
SubMenu * _currentMenu
Definition: menu.h:89