xoreos  0.0.5
hud.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_HUD_H
26 #define ENGINES_KOTOR_GUI_INGAME_HUD_H
27 
28 #include "src/common/ustring.h"
29 
31 
34 
36 
40 
41 namespace Engines {
42 
43 namespace KotOR {
44 
45 class HUD : public GUI, Events::Notifyable {
46 public:
47  HUD(Module &module, ::Engines::Console *console = 0);
48 
49  void setReturnStrref(uint32 id);
51  void setReturnEnabled(bool);
52 
53  void setMinimap(const Common::UString &map, int northAxis,
54  float worldPt1X, float worldPt1Y, float worldPt2X, float worldPt2Y,
55  float mapPt1X, float mapPt1Y, float mapPt2X, float mapPt2Y);
56 
57  void setPosition(float x, float y);
58  void setRotation(float angle);
59 
60  void showContainer(Inventory &inv);
61 
62  void setPartyLeader(Creature *creature);
63  void setPartyMember1(Creature *creature);
64  void setPartyMember2(Creature *creature);
65 
66 private:
70 
73 
74  void update(int width, int height);
75 
76  void initWidget(Widget &widget);
77  void setPortrait(uint8 n, bool visible, const Common::UString &portrait = "");
78 
79  void notifyResized(int oldWidth, int oldHeight, int newWidth, int newHeight);
80 
81 protected:
82  virtual void callbackActive(Widget &widget);
83 };
84 
85 } // End of namespace KotOR
86 
87 } // End of namespace Engines
88 
89 #endif // ENGINES_KOTOR_GUI_INGAME_HUD_H
WidgetLabel * _minimapPointer
Definition: hud.h:72
void setRotation(float angle)
Definition: hud.cpp:238
A class holding an UTF-8 string.
Definition: ustring.h:48
void setPartyMember1(Creature *creature)
Definition: hud.cpp:304
void setMinimap(const Common::UString &map, int northAxis, float worldPt1X, float worldPt1Y, float worldPt2X, float worldPt2Y, float mapPt1X, float mapPt1Y, float mapPt2X, float mapPt2Y)
Definition: hud.cpp:215
void initWidget(Widget &widget)
Definition: hud.cpp:384
uint8_t uint8
Definition: types.h:200
void setReturnEnabled(bool)
Definition: hud.cpp:211
virtual void callbackActive(Widget &widget)
Callback that&#39;s triggered when a widget was activated.
Definition: hud.cpp:408
Module * _module
Definition: hud.h:67
Collection of items.
void notifyResized(int oldWidth, int oldHeight, int newWidth, int newHeight)
Definition: hud.cpp:426
void setReturnStrref(uint32 id)
Definition: hud.cpp:203
The ingame container inventory menu.
void setPosition(float x, float y)
Definition: hud.cpp:233
Common::ScopedPtr< ContainerMenu > _container
Definition: hud.h:69
Common::ScopedPtr< Minimap > _minimap
Definition: hud.h:71
void setPortrait(uint8 n, bool visible, const Common::UString &portrait="")
Definition: hud.cpp:268
HUD(Module &module, ::Engines::Console *console=0)
The ingame minimap.
Generic Aurora engines (debug) console.
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
A KotOR GUI.
Unicode string handling.
void showContainer(Inventory &inv)
Definition: hud.cpp:251
A widget in a GUI.
Definition: widget.h:40
void update(int width, int height)
Definition: hud.cpp:312
uint32_t uint32
Definition: types.h:204
void setReturnQueryStrref(uint32 id)
Definition: hud.cpp:207
void setPartyLeader(Creature *creature)
Definition: hud.cpp:300
The context needed to run a Star Wars: Knights of the Old Republic module.
A KotOR GUI.
Definition: gui.h:57
void setPartyMember2(Creature *creature)
Definition: hud.cpp:308