summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-25 23:17:02 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-25 23:17:02 +0300
commitf155e142ea06262ed09720e5b7d11d1b9693f645 (patch)
tree19d85c0e0e9c6c4f8dd64cfae580984a4bef80da /src/gui/popups
parent0146f872a63571027512cfaa9bc0433eb7e86430 (diff)
downloadmanaverse-f155e142ea06262ed09720e5b7d11d1b9693f645.tar.gz
manaverse-f155e142ea06262ed09720e5b7d11d1b9693f645.tar.bz2
manaverse-f155e142ea06262ed09720e5b7d11d1b9693f645.tar.xz
manaverse-f155e142ea06262ed09720e5b7d11d1b9693f645.zip
eathena: show in homunculus popup intimacy and hunger counters.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/beingpopup.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index c124d3c62..773376cee 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -22,6 +22,7 @@
#include "gui/popups/beingpopup.h"
#include "being/being.h"
+#include "being/homunculusinfo.h"
#include "being/petinfo.h"
#include "being/playerinfo.h"
#include "being/playerrelations.h"
@@ -147,7 +148,8 @@ void BeingPopup::show(const int x, const int y, Being *const b)
label6->setCaption("");
#ifdef EATHENA_SUPPORT
- if (b->getType() == ActorType::Pet)
+ const ActorType::Type type = b->getType();
+ if (type == ActorType::Pet)
{
PetInfo *const info = PlayerInfo::getPet();
if (info)
@@ -166,6 +168,25 @@ void BeingPopup::show(const int x, const int y, Being *const b)
label6 = nullptr;
}
}
+ else if (type == ActorType::Homunculus)
+ {
+ HomunculusInfo *const info = PlayerInfo::getHomunculus();
+ if (info)
+ {
+ // TRANSLATORS: being popup label
+ label1->setCaption(strprintf(_("Hungry: %d"),
+ info->hungry));
+ label1->adjustSize();
+ // TRANSLATORS: being popup label
+ label2->setCaption(strprintf(_("Intimacy: %d"),
+ info->intimacy));
+ label2->adjustSize();
+ label3 = nullptr;
+ label4 = nullptr;
+ label5 = nullptr;
+ label6 = nullptr;
+ }
+ }
else
#endif
{