xoreos  0.0.5
partyleader.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_INGAME_PARTYLEADER_H
26 #define ENGINES_NWN_GUI_INGAME_PARTYLEADER_H
27 
28 #include "src/common/ustring.h"
29 
30 #include "src/events/notifyable.h"
31 
33 
34 namespace Engines {
35 
36 namespace NWN {
37 
38 class Module;
39 class PortraitWidget;
40 
43 public:
44  PartyLeader(Module &module);
45  ~PartyLeader();
46 
48  void setPortrait(const Common::UString &portrait);
49 
51  void setName(const Common::UString &name);
53  void setArea(const Common::UString &area);
54 
56  void setHealthColor(float r, float g, float b, float a);
58  void setHealth(int32 current, int32 max);
59 
60 protected:
61  void callbackActive(Widget &widget);
62 
63 private:
65 
68 
70 
73 
76 
77 
78  void updatePortraitTooltip();
79 
80  void notifyResized(int oldWidth, int oldHeight, int newWidth, int newHeight);
81 };
82 
83 } // End of namespace NWN
84 
85 } // End of namespace Engines
86 
87 #endif // ENGINES_NWN_GUI_INGAME_PARTYLEADER_H
A NWN character info panel.
Definition: charinfo.h:39
void setPortrait(const Common::UString &portrait)
Set the portrait image.
A class holding an UTF-8 string.
Definition: ustring.h:48
void setName(const Common::UString &name)
Set the character name.
void callbackActive(Widget &widget)
Callback that&#39;s triggered when a widget was activated.
void setHealth(int32 current, int32 max)
Set the character health.
Common::UString _name
Definition: partyleader.h:71
void setArea(const Common::UString &area)
Set the area the character is in.
A NWN character info panel.
Common::UString _area
Definition: partyleader.h:72
A class that can be notified by the NotificationManager.
void notifyResized(int oldWidth, int oldHeight, int newWidth, int newHeight)
void setHealthColor(float r, float g, float b, float a)
Set the health bar color.
The NWN ingame party leader bar.
Definition: partyleader.h:42
Unicode string handling.
Common::UString _currentPortrait
Definition: partyleader.h:69
A widget in a GUI.
Definition: widget.h:40
PartyLeader(Module &module)
Definition: partyleader.cpp:58
A NWN portrait widget.
Definition: portrait.h:121
A NWN quad widget.
Definition: quadwidget.h:49
PortraitWidget * _portrait
Definition: partyleader.h:66
int32_t int32
Definition: types.h:203