diff options
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r-- | src/gui/skilldialog.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index be46132e..5b3314d1 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -24,6 +24,7 @@ #include "log.h" #include "playerinfo.h" #include "configuration.h" +#include "listener.h" #include "gui/setup.h" @@ -211,6 +212,8 @@ private: SkillDialog::SkillDialog(): Window(_("Skills")) { + listen(CHANNEL_ATTRIBUTES); + setWindowName("Skills"); setCloseButton(true); setResizable(true); @@ -277,6 +280,17 @@ void SkillDialog::update() } } +void SkillDialog::event(Channels channel, const Mana::Event &event) +{ + if (event.getName() == EVENT_UPDATEATTRIBUTE) + { + if (event.getInt("id") == SKILL_POINTS) + { + update(); + } + } +} + void SkillDialog::loadSkills(const std::string &file) { // Fixes issues with removing tabs |