diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-12 22:11:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-13 00:47:48 +0300 |
commit | 5e70bf11d9715dec5678f787cee838ddbaaaf063 (patch) | |
tree | 75b18603dd649626aee29a1e2cfd51aef61bf582 /src/gui/popups | |
parent | f085c8aed70d5efaaccfa7a4e2cac4a840935165 (diff) | |
download | ManaVerse-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.gz ManaVerse-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.bz2 ManaVerse-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.xz ManaVerse-5e70bf11d9715dec5678f787cee838ddbaaaf063.zip |
Show group name in being popup and status window.
Diffstat (limited to 'src/gui/popups')
-rw-r--r-- | src/gui/popups/beingpopup.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index 015134c9f..c9e9e8608 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -35,6 +35,8 @@ #include "resources/chatobject.h" +#include "resources/db/groupdb.h" + #include "utils/gettext.h" #include "utils/foreach.h" #include "utils/stringutils.h" @@ -168,6 +170,19 @@ void BeingPopup::show(const int x, const int y, Being *const b) } else { + const int groupId = b->getGroupId(); + const std::string groupName = GroupDb::getLongName(groupId); + if (!groupName.empty()) + { + ptr = mLabels[num]; + // TRANSLATORS: being popup label + ptr->setCaption(strprintf(_("Group: %s (%d)"), + groupName.c_str(), + groupId)); + ptr->adjustSize(); + num ++; + } + if (!(b->getPartyName().empty())) { ptr = mLabels[num]; |