summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-20 16:41:58 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-20 16:41:58 +0300
commitbee3a0e524c3d02eb754c7096c259748c35605f6 (patch)
tree4082e98ee0317ebcc26bc05f9b3e3a22780ec1a0
parentd29f0000a85334cae0388f8a9b50b3f2de39dac7 (diff)
downloadplus-bee3a0e524c3d02eb754c7096c259748c35605f6.tar.gz
plus-bee3a0e524c3d02eb754c7096c259748c35605f6.tar.bz2
plus-bee3a0e524c3d02eb754c7096c259748c35605f6.tar.xz
plus-bee3a0e524c3d02eb754c7096c259748c35605f6.zip
add option to enable/disable map tiles animations.
Misc \ Map \ Play map animations.
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/gui/widgets/tabs/setup_other.cpp4
-rw-r--r--src/resources/mapreader.cpp2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index d4b2a5379..06cb40b5f 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -353,6 +353,7 @@ DefaultsData* getConfigDefaults()
AddDEF("storageSortOrder", 0);
AddDEF("buySortOrder", 0);
AddDEF("showmotd", false);
+ AddDEF("playMapAnimations", true);
return configData;
}
diff --git a/src/gui/widgets/tabs/setup_other.cpp b/src/gui/widgets/tabs/setup_other.cpp
index b59edfd4a..b03cf5f41 100644
--- a/src/gui/widgets/tabs/setup_other.cpp
+++ b/src/gui/widgets/tabs/setup_other.cpp
@@ -168,6 +168,10 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
new SetupItemCheckBox(_("Auto resize minimaps"), "", "autoresizeminimaps",
this, "autoresizeminimapsEvent");
+ // TRANSLATORS: settings option
+ new SetupItemCheckBox(_("Play map animations"), "", "playMapAnimations",
+ this, "playMapAnimationsEvent");
+
// TRANSLATORS: settings group
new SetupItemLabel(_("Moving"), "", this);
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index a1b087102..1e94b06f2 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -900,7 +900,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node, const std::string &path,
}
// create animation
- if (!set)
+ if (!set || !config.getBoolValue("playMapAnimations"))
continue;
Animation *ani = new Animation;