From 9b68f83d94a706de6ba932fe7bfb7f5158cfecb1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 27 Jul 2015 22:00:16 +0300 Subject: Add option for show badges at top or char or after name. --- src/being/being.cpp | 4 +++- src/being/being.h | 1 + src/defaults.cpp | 1 + src/gui/widgets/tabs/setup_players.cpp | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/being/being.cpp b/src/being/being.cpp index 2d731f77a..4112ef634 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -118,6 +118,7 @@ bool Being::mHideErased = false; Move Being::mMoveNames = Move_false; bool Being::mUseDiagonal = true; bool Being::mShowBadges = true; +bool Being::mShowBadgesTop = true; int Being::mAwayEffect = -1; std::list beingInfoCache; @@ -1849,7 +1850,7 @@ void Being::drawEmotion(Graphics *const graphics, mAnimationEffect->draw(graphics, px, py); if (mTeamBadge && mShowBadges) { - if (mDispName && gui) + if (!mShowBadgesTop && mDispName && gui) { Font *const font = gui->getFont(); mTeamBadge->draw(graphics, @@ -2374,6 +2375,7 @@ void Being::reReadConfig() mMoveNames = fromBool(config.getBoolValue("moveNames"), Move); mUseDiagonal = config.getBoolValue("useDiagonalSpeed"); mShowBadges = config.getBoolValue("showBadges"); + mShowBadgesTop = config.getBoolValue("showBadgesTop"); mUpdateConfigTime = cur_time; } diff --git a/src/being/being.h b/src/being/being.h index e73789434..e58cbcb90 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -1104,6 +1104,7 @@ class Being notfinal : public ActorSprite, static Move mMoveNames; static bool mUseDiagonal; static bool mShowBadges; + static bool mShowBadgesTop; static int mAwayEffect; unsigned int mMoveTime; diff --git a/src/defaults.cpp b/src/defaults.cpp index ac4e5ebb0..630120cff 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -381,6 +381,7 @@ DefaultsData* getConfigDefaults() AddDEF("disableLoggingInGame", false); AddDEF("sellShopName", "unnamed"); AddDEF("showBadges", true); + AddDEF("showBadgesTop", true); return configData; } diff --git a/src/gui/widgets/tabs/setup_players.cpp b/src/gui/widgets/tabs/setup_players.cpp index 1872cd216..82f8b0115 100644 --- a/src/gui/widgets/tabs/setup_players.cpp +++ b/src/gui/widgets/tabs/setup_players.cpp @@ -73,6 +73,10 @@ Setup_Players::Setup_Players(const Widget2 *const widget) : new SetupItemCheckBox(_("Show badges"), "", "showBadges", this, "showBadgesEvent"); + // TRANSLATORS: settings option + new SetupItemCheckBox(_("Show badges at top"), "", + "showBadgesTop", this, "showBadgesTopEvent"); + // TRANSLATORS: settings option new SetupItemCheckBox(_("Secure trades"), "", "securetrades", this, "securetradesEvent"); -- cgit v1.2.3-70-g09d2