From 9e4bace9ee01b1da4e94aed696dfd9607533b1a6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 31 Jul 2016 23:21:48 +0300 Subject: Show being level in being popup (if known). --- src/gui/popups/beingpopup.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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"), -- cgit v1.2.3-60-g2f50