From 92d592dce023fc155d7956e5e80f170f23b456f6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 Sep 2014 22:29:42 +0300 Subject: Show skill type in skill popup. --- src/gui/widgets/skillinfo.cpp | 50 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp index 01cb0cb16..6385cdd8d 100644 --- a/src/gui/widgets/skillinfo.cpp +++ b/src/gui/widgets/skillinfo.cpp @@ -90,15 +90,57 @@ void SkillInfo::update() } else { - // TRANSLATORS: skills dialog. skill level + // TRANSLATORS: skill level skillLevel = strprintf(_("Lvl: %d"), baseLevel); } + // TRANSLATORS: skill type + const char *const typeStr = _("Type: %s"); + switch (type) + { + case SkillType::Unknown: + // TRANSLATORS: Skill type + skillEffect = strprintf(typeStr, _("Unknown")); + break; + + case SkillType::Attack: + // TRANSLATORS: Skill type + skillEffect = strprintf(typeStr, _("Attack")); + break; + + case SkillType::Ground: + // TRANSLATORS: Skill type + skillEffect = strprintf(typeStr, _("Ground")); + break; + + case SkillType::Self: + // TRANSLATORS: Skill type + skillEffect = strprintf(typeStr, _("Self")); + break; + + case SkillType::Unused: + // TRANSLATORS: Skill type + skillEffect = strprintf(typeStr, _("Unused")); + break; + + case SkillType::Support: + // TRANSLATORS: Skill type + skillEffect = strprintf(typeStr, _("Support")); + break; + + case SkillType::TargetTrap: + // TRANSLATORS: Skill type + skillEffect = strprintf(typeStr, _("Target trap")); + break; + default: + // TRANSLATORS: Skill type + skillEffect = strprintf(typeStr, _("Unknown:")); + skillEffect.append(" ").append(toString(type)); + break; + } if (sp) - skillEffect = strprintf(_("Mana: -%d"), sp); - else - skillEffect.clear(); + skillEffect.append(strprintf(_(" / Mana: -%d"), sp)); if (range > 0) { -- cgit v1.2.3-70-g09d2