xoreos
0.0.5
src
engines
nwn
gui
main
newpremium.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_NWN_GUI_MAIN_NEWPREMIUM_H
26
#define ENGINES_NWN_GUI_MAIN_NEWPREMIUM_H
27
28
#include <vector>
29
30
#include "
src/common/scopedptr.h
"
31
#include "
src/common/ustring.h
"
32
33
#include "
src/graphics/aurora/types.h
"
34
35
#include "
src/engines/nwn/gui/widgets/listbox.h
"
36
37
#include "
src/engines/nwn/gui/gui.h
"
38
39
namespace
Engines
{
40
41
namespace
NWN {
42
43
class
Module;
44
45
class
WidgetListItemPremium
:
public
WidgetListItem
{
46
public
:
47
WidgetListItemPremium
(::
Engines::GUI
&gui,
const
Common::UString
&font,
48
const
Common::UString
&text,
float
spacing = 0.0f);
49
~WidgetListItemPremium
();
50
51
void
show
();
52
void
hide
();
53
54
void
setPosition
(
float
x,
float
y,
float
z);
55
56
float
getWidth
()
const
;
57
float
getHeight
()
const
;
58
59
void
setTag
(
const
Common::UString
&tag);
60
61
protected
:
62
bool
activate
();
63
bool
deactivate
();
64
65
private
:
66
Common::ScopedPtr<Graphics::Aurora::Model>
_button
;
67
Common::ScopedPtr<Graphics::Aurora::Text>
_text
;
68
69
float
_spacing
;
70
};
71
73
class
NewPremiumMenu
:
public
GUI
{
74
public
:
75
NewPremiumMenu
(
Module
&module,
GUI
&charType, ::
Engines::Console
*console = 0);
76
~NewPremiumMenu
();
77
78
void
show
();
79
80
protected
:
81
void
fixWidgetType
(
const
Common::UString
&tag,
WidgetType
&type);
82
void
initWidget
(
Widget
&widget);
83
84
void
callbackActive
(
Widget
&widget);
85
86
private
:
87
Module
*
_module
;
88
89
std::vector<Common::UString>
_modules
;
90
91
GUI
*
_charType
;
92
93
Common::UString
getSelectedModule
();
94
95
void
initModuleList
();
96
void
selectedModule
();
97
void
loadModule
();
98
};
99
100
}
// End of namespace NWN
101
102
}
// End of namespace Engines
103
104
#endif // ENGINES_NWN_GUI_MAIN_NEWPREMIUM_H
Engines::NWN::NewPremiumMenu::initModuleList
void initModuleList()
Definition:
newpremium.cpp:154
Engines::NWN::WidgetListItemPremium::setPosition
void setPosition(float x, float y, float z)
Set the widget's position.
Definition:
newpremium.cpp:79
Common::UString
A class holding an UTF-8 string.
Definition:
ustring.h:48
Engines::NWN::WidgetListItemPremium::getWidth
float getWidth() const
Get the widget's width.
Definition:
newpremium.cpp:91
Engines::NWN::WidgetListItemPremium::show
void show()
Show the widget.
Definition:
newpremium.cpp:69
Engines::NWN::WidgetListItemPremium::~WidgetListItemPremium
~WidgetListItemPremium()
Definition:
newpremium.cpp:66
Engines::NWN::NewPremiumMenu::fixWidgetType
void fixWidgetType(const Common::UString &tag, WidgetType &type)
Definition:
newpremium.cpp:140
Engines::NWN::NewPremiumMenu::loadModule
void loadModule()
Definition:
newpremium.cpp:213
Engines::NWN::NewPremiumMenu::~NewPremiumMenu
~NewPremiumMenu()
Definition:
newpremium.cpp:130
Engines::NWN::WidgetListItemPremium
Definition:
newpremium.h:45
Engines::NWN::NewPremiumMenu::initWidget
void initWidget(Widget &widget)
Definition:
newpremium.cpp:147
Engines::NWN::WidgetListItem
An item widget within a NWN listbox widget.
Definition:
listbox.h:51
scopedptr.h
A simple scoped smart pointer template.
listbox.h
A NWN listbox widget.
Engines::NWN::NewPremiumMenu::getSelectedModule
Common::UString getSelectedModule()
Definition:
newpremium.cpp:197
Engines::GUI
A GUI.
Definition:
gui.h:43
Engines::NWN::NewPremiumMenu::show
void show()
Show the GUI.
Definition:
newpremium.cpp:133
Engines::NWN::WidgetListItemPremium::_spacing
float _spacing
Definition:
newpremium.h:69
types.h
Basic Aurora graphics types.
Engines::NWN::NewPremiumMenu::_charType
GUI * _charType
Definition:
newpremium.h:91
Engines::NWN::GUI
A NWN GUI.
Definition:
gui.h:54
Engines::NWN::GUI::WidgetType
WidgetType
Definition:
gui.h:60
Engines
Definition:
console.cpp:69
Common::ScopedPtr< Graphics::Aurora::Model >
Engines::NWN::WidgetListItemPremium::_button
Common::ScopedPtr< Graphics::Aurora::Model > _button
Definition:
newpremium.h:66
Engines::NWN::NewPremiumMenu::selectedModule
void selectedModule()
Definition:
newpremium.cpp:205
Engines::NWN::NewPremiumMenu::NewPremiumMenu
NewPremiumMenu(Module &module, GUI &charType, ::Engines::Console *console=0)
Definition:
newpremium.cpp:124
Engines::NWN::WidgetListItemPremium::_text
Common::ScopedPtr< Graphics::Aurora::Text > _text
Definition:
newpremium.h:67
ustring.h
Unicode string handling.
Engines::NWN::NewPremiumMenu::_modules
std::vector< Common::UString > _modules
Definition:
newpremium.h:89
Engines::NWN::WidgetListItemPremium::activate
bool activate()
Definition:
newpremium.cpp:105
Engines::NWN::WidgetListItemPremium::getHeight
float getHeight() const
Get the widget's height.
Definition:
newpremium.cpp:95
Engines::Widget
A widget in a GUI.
Definition:
widget.h:40
Engines::NWN::NewPremiumMenu::callbackActive
void callbackActive(Widget &widget)
Callback that's triggered when a widget was activated.
Definition:
newpremium.cpp:176
Engines::NWN::WidgetListItemPremium::setTag
void setTag(const Common::UString &tag)
Set the widget's tag.
Definition:
newpremium.cpp:99
Engines::NWN::WidgetListItemPremium::deactivate
bool deactivate()
Definition:
newpremium.cpp:114
Engines::NWN::WidgetListItemPremium::hide
void hide()
Hide the widget.
Definition:
newpremium.cpp:74
Engines::NWN::WidgetListItemPremium::WidgetListItemPremium
WidgetListItemPremium(::Engines::GUI &gui, const Common::UString &font, const Common::UString &text, float spacing=0.0f)
Definition:
newpremium.cpp:50
Engines::NWN::Module
Definition:
module.h:63
Engines::NWN::NewPremiumMenu
The NWN new premium module menu.
Definition:
newpremium.h:73
gui.h
A NWN GUI.
Engines::Console
Definition:
console.h:190
Engines::NWN::NewPremiumMenu::_module
Module * _module
Definition:
newpremium.h:87
Generated on Sun Nov 18 2018 15:13:40 for xoreos by
1.8.14