xoreos  0.0.5
ingame.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 
26 
27 namespace Engines {
28 
29 namespace KotOR {
30 
31 IngameGUI::IngameGUI(Module &module, Console *console) {
32  _hud.reset(new HUD(module, console));
33 }
34 
36  _hud->show();
37 }
38 
40  _hud->hide();
41 }
42 
43 void IngameGUI::setMinimap(const Common::UString &map, int northAxis,
44  float worldPt1X, float worldPt1Y, float worldPt2X, float worldPt2Y,
45  float mapPt1X, float mapPt1Y, float mapPt2X, float mapPt2Y) {
46 
47  _hud->setMinimap(map, northAxis, worldPt1X, worldPt1Y, worldPt2X, worldPt2Y, mapPt1X, mapPt1Y, mapPt2X, mapPt2Y);
48 }
49 
50 void IngameGUI::setPosition(float x, float y) {
51  _hud->setPosition(x, y);
52 }
53 
54 void IngameGUI::setRotation(float angle) {
55  _hud->setRotation(angle);
56 }
57 
59  _hud->setReturnStrref(id);
60 }
61 
63  _hud->setReturnQueryStrref(id);
64 }
65 
66 void IngameGUI::setReturnEnabled(bool enabled) {
67  _hud->setReturnEnabled(enabled);
68 }
69 
71  _hud->showContainer(inv);
72 }
73 
75  _hud->setPartyLeader(creature);
76 }
77 
79  _hud->setPartyMember1(creature);
80 }
81 
83  _hud->setPartyMember2(creature);
84 }
85 
86 void IngameGUI::addEvent(const Events::Event &event) {
87  _hud->addEvent(event);
88 }
89 
91  _hud->processEventQueue();
92 }
93 
94 } // End of namespace KotOR
95 
96 } // End of namespace Engines
void show()
Show the ingame GUI elements.
Definition: ingame.cpp:35
Common::ScopedPtr< HUD > _hud
Definition: ingame.h:71
void addEvent(const Events::Event &event)
Definition: ingame.cpp:86
A class holding an UTF-8 string.
Definition: ustring.h:48
void showContainer(Inventory &inv)
Definition: ingame.cpp:70
void setRotation(float angle)
Set the rotation for the minimap arrow.
Definition: ingame.cpp:54
SDL_Event Event
Definition: types.h:42
void setPartyMember2(Creature *creature)
Definition: ingame.cpp:82
void hide()
Hide the ingame GUI elements.
Definition: ingame.cpp:39
void setReturnQueryStrref(uint32 id)
Definition: ingame.cpp:62
void setReturnEnabled(bool enabled)
Definition: ingame.cpp:66
void setReturnStrref(uint32 id)
Definition: ingame.cpp:58
void setMinimap(const Common::UString &map, int northAxis, float worldPt1X, float worldPt1Y, float worldPt2X, float worldPt2Y, float mapPt1X, float mapPt1Y, float mapPt2X, float mapPt2Y)
Set the minimap with the specified id and both scaling points.
Definition: ingame.cpp:43
void setPosition(float x, float y)
Set the position for the minimap.
Definition: ingame.cpp:50
void setPartyLeader(Creature *creature)
Definition: ingame.cpp:74
uint32_t uint32
Definition: types.h:204
void setPartyMember1(Creature *creature)
Definition: ingame.cpp:78
IngameGUI(Module &module, ::Engines::Console *console=0)
The ingame GUI.