From bee3a0e524c3d02eb754c7096c259748c35605f6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 20 Nov 2013 16:41:58 +0300 Subject: add option to enable/disable map tiles animations. Misc \ Map \ Play map animations. --- src/defaults.cpp | 1 + src/gui/widgets/tabs/setup_other.cpp | 4 ++++ src/resources/mapreader.cpp | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2