summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-03 00:25:03 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-03 01:01:11 +0300
commit4f6d9da4e83a23a4531ce63006f669daf4992c69 (patch)
treeef303ed0dd2380665963a67bc189f43af9fbc040 /src
parent20f5a9d3754bd598f091ae7e66fa0294800f9b30 (diff)
downloadplus-4f6d9da4e83a23a4531ce63006f669daf4992c69.tar.gz
plus-4f6d9da4e83a23a4531ce63006f669daf4992c69.tar.bz2
plus-4f6d9da4e83a23a4531ce63006f669daf4992c69.tar.xz
plus-4f6d9da4e83a23a4531ce63006f669daf4992c69.zip
Add option into paths.xml for allow/deny add unknown skills into auto tab.
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp1
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/gui/windows/skilldialog.cpp1
-rw-r--r--src/settings.h4
4 files changed, 6 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 97857310b..f437f25d5 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1734,6 +1734,7 @@ void Client::initPaths()
"playerNameOffset");
settings.playerBadgeAtRightOffset = paths.getIntValue(
"playerBadgeAtRightOffset");
+ settings.unknownSkillsAutoTab = paths.getBoolValue("unknownSkillsAutoTab");
}
void Client::initTradeFilter()
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 8f443d892..8cdc6bf78 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -697,6 +697,7 @@ DefaultsData* getPathsDefaults()
AddDEF("supportSkillIcon", "graphics/sprites/error.png");
AddDEF("trapSkillIcon", "graphics/sprites/error.png");
AddDEF("missingSkillIcon", "graphics/sprites/error.png");
+ AddDEF("unknownSkillsAutoTab", true);
AddDEF("overweightPercent", 50);
AddDEF("playerNameOffset", 64);
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 737fdfdf3..615ac8319 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -723,6 +723,7 @@ void SkillDialog::addSkill(const SkillOwner::Type owner,
data->setIcon(icon);
data->haveIcon = true;
}
+ data->autoTab = settings.unknownSkillsAutoTab;
data->shortName = toString(skill->id);
skill->modifiable = modifiable;
skill->visible = Visible_false;
diff --git a/src/settings.h b/src/settings.h
index 7eefc0406..760ee3e37 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -91,7 +91,8 @@ class Settings final
disableLoggingInGame(false),
legacyEffects(true),
enableRemoteCommands(true),
- uselonglivesprites(false)
+ uselonglivesprites(false),
+ unknownSkillsAutoTab(true)
{ }
A_DELETE_COPY(Settings)
@@ -155,6 +156,7 @@ class Settings final
bool legacyEffects;
bool enableRemoteCommands;
bool uselonglivesprites;
+ bool unknownSkillsAutoTab;
};
extern Settings settings;