diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-21 13:14:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-21 13:14:09 +0300 |
commit | 684e041568932a651aaeb09a1247f42860871a59 (patch) | |
tree | c1398692d694b01150b204a19199776b06a919a5 /src/gamemodifiers.cpp | |
parent | cfffcc941898c4163e1bd62b8e514d3535511666 (diff) | |
download | plus-684e041568932a651aaeb09a1247f42860871a59.tar.gz plus-684e041568932a651aaeb09a1247f42860871a59.tar.bz2 plus-684e041568932a651aaeb09a1247f42860871a59.tar.xz plus-684e041568932a651aaeb09a1247f42860871a59.zip |
move "change follow mode" option into gamemodifiers.
Diffstat (limited to 'src/gamemodifiers.cpp')
-rw-r--r-- | src/gamemodifiers.cpp | 29 |
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)); +} |