summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-29 14:33:37 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-29 14:33:37 +0300
commitaae7a5ec7b6d962edd6620f1aedd468a6bc98e1a (patch)
tree4352a052e5254b0f16b56aab304dcb3ce107a59b /src/being
parentcd2a71bfc4d3339dd6cf18b5a311e57d58fb548c (diff)
downloadplus-aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a.tar.gz
plus-aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a.tar.bz2
plus-aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a.tar.xz
plus-aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a.zip
Add ability to show badges under nick.
Add option for select how show badges.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp14
-rw-r--r--src/being/being.h3
2 files changed, 10 insertions, 7 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 6cc8bae4b..f0cc40bd9 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -118,8 +118,7 @@ bool Being::mEnableReorderSprites = true;
bool Being::mHideErased = false;
Move Being::mMoveNames = Move_false;
bool Being::mUseDiagonal = true;
-bool Being::mShowBadges = true;
-bool Being::mShowBadgesTop = true;
+uint8_t Being::mShowBadges = 1;
int Being::mAwayEffect = -1;
std::list<BeingCacheEntry*> beingInfoCache;
@@ -1885,12 +1884,18 @@ void Being::drawEmotion(Graphics *const graphics,
{
int x;
int y;
- if (!mShowBadgesTop && mDispName && gui)
+ if (mShowBadges == 2 && mDispName && gui)
{
Font *const font = gui->getFont();
x = mDispName->getX() - offsetX + mDispName->getWidth();
y = mDispName->getY() - offsetY - font->getHeight();
}
+ else if (mShowBadges == 3 && mDispName && gui)
+ {
+ Font *const font = gui->getFont();
+ x = px + 8 - mBadgesCount * 8;
+ y = mDispName->getY() - offsetY;
+ }
else
{
x = px + 8 - mBadgesCount * 8;
@@ -2424,8 +2429,7 @@ void Being::reReadConfig()
mHideErased = config.getBoolValue("hideErased");
mMoveNames = fromBool(config.getBoolValue("moveNames"), Move);
mUseDiagonal = config.getBoolValue("useDiagonalSpeed");
- mShowBadges = config.getBoolValue("showBadges");
- mShowBadgesTop = config.getBoolValue("showBadgesTop");
+ mShowBadges = config.getIntValue("showBadges");
mUpdateConfigTime = cur_time;
}
diff --git a/src/being/being.h b/src/being/being.h
index 5d4c5d0ec..1f01001c3 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -1106,8 +1106,7 @@ class Being notfinal : public ActorSprite,
static bool mHideErased;
static Move mMoveNames;
static bool mUseDiagonal;
- static bool mShowBadges;
- static bool mShowBadgesTop;
+ static uint8_t mShowBadges;
static int mAwayEffect;
unsigned int mMoveTime;