diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-22 00:24:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-22 00:24:58 +0300 |
commit | 57e10676912d5506ff3cab9edbb77335828d597c (patch) | |
tree | 634144b0d290403c2a157148bab2b79284da50cf /src/gamemodifiers.cpp | |
parent | 90bfc776dc4975c523c4c35fb0778cd9b77dc164 (diff) | |
download | manaplus-57e10676912d5506ff3cab9edbb77335828d597c.tar.gz manaplus-57e10676912d5506ff3cab9edbb77335828d597c.tar.bz2 manaplus-57e10676912d5506ff3cab9edbb77335828d597c.tar.xz manaplus-57e10676912d5506ff3cab9edbb77335828d597c.zip |
move "change imitation mode" option into gamemodifiers.
Diffstat (limited to 'src/gamemodifiers.cpp')
-rw-r--r-- | src/gamemodifiers.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp index 5ce9dd63b..bb1907a37 100644 --- a/src/gamemodifiers.cpp +++ b/src/gamemodifiers.cpp @@ -46,6 +46,7 @@ GameModifiers::GameModifiers() settings.pickUpType = config.getIntValue("pickUpType"); settings.magicAttackType = config.getIntValue("magicAttackType"); settings.pvpAttackType = config.getIntValue("pvpAttackType"); + settings.imitationMode = config.getIntValue("imitationMode"); } GameModifiers::~GameModifiers() @@ -410,3 +411,27 @@ std::string GameModifiers::getPvpAttackTypeString() return gettext(getVarItem(&pvpAttackTypeStrings[0], settings.pvpAttackType, pvpAttackTypeSize)); } + +const unsigned imitationModeSize = 2; + +void GameModifiers::changeImitationMode(const bool forward) +{ + changeMode(&settings.imitationMode, imitationModeSize, "imitationMode", + &GameModifiers::getImitationModeString, 0, true, forward); +} + +static const char *const imitationModeStrings[] = +{ + // TRANSLATORS: imitation type in status bar + N_("(D) default imitation"), + // TRANSLATORS: imitation type in status bar + N_("(O) outfits imitation"), + // TRANSLATORS: imitation type in status bar + N_("(?) imitation") +}; + +std::string GameModifiers::getImitationModeString() +{ + return gettext(getVarItem(&imitationModeStrings[0], + settings.imitationMode, imitationModeSize)); +} |