summaryrefslogtreecommitdiff
path: root/src/gamemodifiers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gamemodifiers.cpp')
-rw-r--r--src/gamemodifiers.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index 3d74169ee..ccf3bfe11 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -39,6 +39,7 @@ GameModifiers::GameModifiers()
{
settings.crazyMoveType = config.getIntValue("crazyMoveType");
settings.moveToTargetType = config.getIntValue("moveToTargetType");
+ settings.followMode = config.getIntValue("followMode");
}
GameModifiers::~GameModifiers()
@@ -194,3 +195,31 @@ std::string GameModifiers::getMoveToTargetTypeString()
return gettext(getVarItem(&moveToTargetTypeStrings[0],
settings.moveToTargetType, moveToTargetTypeSize));
}
+
+static const unsigned followModeSize = 4;
+
+void GameModifiers::changeFollowMode(const bool forward)
+{
+ changeMode(&settings.followMode, followModeSize, "followMode",
+ &GameModifiers::getFollowModeString, 0, true, forward);
+}
+
+static const char *const followModeStrings[] =
+{
+ // TRANSLATORS: folow mode in status bar
+ N_("(D) default follow"),
+ // TRANSLATORS: folow mode in status bar
+ N_("(R) relative follow"),
+ // TRANSLATORS: folow mode in status bar
+ N_("(M) mirror follow"),
+ // TRANSLATORS: folow mode in status bar
+ N_("(P) pet follow"),
+ // TRANSLATORS: folow mode in status bar
+ N_("(?) unknown follow")
+};
+
+std::string GameModifiers::getFollowModeString()
+{
+ return gettext(getVarItem(&followModeStrings[0],
+ settings.followMode, followModeSize));
+}