45 "ButtonMap" ,
"ButtonJournal" ,
"ButtonRest" ,
"ButtonOptions",
46 "ButtonInventory",
"ButtonCharacter",
"ButtonSpells",
"ButtonPlayers" 50 "pb_but_map",
"pb_but_jour",
"pb_but_rest" ,
"pb_but_opts",
51 "pb_but_inv",
"pb_but_char",
"pb_but_spell",
"pb_but_pvp" 55 7036, 7037, 8105, 7040, 7035, 7039, 7038, 8106
59 _currentHP(1), _maxHP(1) {
72 float buttonsX = - playerPanel->
getWidth () + 4.0f;
73 float buttonsY = - playerPanel->
getHeight() + 57.0f;
75 for (
int i = 0; i < 8; i++) {
81 const float x = buttonsX + ((i / 4) * 36.0f);
82 const float y = buttonsY - ((i % 4) * 18.0f);
83 const float z = -100.0f;
106 _health =
new QuadWidget(*
this,
"LeaderHealthbar",
"", 0.0f, 0.0f, 6.0f, 100.0f);
146 float barLength = 0.0f;
148 barLength =
CLIP(((
float) current) / ((
float) max), 0.0f, 1.0f) * 100.0f;
156 if (widget.
getTag() ==
"ButtonOptions") {
173 int newWidth,
int newHeight) {
175 setPosition(newWidth / 2.0f, newHeight / 2.0f, -10.0f);
Widget * getWidget(const Common::UString &tag, bool vital=false)
Return a widget in the GUI.
void showMenu()
Show the ingame main menu.
void setPortrait(const Common::UString &portrait)
Set the portrait image.
The global graphics manager.
#define TalkMan
Shortcut for accessing the talk manager.
A class holding an UTF-8 string.
void setPosition(float x, float y, float z)
Set the GUI's position.
static const char *const kButtonModels[]
void removeFocus()
Forcefully remove the focus from the current widget.
void setName(const Common::UString &name)
Set the character name.
The context needed to run a Neverwinter Nights module.
void callbackActive(Widget &widget)
Callback that's triggered when a widget was activated.
void setHealth(int32 current, int32 max)
Set the character health.
const char * c_str() const
Return the (utf8 encoded) string data.
void setArea(const Common::UString &area)
Set the area the character is in.
static UString format(const char *s,...) GCC_PRINTF(1
Print formatted data into an UString object, similar to sprintf().
Utility templates and functions.
The NWN ingame party leader panel.
static const char *const kButtonTags[]
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.
#define WindowMan
Shortcut for accessing the window manager.
Common::UString _currentPortrait
void updatePortraitTooltip()
The global talk manager for Aurora strings.
PartyLeader(Module &module)
static const uint32 kButtonTooltips[]
A portrait model and widget.
void addWidget(Widget *widget)
Add a widget.
T CLIP(T v, T amin, T amax)
PortraitWidget * _portrait