xoreos
0.0.5
src
engines
aurora
kotorjadegui
label.cpp
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
#include "
src/common/system.h
"
26
27
#include "
src/aurora/gff3file.h
"
28
29
#include "
src/engines/aurora/kotorjadegui/label.h
"
30
31
namespace
Engines
{
32
33
WidgetLabel::WidgetLabel
(
GUI
&gui,
const
Common::UString
&tag)
34
:
KotORJadeWidget
(gui, tag),
35
_hovered(false) {
36
}
37
38
WidgetLabel::~WidgetLabel
() {
39
}
40
41
void
WidgetLabel::load
(
const
Aurora::GFF3Struct
&gff) {
42
KotORJadeWidget::load
(gff);
43
}
44
45
bool
WidgetLabel::isHovered
()
const
{
46
return
_hovered
;
47
}
48
49
void
WidgetLabel::enter
() {
50
_hovered
=
true
;
51
}
52
53
void
WidgetLabel::leave
() {
54
_hovered
=
false
;
55
}
56
57
void
WidgetLabel::mouseUp
(
uint8
UNUSED
(state),
float
UNUSED
(x),
float
UNUSED
(y)) {
58
setActive
(
true
);
59
}
60
61
}
// End of namespace Engines
Engines::WidgetLabel::enter
void enter()
The mouse entered the widget.
Definition:
label.cpp:49
gff3file.h
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
Engines::WidgetLabel::isHovered
bool isHovered() const
Definition:
label.cpp:45
label.h
A label widget for Star Wars: Knights of the Old Republic and Jade Empire.
Common::UString
A class holding an UTF-8 string.
Definition:
ustring.h:48
Engines::WidgetLabel::load
void load(const Aurora::GFF3Struct &gff)
Definition:
label.cpp:41
uint8
uint8_t uint8
Definition:
types.h:200
Engines::Widget::setActive
void setActive(bool active)
The widget's active state.
Definition:
widget.cpp:268
Engines::KotORJadeWidget
Definition:
kotorjadewidget.h:43
Engines::WidgetLabel::~WidgetLabel
~WidgetLabel()
Definition:
label.cpp:38
Engines::GUI
A GUI.
Definition:
gui.h:43
UNUSED
#define UNUSED(x)
Definition:
system.h:170
Engines::WidgetLabel::_hovered
bool _hovered
Definition:
label.h:46
Engines
Definition:
console.cpp:69
Engines::WidgetLabel::mouseUp
void mouseUp(uint8 state, float x, float y)
A mouse button was released on the widget.
Definition:
label.cpp:57
Engines::WidgetLabel::WidgetLabel
WidgetLabel(GUI &gui, const Common::UString &tag)
Definition:
label.cpp:33
Aurora::GFF3Struct
A struct within a GFF3.
Definition:
gff3file.h:164
system.h
Low-level detection of architecture/system properties.
Engines::WidgetLabel::leave
void leave()
The mouse left the widget.
Definition:
label.cpp:53
Engines::KotORJadeWidget::load
virtual void load(const Aurora::GFF3Struct &gff)
Definition:
kotorjadewidget.cpp:86
Generated on Sun Nov 18 2018 15:13:39 for xoreos by
1.8.14