diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-25 23:17:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-25 23:17:02 +0300 |
commit | f155e142ea06262ed09720e5b7d11d1b9693f645 (patch) | |
tree | 19d85c0e0e9c6c4f8dd64cfae580984a4bef80da /src/gui | |
parent | 0146f872a63571027512cfaa9bc0433eb7e86430 (diff) | |
download | manaverse-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')
-rw-r--r-- | src/gui/popups/beingpopup.cpp | 23 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 1 |
2 files changed, 23 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 { diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 7d18b3c1d..642d060fc 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -777,6 +777,7 @@ void Viewport::mouseMoved(MouseEvent &event) if (mHoverBeing && (type == ActorType::Player || type == ActorType::Npc + || type == ActorType::Homunculus || type == ActorType::LocalPet || type == ActorType::Pet)) { |