xoreos
0.0.5
src
engines
jade
gui
guibackground.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_JADE_GUI_GUIBACKGROUND_H
26
#define ENGINES_JADE_GUI_GUIBACKGROUND_H
27
28
#include "
src/graphics/guielement.h
"
29
30
#include "
src/graphics/aurora/texturehandle.h
"
31
32
#include "
src/events/notifyable.h
"
33
34
namespace
Common
{
35
class
UString;
36
}
37
38
namespace
Engines
{
39
40
namespace
Jade {
41
42
static
const
Common::UString
&
kBackgroundTypeMenu
=
"back"
;
43
static
const
Common::UString
&
kBackgroundTypeComp0
=
"comp0"
;
44
static
const
Common::UString
&
kBackgroundTypeComp1
=
"comp1"
;
45
static
const
Common::UString
&
kBackgroundTypeLoad
=
"load"
;
46
static
const
Common::UString
&
kBackgroundTypeMap
=
"map"
;
47
static
const
Common::UString
&
kBackgroundTypePazaak
=
"pazaak"
;
48
static
const
Common::UString
&
kBackgroundTypeStore
=
"store"
;
49
50
class
GUIBackground
:
public
Graphics::GUIElement
,
public
Events::Notifyable
{
51
public
:
52
GUIBackground
(
const
Common::UString
&type =
kBackgroundTypeMenu
,
bool
front =
false
);
53
~GUIBackground
();
54
55
void
setType
(
const
Common::UString
&type);
56
57
// Renderable
58
void
calculateDistance
();
59
void
render
(
Graphics::RenderPass
pass
);
60
61
private
:
62
Graphics::Aurora::TextureHandle
_texture
;
63
64
Common::UString
_type
;
65
66
int
_screenWidth
;
67
int
_screenHeight
;
68
69
int
_vertexX1
;
70
int
_vertexX2
;
71
int
_vertexY1
;
72
int
_vertexY2
;
73
74
bool
_render
;
75
76
void
update
();
77
bool
tryBackground
(
int
x,
int
y);
78
79
void
notifyResized
(
int
oldWidth,
int
oldHeight,
int
newWidth,
int
newHeight);
80
};
81
82
}
// End of namespace Jade
83
84
}
// End of namespace Engines
85
86
#endif // ENGINES_JADE_GUI_GUIBACKGROUND_H
Engines::Jade::GUIBackground::_vertexX2
int _vertexX2
Definition:
guibackground.h:70
Engines::Jade::GUIBackground::setType
void setType(const Common::UString &type)
Definition:
guibackground.cpp:59
Engines::Jade::GUIBackground::_vertexY2
int _vertexY2
Definition:
guibackground.h:72
Common
Definition:
2dafile.h:39
Common::UString
A class holding an UTF-8 string.
Definition:
ustring.h:48
Engines::Jade::kBackgroundTypeStore
static const Common::UString & kBackgroundTypeStore
Definition:
guibackground.h:48
Engines::Jade::kBackgroundTypePazaak
static const Common::UString & kBackgroundTypePazaak
Definition:
guibackground.h:47
Engines::Jade::GUIBackground::_type
Common::UString _type
Definition:
guibackground.h:64
Engines::Jade::kBackgroundTypeMap
static const Common::UString & kBackgroundTypeMap
Definition:
guibackground.h:46
Engines::Jade::GUIBackground::~GUIBackground
~GUIBackground()
Definition:
guibackground.cpp:55
Engines::Jade::GUIBackground::notifyResized
void notifyResized(int oldWidth, int oldHeight, int newWidth, int newHeight)
Definition:
guibackground.cpp:140
texturehandle.h
A handle to an Aurora texture.
Engines::Jade::GUIBackground::GUIBackground
GUIBackground(const Common::UString &type=kBackgroundTypeMenu, bool front=false)
Definition:
guibackground.cpp:44
Engines::Jade::GUIBackground::_vertexY1
int _vertexY1
Definition:
guibackground.h:71
guielement.h
A GUI element.
Graphics::RenderPass
RenderPass
Definition:
types.h:97
Engines::Jade::GUIBackground::_vertexX1
int _vertexX1
Definition:
guibackground.h:69
Engines::Jade::GUIBackground::_screenHeight
int _screenHeight
Definition:
guibackground.h:67
Engines::Jade::GUIBackground::render
void render(Graphics::RenderPass pass)
Render the object.
Definition:
guibackground.cpp:66
Engines::Jade::GUIBackground::calculateDistance
void calculateDistance()
Calculate the object's distance.
Definition:
guibackground.cpp:63
Engines::Jade::GUIBackground::_render
bool _render
Definition:
guibackground.h:74
notifyable.h
A class that can be notified by the NotificationManager.
Engines
Definition:
console.cpp:69
Engines::Jade::GUIBackground::update
void update()
Definition:
guibackground.cpp:107
Engines::Jade::kBackgroundTypeComp0
static const Common::UString & kBackgroundTypeComp0
Definition:
guibackground.h:43
Graphics::GUIElement
An element of the GUI.
Definition:
guielement.h:33
Engines::Jade::GUIBackground::tryBackground
bool tryBackground(int x, int y)
Definition:
guibackground.cpp:121
Engines::Jade::GUIBackground
Definition:
guibackground.h:50
pass
#define pass
Definition:
fft.cpp:257
Engines::Jade::GUIBackground::_screenWidth
int _screenWidth
Definition:
guibackground.h:66
Graphics::Aurora::TextureHandle
A handle to a texture.
Definition:
texturehandle.h:51
Events::Notifyable
Definition:
notifyable.h:35
Engines::Jade::kBackgroundTypeMenu
static const Common::UString & kBackgroundTypeMenu
Definition:
guibackground.h:42
Engines::Jade::kBackgroundTypeLoad
static const Common::UString & kBackgroundTypeLoad
Definition:
guibackground.h:45
Engines::Jade::GUIBackground::_texture
Graphics::Aurora::TextureHandle _texture
Definition:
guibackground.h:62
Engines::Jade::kBackgroundTypeComp1
static const Common::UString & kBackgroundTypeComp1
Definition:
guibackground.h:44
Generated on Sun Nov 18 2018 15:13:39 for xoreos by
1.8.14