diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-31 18:58:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-31 18:58:36 +0300 |
commit | 97109e6260af3eab9c2fd7bae7dbcd0935f70da7 (patch) | |
tree | 7163ff8b848be764061444e937e3f8dc9a35b0e1 | |
parent | b0e37be06900f3889dfe9dffa55d799cad2f1f36 (diff) | |
download | mv-97109e6260af3eab9c2fd7bae7dbcd0935f70da7.tar.gz mv-97109e6260af3eab9c2fd7bae7dbcd0935f70da7.tar.bz2 mv-97109e6260af3eab9c2fd7bae7dbcd0935f70da7.tar.xz mv-97109e6260af3eab9c2fd7bae7dbcd0935f70da7.zip |
Add paths.xml option for set bandge offset.
it used if need show badges at right and names is hidden.
-rw-r--r-- | src/being/being.cpp | 2 | ||||
-rw-r--r-- | src/client.cpp | 2 | ||||
-rw-r--r-- | src/defaults.cpp | 3 | ||||
-rw-r--r-- | src/settings.h | 2 |
4 files changed, 7 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 31ea99b27..c051d3038 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2309,7 +2309,7 @@ void Being::drawEmotion(Graphics *restrict const graphics, { if (mShowBadges == BadgeDrawType::Right) { - x = px + getWidth(); + x = px + settings.playerBadgeAtRightOffset; y = py; } else if (mShowBadges == BadgeDrawType::Bottom) diff --git a/src/client.cpp b/src/client.cpp index 57e870b05..97857310b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1732,6 +1732,8 @@ void Client::initPaths() settings.overweightPercent = paths.getIntValue("overweightPercent"); settings.playerNameOffset = paths.getIntValue( "playerNameOffset"); + settings.playerBadgeAtRightOffset = paths.getIntValue( + "playerBadgeAtRightOffset"); } void Client::initTradeFilter() diff --git a/src/defaults.cpp b/src/defaults.cpp index 934683f57..ab377d31f 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -691,7 +691,8 @@ DefaultsData* getPathsDefaults() AddDEF("defaultPaletteFile", "palette.gpl"); AddDEF("overweightPercent", 50); - AddDEF("playerNameStandOffset", 64); + AddDEF("playerNameOffset", 64); + AddDEF("playerBadgeAtRightOffset", 32); #ifdef TMWA_SUPPORT AddDEF("gmDefaultLevel", 60); diff --git a/src/settings.h b/src/settings.h index 7570e0df2..7eefc0406 100644 --- a/src/settings.h +++ b/src/settings.h @@ -77,6 +77,7 @@ class Settings final targetingType(0U), overweightPercent(50U), playerNameOffset(64), + playerBadgeAtRightOffset(32), mapDrawType(MapType::NORMAL), emoteType(EmoteType::Player), persistentIp(true), @@ -139,6 +140,7 @@ class Settings final unsigned int targetingType; unsigned int overweightPercent; int playerNameOffset; + int playerBadgeAtRightOffset; MapTypeT mapDrawType; EmoteTypeT emoteType; bool persistentIp; |