diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-11-28 21:44:07 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-11-28 21:44:07 +0100 |
commit | ca1312310942976b286f753c8e50b959661f57c5 (patch) | |
tree | d63d25d1b7a5ba8296c4e4685c9f4da72674dc3b /crawl-ref/source/tilereg-skl.cc | |
parent | d984541dc54249264236b8333ab253af8cd508d8 (diff) | |
download | crawl-ref-ca1312310942976b286f753c8e50b959661f57c5.tar.gz crawl-ref-ca1312310942976b286f753c8e50b959661f57c5.zip |
Also display the skill progress in the skill tab mouseover.
Diffstat (limited to 'crawl-ref/source/tilereg-skl.cc')
-rw-r--r-- | crawl-ref/source/tilereg-skl.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg-skl.cc b/crawl-ref/source/tilereg-skl.cc index 908f21aa7c..4cfeccd6c3 100644 --- a/crawl-ref/source/tilereg-skl.cc +++ b/crawl-ref/source/tilereg-skl.cc @@ -44,9 +44,19 @@ void SkillRegion::draw_tag() const skill_type skill = (skill_type) idx; const int apt = species_apt(skill, you.species); - std::string desc = make_stringf("%-14s Skill %2d Aptitude %c%d", + + std::string progress = ""; + // Don't display progress when unskilled or expert. + if (you.skills[skill] > 0 && you.skills[skill] < 27) + { + progress = make_stringf("(%d%%) ", + get_skill_percentage(skill)); + } + + std::string desc = make_stringf("%-14s Skill %2d %s Aptitude %c%d", skill_name(skill), you.skills[skill], + progress.c_str(), apt > 0 ? '+' : ' ', apt); |