summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-22 16:05:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-22 16:05:28 +0300
commit35263d0f161f59f2dec6586c61970eaf1ce2f6f1 (patch)
tree2004db11a5c4b5645acc2d0c16c9e5ac059585d2
parent2abc581201575cf20f39eda61ccea02c98b9435d (diff)
downloadmanaverse-35263d0f161f59f2dec6586c61970eaf1ce2f6f1.tar.gz
manaverse-35263d0f161f59f2dec6586c61970eaf1ce2f6f1.tar.bz2
manaverse-35263d0f161f59f2dec6586c61970eaf1ce2f6f1.tar.xz
manaverse-35263d0f161f59f2dec6586c61970eaf1ce2f6f1.zip
move "change map draw type" option into gamemodifiers.
-rw-r--r--src/being/localplayer.cpp28
-rw-r--r--src/being/localplayer.h2
-rw-r--r--src/gamemodifiers.cpp30
-rw-r--r--src/gamemodifiers.h2
-rw-r--r--src/gui/popups/statuspopup.cpp2
-rw-r--r--src/gui/windows/statuswindow.cpp2
6 files changed, 34 insertions, 32 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index e74abeb40..312efacd9 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -1255,34 +1255,6 @@ void LocalPlayer::changeMode(unsigned *restrict const var,
debugMsg(str.substr(4));
}
-const unsigned mapDrawTypeSize = 7;
-
-static const char *const mapDrawTypeStrings[] =
-{
- // TRANSLATORS: map view type in status bar
- N_("(N) normal map view"),
- // TRANSLATORS: map view type in status bar
- N_("(D) debug map view"),
- // TRANSLATORS: map view type in status bar
- N_("(u) ultra map view"),
- // TRANSLATORS: map view type in status bar
- N_("(U) ultra map view 2"),
- // TRANSLATORS: map view type in status bar
- N_("(e) empty map view with collision"),
- // TRANSLATORS: map view type in status bar
- N_("(E) empty map view"),
- // TRANSLATORS: map view type in status bar
- N_("(b) black & white map view"),
- // TRANSLATORS: pickup size in status bar
- N_("(?) map view")
-};
-
-std::string LocalPlayer::getMapDrawTypeString()
-{
- return gettext(getVarItem(&mapDrawTypeStrings[0],
- viewport->getMapDrawType(), mapDrawTypeSize));
-}
-
const unsigned awayModeSize = 2;
void LocalPlayer::changeAwayMode()
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 8e32b8d14..cf604a1ca 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -392,8 +392,6 @@ class LocalPlayer final : public Being,
void setTestParticle(const std::string &fileName,
const bool updateHash = true);
- static std::string getMapDrawTypeString();
-
std::string getAwayModeString();
static std::string getCameraModeString();
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index 777d7e9f0..e7182c450 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -25,6 +25,8 @@
#include "being/localplayer.h"
+#include "gui/viewport.h"
+
#include "gui/widgets/tabs/chattab.h"
#include "listeners/updatestatuslistener.h"
@@ -462,3 +464,31 @@ std::string GameModifiers::getGameModifiersString()
return gettext(getVarItem(&gameModifiersStrings[0],
settings.disableGameModifiers, gameModifiersSize));
}
+
+const unsigned mapDrawTypeSize = 7;
+
+static const char *const mapDrawTypeStrings[] =
+{
+ // TRANSLATORS: map view type in status bar
+ N_("(N) normal map view"),
+ // TRANSLATORS: map view type in status bar
+ N_("(D) debug map view"),
+ // TRANSLATORS: map view type in status bar
+ N_("(u) ultra map view"),
+ // TRANSLATORS: map view type in status bar
+ N_("(U) ultra map view 2"),
+ // TRANSLATORS: map view type in status bar
+ N_("(e) empty map view with collision"),
+ // TRANSLATORS: map view type in status bar
+ N_("(E) empty map view"),
+ // TRANSLATORS: map view type in status bar
+ N_("(b) black & white map view"),
+ // TRANSLATORS: pickup size in status bar
+ N_("(?) map view")
+};
+
+std::string GameModifiers::getMapDrawTypeString()
+{
+ return gettext(getVarItem(&mapDrawTypeStrings[0],
+ viewport->getMapDrawType(), mapDrawTypeSize));
+}
diff --git a/src/gamemodifiers.h b/src/gamemodifiers.h
index 283ebb4bb..75b871136 100644
--- a/src/gamemodifiers.h
+++ b/src/gamemodifiers.h
@@ -92,6 +92,8 @@ class GameModifiers final
std::string getGameModifiersString();
+ std::string getMapDrawTypeString();
+
protected:
static const char *getVarItem(const char *const *const arr,
const unsigned index,
diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp
index b1fcb2b20..476871e0b 100644
--- a/src/gui/popups/statuspopup.cpp
+++ b/src/gui/popups/statuspopup.cpp
@@ -156,7 +156,7 @@ void StatusPopup::updateLabels() const
InputAction::SWITCH_QUICK_DROP);
setLabelText(7, modifiers->getPickUpTypeString(),
InputAction::CHANGE_PICKUP_TYPE);
- setLabelText(8, LocalPlayer::getMapDrawTypeString(),
+ setLabelText(8, modifiers->getMapDrawTypeString(),
InputAction::PATHFIND);
setLabelText(9, modifiers->getMagicAttackString(),
InputAction::SWITCH_MAGIC_ATTACK);
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index aac148d42..a371f9b52 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -656,7 +656,7 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar,
modifiers->getQuickDropCounterString()))
.append(translateLetter2(modifiers->getPickUpTypeString()))
.append(" ").append(translateLetter2(
- LocalPlayer::getMapDrawTypeString()))
+ modifiers->getMapDrawTypeString()))
.append(" ").append(translateLetter2(
modifiers->getImitationModeString()))
.append(translateLetter2(LocalPlayer::getCameraModeString()))