diff options
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r-- | src/gui/skilldialog.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index 53528cee..168553f6 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -21,11 +21,11 @@ #include "gui/skilldialog.h" -#include "localplayer.h" #include "log.h" +#include "playerinfo.h" +#include "configuration.h" #include "gui/setup.h" -#include "gui/theme.h" #include "gui/widgets/button.h" #include "gui/widgets/container.h" @@ -43,6 +43,7 @@ #include "resources/image.h" #include "resources/resourcemanager.h" +#include "resources/theme.h" #include "utils/dtor.h" #include "utils/gettext.h" @@ -87,7 +88,8 @@ struct SkillInfo } else { - icon = Theme::getImageFromTheme("unknown-item.png"); + icon = Theme::getImageFromTheme( + paths.getStringValue("unknownItemFile")); } } @@ -240,10 +242,6 @@ void SkillDialog::action(const gcn::ActionEvent &event) { setVisible(false); } - else - { - printf("Unknown event '%s'\n", event.getId().c_str()); - } } std::string SkillDialog::update(int id) @@ -263,7 +261,7 @@ std::string SkillDialog::update(int id) void SkillDialog::update() { mPointsLabel->setCaption(strprintf(_("Skill points available: %d"), - player_node->getSkillPoints())); + PlayerInfo::getAttribute(SKILL_POINTS))); mPointsLabel->adjustSize(); for (SkillMap::iterator it = mSkills.begin(); it != mSkills.end(); it++) @@ -414,10 +412,10 @@ void SkillModel::updateVisibilities() void SkillInfo::update() { - int baseLevel = player_node->getAttributeBase(id); - int effLevel = player_node->getAttributeEffective(id); + int baseLevel = PlayerInfo::getStatBase(id); + int effLevel = PlayerInfo::getStatEffective(id); - std::pair<int, int> exp = player_node->getExperience(id); + std::pair<int, int> exp = PlayerInfo::getStatExperience(id); if (!modifiable && baseLevel == 0 && effLevel == 0 && exp.second == 0) { |