summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/skillinfo.cpp3
-rw-r--r--src/gui/widgets/skillinfo.h1
-rw-r--r--src/gui/windows/skilldialog.cpp8
3 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp
index 36ae85de9..50725db29 100644
--- a/src/gui/widgets/skillinfo.cpp
+++ b/src/gui/widgets/skillinfo.cpp
@@ -57,7 +57,8 @@ SkillInfo::SkillInfo() :
type(SkillType::Unknown),
owner(SkillOwner::Player),
modifiable(false),
- visible(false)
+ visible(false),
+ alwaysVisible(false)
{
dataMap[0] = new SkillData();
data = dataMap[0];
diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h
index c67e055e0..45b0487c8 100644
--- a/src/gui/widgets/skillinfo.h
+++ b/src/gui/widgets/skillinfo.h
@@ -66,6 +66,7 @@ struct SkillInfo final
SkillOwner::Type owner;
bool modifiable;
bool visible;
+ bool alwaysVisible;
SkillInfo();
A_DELETE_COPY(SkillInfo)
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index bceb8645c..481f8e3c2 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -243,7 +243,8 @@ void SkillDialog::hideSkills(const SkillOwner::Type owner)
if (info && info->owner == owner)
{
PlayerInfo::setSkillLevel(info->id, 0);
- info->visible = false;
+ if (!info->alwaysVisible)
+ info->visible = false;
}
}
}
@@ -316,7 +317,6 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
skill = new SkillInfo;
skill->id = static_cast<unsigned int>(id);
skill->modifiable = false;
- skill->visible = false;
skill->model = model;
skill->update();
skill->useButton = XML::getProperty(
@@ -325,6 +325,9 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
node, "owner", "player"));
skill->errorText = XML::getProperty(
node, "errorText", name);
+ skill->alwaysVisible = XML::getBoolProperty(
+ node, "alwaysVisible", false);
+ skill->visible = skill->alwaysVisible;
model->addSkill(skill);
mSkills[id] = skill;
}
@@ -442,6 +445,7 @@ void SkillDialog::addSkill(const SkillOwner::Type owner,
data->shortName = toString(skill->id);
skill->modifiable = modifiable;
skill->visible = false;
+ skill->alwaysVisible = false;
skill->model = mDefaultModel;
skill->level = level;
// TRANSLATORS: skills dialog. skill level