diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-15 22:13:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-15 22:13:10 +0300 |
commit | 35eab15d0d139a6f94c9d7e124a75a81e0edcca8 (patch) | |
tree | 7643405fef048560066c5db4cd148c52421cae86 /src/gui/widgets/characterdisplay.cpp | |
parent | 3216d6caf93ebdb24bee3d9a859ea9e562d8ff4d (diff) | |
download | mv-35eab15d0d139a6f94c9d7e124a75a81e0edcca8.tar.gz mv-35eab15d0d139a6f94c9d7e124a75a81e0edcca8.tar.bz2 mv-35eab15d0d139a6f94c9d7e124a75a81e0edcca8.tar.xz mv-35eab15d0d139a6f94c9d7e124a75a81e0edcca8.zip |
add to character selection popup level and money.
Diffstat (limited to 'src/gui/widgets/characterdisplay.cpp')
-rw-r--r-- | src/gui/widgets/characterdisplay.cpp | 13 |
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) |