summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/characterdisplay.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index 7c5f84f61..65fe36252 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -22,12 +22,16 @@
#include "gui/widgets/characterdisplay.h"
+#include "units.h"
+
#include "gui/charselectdialog.h"
#include "gui/textpopup.h"
#include "gui/widgets/label.h"
#include "gui/widgets/layouthelper.h"
+#include "utils/gettext.h"
+
#include "debug.h"
CharacterDisplay::CharacterDisplay(const Widget2 *const widget,
@@ -116,9 +120,16 @@ void CharacterDisplay::mouseMoved(gcn::MouseEvent &event A_UNUSED)
SDL_GetMouseState(&mouseX, &mouseY);
const std::string &name = mName->getCaption();
if (!name.empty())
- mPopup->show(mouseX, mouseY, name);
+ {
+ mPopup->show(mouseX, mouseY, name, strprintf(_("Level: %u"),
+ mCharacter->data.mAttributes[PlayerInfo::LEVEL]),
+ strprintf(_("Money: %s"), Units::formatCurrency(
+ mCharacter->data.mAttributes[PlayerInfo::MONEY]).c_str()));
+ }
else
+ {
mPopup->setVisible(false);
+ }
}
void CharacterDisplay::mousePressed(gcn::MouseEvent &event)