xoreos  0.0.5
menu_equ.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_EQU_H
26 #define ENGINES_KOTOR_GUI_INGAME_MENU_EQU_H
27 
29 
30 namespace Engines {
31 
32 class WidgetButton;
33 class WidgetLabel;
34 
35 namespace KotOR {
36 
37 class Creature;
38 
39 class MenuEquipment : public GUI {
40 public:
41  MenuEquipment(::Engines::Console *console = 0);
42 
43  void setPC(Creature *pc);
44 
45  void show();
46  void hide();
47 
48 protected:
49  void callbackRun();
50  void callbackActive(Widget &widget);
51  void callbackKeyInput(const Events::Key &key, const Events::EventType &type);
52 
53 private:
57  std::vector<Common::UString> _visibleItems;
58 
59  void fillEquipedItems();
65  void fixateOnSlot(bool fixate);
66 };
67 
68 } // End of namespace KotOR
69 
70 } // End of namespace Engines
71 
72 #endif // ENGINES_KOTOR_GUI_INGAME_MENU_EQU_H
Common::UString getEquipedItemIcon(EquipmentSlot slot) const
Definition: menu_equ.cpp:197
EquipmentSlot _selectedSlot
Definition: menu_equ.h:55
A class holding an UTF-8 string.
Definition: ustring.h:48
void hide()
Hide the GUI.
Definition: menu_equ.cpp:88
void callbackActive(Widget &widget)
Callback that&#39;s triggered when a widget was activated.
Definition: menu_equ.cpp:130
MenuEquipment(::Engines::Console *console=0)
Definition: menu_equ.cpp:42
WidgetButton * getSlotButton(EquipmentSlot slot)
Definition: menu_equ.cpp:259
std::vector< Common::UString > _visibleItems
Definition: menu_equ.h:57
void setPC(Creature *pc)
Definition: menu_equ.cpp:74
A KotOR GUI.
EquipmentSlot getSlotByWidgetTag(const Common::UString &tag) const
Definition: menu_equ.cpp:236
void fixateOnSlot(bool fixate)
Definition: menu_equ.cpp:309
A widget in a GUI.
Definition: widget.h:40
void callbackRun()
Callback that&#39;s triggered periodically in the run() method.
Definition: menu_equ.cpp:95
EventType
Custom event types.
Definition: types.h:45
Key
Definition: types.h:78
A KotOR GUI.
Definition: gui.h:57
void callbackKeyInput(const Events::Key &key, const Events::EventType &type)
Callback that&#39;s triggered when a key is pressed or released.
Definition: menu_equ.cpp:160
void show()
Show the GUI.
Definition: menu_equ.cpp:81
Common::UString getSlotName(EquipmentSlot slot) const
Definition: menu_equ.cpp:284