diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-19 01:10:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-19 01:10:55 +0300 |
commit | 81c73d43071de8ac22af1b7b9174cab1809203ba (patch) | |
tree | f66232c757092af8411a8abdc79906455f64bb0c | |
parent | e9e343366fbfbe9a6343089ff113354524f3f306 (diff) | |
download | mv-81c73d43071de8ac22af1b7b9174cab1809203ba.tar.gz mv-81c73d43071de8ac22af1b7b9174cab1809203ba.tar.bz2 mv-81c73d43071de8ac22af1b7b9174cab1809203ba.tar.xz mv-81c73d43071de8ac22af1b7b9174cab1809203ba.zip |
in emotes popup show also emote id.
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.cpp | 3 | ||||
-rw-r--r-- | src/resources/db/emotedb.cpp | 3 | ||||
-rw-r--r-- | src/resources/db/emotedb.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index fa413452f..d080a6072 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -220,8 +220,9 @@ void EmoteShortcutContainer::mouseMoved(gcn::MouseEvent &event) if (static_cast<unsigned>(index) < mEmoteImg.size() && mEmoteImg[index]) { + const EmoteSprite *const sprite = mEmoteImg[index]; mEmotePopup->show(viewport->getMouseX(), viewport->getMouseY(), - mEmoteImg[index]->name); + strprintf("%s, %d", sprite->name.c_str(), sprite->id)); } } diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp index 594bcce5d..97ea95aa0 100644 --- a/src/resources/db/emotedb.cpp +++ b/src/resources/db/emotedb.cpp @@ -49,6 +49,7 @@ void EmoteDB::load() unknownSprite->sprite = AnimatedSprite::load( paths.getStringValue("spriteErrorFile")); unknownSprite->name = "unknown"; + unknownSprite->id = 0; mUnknown.sprites.push_back(unknownSprite); logger->log1("Initializing emote database..."); @@ -122,6 +123,7 @@ void EmoteDB::loadXmlFile(const std::string &fileName) XML::getProperty(spriteNode, "variant", 0)); currentSprite->name = XML::langProperty( spriteNode, "name", ""); + currentSprite->id = id; currentInfo->sprites.push_back(currentSprite); } else if (xmlNameEqual(spriteNode, "particlefx")) @@ -194,6 +196,7 @@ void EmoteDB::loadSpecialXmlFile(const std::string &fileName) XML::getProperty(spriteNode, "variant", 0)); currentSprite->name = XML::langProperty( spriteNode, "name", ""); + currentSprite->id = id; currentInfo->sprites.push_back(currentSprite); } else if (xmlNameEqual(spriteNode, "particlefx")) diff --git a/src/resources/db/emotedb.h b/src/resources/db/emotedb.h index f00bfbb47..02683a99a 100644 --- a/src/resources/db/emotedb.h +++ b/src/resources/db/emotedb.h @@ -35,12 +35,14 @@ struct EmoteSprite final { EmoteSprite() : sprite(nullptr), + id(0), name() { } A_DELETE_COPY(EmoteSprite) const AnimatedSprite *sprite; + int id; std::string name; }; |