summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-29 21:26:43 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-30 02:25:05 +0300
commitca9e91c47d2a5ca4027329311b00a12f5647b5d6 (patch)
tree4c2a7076bfdac36b603cb9fbb214f0cbecd8f356 /src/actormanager.cpp
parenteeda67071df6b6a2021292b1aeea4e16903c4007 (diff)
downloadmanaplus-ca9e91c47d2a5ca4027329311b00a12f5647b5d6.tar.gz
manaplus-ca9e91c47d2a5ca4027329311b00a12f5647b5d6.tar.bz2
manaplus-ca9e91c47d2a5ca4027329311b00a12f5647b5d6.tar.xz
manaplus-ca9e91c47d2a5ca4027329311b00a12f5647b5d6.zip
Add option to show player name at top or at bottom.
Add also enum for badge draw type.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index ebc3dc50e..172472072 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -243,6 +243,7 @@ ActorManager::ActorManager() :
config.addListener("extMouseTargeting", this);
config.addListener("showBadges", this);
config.addListener("enableIdCollecting", this);
+ config.addListener("visiblenamespos", this);
loadAttackList();
}
@@ -1835,6 +1836,8 @@ void ActorManager::optionChanged(const std::string &name)
mExtMouseTargeting = config.getBoolValue("extMouseTargeting");
else if (name == "showBadges")
updateBadges();
+ else if (name == "visiblenamespos")
+ updateBadges();
else if (name == "enableIdCollecting")
mEnableIdCollecting = config.getBoolValue("enableIdCollecting");
}
@@ -2122,16 +2125,19 @@ Being *ActorManager::cloneBeing(const Being *const srcBeing,
void ActorManager::updateBadges() const
{
- const uint8_t showBadges = CAST_U8(
+ const BadgeDrawType::Type showBadges = static_cast<BadgeDrawType::Type>(
config.getIntValue("showBadges"));
Being::mShowBadges = showBadges;
+ Being::mVisibleNamePos = static_cast<VisibleNamePos::Type>(
+ config.getIntValue("visiblenamespos"));
+
for_actors
{
ActorSprite *const actor = *it;
if (actor->getType() == ActorType::Player)
{
Being *const being = static_cast<Being*>(actor);
- being->showBadges(showBadges != 0u);
+ being->showBadges(showBadges != BadgeDrawType::Hide);
}
}
}