summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-31 23:21:48 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-31 23:21:48 +0300
commit9e4bace9ee01b1da4e94aed696dfd9607533b1a6 (patch)
tree19c86ac23871b0c791cdc921739fb5368d9c604e
parent95eee98d9b137678f76d55e17163a2bc10897981 (diff)
downloadmv-9e4bace9ee01b1da4e94aed696dfd9607533b1a6.tar.gz
mv-9e4bace9ee01b1da4e94aed696dfd9607533b1a6.tar.bz2
mv-9e4bace9ee01b1da4e94aed696dfd9607533b1a6.tar.xz
mv-9e4bace9ee01b1da4e94aed696dfd9607533b1a6.zip
Show being level in being popup (if known).
-rw-r--r--src/gui/popups/beingpopup.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index 75b72c732..308629343 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -72,7 +72,7 @@ void BeingPopup::postInit()
void BeingPopup::addLabels(const int fontHeight)
{
- for (int f = 0; f < 9; f ++)
+ for (int f = 0; f < 10; f ++)
{
Label *const label = new Label(this, "A");
label->setPosition(0, fontHeight * (f + 1));
@@ -249,6 +249,18 @@ void BeingPopup::show(const int x, const int y, Being *const b)
num ++;
}
}
+
+ const int level = b->getLevel();
+ if (level > 1)
+ {
+ ptr = mLabels[num];
+ // TRANSLATORS: being popup label
+ ptr->setCaption(strprintf(_("Level: %d"),
+ level));
+ ptr->adjustSize();
+ num ++;
+ }
+
ptr = mLabels[num];
// TRANSLATORS: being popup label
ptr->setCaption(strprintf(_("Particles: %u"),