summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/skillinfo.cpp18
-rw-r--r--src/gui/widgets/skillinfo.h1
2 files changed, 17 insertions, 2 deletions
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp
index 2047ea31c..bf8367689 100644
--- a/src/gui/widgets/skillinfo.cpp
+++ b/src/gui/widgets/skillinfo.cpp
@@ -46,6 +46,7 @@ SkillInfo::SkillInfo() :
model(nullptr),
data(nullptr),
level(0),
+ selectedLevel(0),
skillLevelWidth(0),
id(0),
range(0),
@@ -96,8 +97,18 @@ void SkillInfo::update()
}
else
{
- // TRANSLATORS: skill level
- skillLevel = strprintf(_("Lvl: %d"), baseLevel);
+ if (!selectedLevel)
+ {
+ // TRANSLATORS: skill level
+ skillLevel = strprintf(_("Lvl: %d"), baseLevel);
+ }
+ else
+ {
+ // TRANSLATORS: skill level
+ skillLevel = strprintf(_("Lvl: %d / %d"),
+ selectedLevel,
+ baseLevel);
+ }
}
// TRANSLATORS: skill type
@@ -156,6 +167,9 @@ void SkillInfo::update()
}
level = baseLevel;
+ if (selectedLevel > level)
+ selectedLevel = level;
+
skillLevelWidth = -1;
if (updateVisibility && model)
diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h
index 95099db2c..55ecd004a 100644
--- a/src/gui/widgets/skillinfo.h
+++ b/src/gui/widgets/skillinfo.h
@@ -57,6 +57,7 @@ struct SkillInfo final
SkillModel *model;
SkillData *data;
int level;
+ int selectedLevel;
int skillLevelWidth;
unsigned int id;
int range;