summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-19 21:53:51 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-19 21:53:51 +0300
commitfe2b0ecc673d269327b6f5c32df65fad80193128 (patch)
tree58efc09e8ac0f86fa0af39af4b51e2803ca04867 /src/gui
parent08f911af478cb3bbede503a3e704b61da713b74e (diff)
downloadplus-fe2b0ecc673d269327b6f5c32df65fad80193128.tar.gz
plus-fe2b0ecc673d269327b6f5c32df65fad80193128.tar.bz2
plus-fe2b0ecc673d269327b6f5c32df65fad80193128.tar.xz
plus-fe2b0ecc673d269327b6f5c32df65fad80193128.zip
Show level in experience bar popup.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/ministatuswindow.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp
index cc374d386..72064c335 100644
--- a/src/gui/ministatuswindow.cpp
+++ b/src/gui/ministatuswindow.cpp
@@ -25,6 +25,7 @@
#include "animatedsprite.h"
#include "configuration.h"
#include "graphics.h"
+#include "localplayer.h"
#include "playerinfo.h"
#include "gui/chatwindow.h"
@@ -293,18 +294,29 @@ void MiniStatusWindow::mouseMoved(gcn::MouseEvent &event)
}
else if (event.getSource() == mXpBar)
{
+ std::string level;
+ if (player_node && player_node->isGM())
+ {
+ level = strprintf(_("Level: %d (GM %d)"),
+ PlayerInfo::getAttribute(PlayerInfo::LEVEL),
+ player_node->getGMLevel());
+ }
+ else
+ {
+ level = strprintf(_("Level: %d"),
+ PlayerInfo::getAttribute(PlayerInfo::LEVEL));
+ }
+
if (PlayerInfo::getAttribute(PlayerInfo::EXP)
> PlayerInfo::getAttribute(PlayerInfo::EXP_NEEDED))
{
- mTextPopup->show(x + getX(), y + getY(),
- event.getSource()->getId(), strprintf("%d/%d",
+ mTextPopup->show(x + getX(), y + getY(), level, strprintf("%d/%d",
PlayerInfo::getAttribute(PlayerInfo::EXP),
PlayerInfo::getAttribute(PlayerInfo::EXP_NEEDED)));
}
else
{
- mTextPopup->show(x + getX(), y + getY(),
- event.getSource()->getId(), strprintf("%d/%d",
+ mTextPopup->show(x + getX(), y + getY(), level, strprintf("%d/%d",
PlayerInfo::getAttribute(PlayerInfo::EXP),
PlayerInfo::getAttribute(PlayerInfo::EXP_NEEDED)),
strprintf("%s: %d", _("Need"),