xoreos
0.0.5
src
engines
kotor
gui
ingame
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
28
#include "
src/engines/kotor/gui/gui.h
"
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
:
54
Creature
*
_pc
;
55
EquipmentSlot
_selectedSlot
;
56
bool
_slotFixated
;
57
std::vector<Common::UString>
_visibleItems
;
58
59
void
fillEquipedItems
();
60
Common::UString
getEquipedItemIcon
(
EquipmentSlot
slot)
const
;
61
void
fillEquipableItemsList
();
62
EquipmentSlot
getSlotByWidgetTag
(
const
Common::UString
&tag)
const
;
63
WidgetButton
*
getSlotButton
(
EquipmentSlot
slot);
64
Common::UString
getSlotName
(
EquipmentSlot
slot)
const
;
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
Engines::KotOR::MenuEquipment::getEquipedItemIcon
Common::UString getEquipedItemIcon(EquipmentSlot slot) const
Definition:
menu_equ.cpp:197
Engines::KotOR::MenuEquipment::_selectedSlot
EquipmentSlot _selectedSlot
Definition:
menu_equ.h:55
Engines::KotOR::EquipmentSlot
EquipmentSlot
Definition:
types.h:155
Common::UString
A class holding an UTF-8 string.
Definition:
ustring.h:48
Engines::KotOR::MenuEquipment::fillEquipableItemsList
void fillEquipableItemsList()
Definition:
menu_equ.cpp:202
Engines::KotOR::MenuEquipment::hide
void hide()
Hide the GUI.
Definition:
menu_equ.cpp:88
Engines::KotOR::MenuEquipment::callbackActive
void callbackActive(Widget &widget)
Callback that's triggered when a widget was activated.
Definition:
menu_equ.cpp:130
Engines::KotOR::MenuEquipment::MenuEquipment
MenuEquipment(::Engines::Console *console=0)
Definition:
menu_equ.cpp:42
Engines::KotOR::MenuEquipment::getSlotButton
WidgetButton * getSlotButton(EquipmentSlot slot)
Definition:
menu_equ.cpp:259
Engines::KotOR::MenuEquipment::_visibleItems
std::vector< Common::UString > _visibleItems
Definition:
menu_equ.h:57
Engines::WidgetButton
Definition:
button.h:34
Engines
Definition:
console.cpp:69
Engines::KotOR::Creature
Definition:
creature.h:48
Engines::KotOR::MenuEquipment::setPC
void setPC(Creature *pc)
Definition:
menu_equ.cpp:74
gui.h
A KotOR GUI.
Engines::KotOR::MenuEquipment::getSlotByWidgetTag
EquipmentSlot getSlotByWidgetTag(const Common::UString &tag) const
Definition:
menu_equ.cpp:236
Engines::KotOR::MenuEquipment::fixateOnSlot
void fixateOnSlot(bool fixate)
Definition:
menu_equ.cpp:309
Engines::Widget
A widget in a GUI.
Definition:
widget.h:40
Engines::KotOR::MenuEquipment::callbackRun
void callbackRun()
Callback that's triggered periodically in the run() method.
Definition:
menu_equ.cpp:95
Events::EventType
EventType
Custom event types.
Definition:
types.h:45
Events::Key
Key
Definition:
types.h:78
Engines::KotOR::MenuEquipment
Definition:
menu_equ.h:39
Engines::KotOR::MenuEquipment::fillEquipedItems
void fillEquipedItems()
Definition:
menu_equ.cpp:175
Engines::KotOR::GUI
A KotOR GUI.
Definition:
gui.h:57
Engines::KotOR::MenuEquipment::callbackKeyInput
void callbackKeyInput(const Events::Key &key, const Events::EventType &type)
Callback that's triggered when a key is pressed or released.
Definition:
menu_equ.cpp:160
Engines::KotOR::MenuEquipment::_pc
Creature * _pc
Definition:
menu_equ.h:54
Engines::KotOR::MenuEquipment::show
void show()
Show the GUI.
Definition:
menu_equ.cpp:81
Engines::Console
Definition:
console.h:190
Engines::KotOR::MenuEquipment::_slotFixated
bool _slotFixated
Definition:
menu_equ.h:56
Engines::KotOR::MenuEquipment::getSlotName
Common::UString getSlotName(EquipmentSlot slot) const
Definition:
menu_equ.cpp:284
Generated on Sun Nov 18 2018 15:13:40 for xoreos by
1.8.14