diff options
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r-- | src/gui/skilldialog.cpp | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index 16c983ad..4afd92ac 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -19,28 +19,30 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <guichan/widgets/label.hpp> -#include <guichan/widgets/container.hpp> -#include <guichan/widgets/icon.hpp> +#include "gui/skilldialog.h" + +#include "gui/icon.h" +#include "gui/button.h" +#include "gui/listbox.h" +#include "gui/scrollarea.h" +#include "gui/windowcontainer.h" +#include "gui/progressbar.h" -#include "skilldialog.h" +#include "gui/widgets/tabbedarea.h" -#include "icon.h" -#include "button.h" -#include "listbox.h" -#include "scrollarea.h" -#include "windowcontainer.h" -#include "progressbar.h" +#include "localplayer.h" -#include "widgets/tabbedarea.h" +#include "utils/dtor.h" +#include "utils/gettext.h" +#include "utils/stringutils.h" -#include "../localplayer.h" +#include <guichan/widgets/label.hpp> +#include <guichan/widgets/container.hpp> +#include <guichan/widgets/icon.hpp> -#include "../utils/dtor.h" -#include "../utils/gettext.h" -#include "../utils/stringutils.h" +#include <vector> -class Skill_Tab : public GCContainer, public gcn::ActionListener +class SkillTab : public GCContainer, public gcn::ActionListener { public: /** @@ -51,7 +53,7 @@ class Skill_Tab : public GCContainer, public gcn::ActionListener /** * Constructor */ - Skill_Tab(const std::string &type); + SkillTab(const std::string &type); /** * Update this tab @@ -105,18 +107,18 @@ SkillDialog::SkillDialog(): TabbedArea *panel = new TabbedArea; panel->setDimension(gcn::Rectangle(5, 5, 270, 420)); - Skill_Tab *tab; + SkillTab *tab; // Add each type of skill tab to the panel - tab = new Skill_Tab("Weapon"); + tab = new SkillTab("Weapon"); panel->addTab(_("Weapons"), tab); mTabs.push_back(tab); - tab = new Skill_Tab("Magic"); + tab = new SkillTab("Magic"); panel->addTab(_("Magic"), tab); mTabs.push_back(tab); - tab = new Skill_Tab("Craft"); + tab = new SkillTab("Craft"); panel->addTab(_("Crafts"), tab); mTabs.push_back(tab); @@ -153,14 +155,14 @@ void SkillDialog::draw(gcn::Graphics *g) void SkillDialog::update() { - for(std::list<Skill_Tab*>::const_iterator i = mTabs.begin(); + for(std::list<SkillTab*>::const_iterator i = mTabs.begin(); i != mTabs.end(); ++i) { (*i)->update(); } } -Skill_Tab::Skill_Tab(const std::string &type): type(type) +SkillTab::SkillTab(const std::string &type): type(type) { setOpaque(false); setDimension(gcn::Rectangle(0, 0, 270, 420)); @@ -200,7 +202,7 @@ Skill_Tab::Skill_Tab(const std::string &type): type(type) } -int Skill_Tab::getSkillNum() +int SkillTab::getSkillNum() { int skillNum = 0; @@ -222,7 +224,7 @@ int Skill_Tab::getSkillNum() else return skillNum; } -int Skill_Tab::getSkillBegin() +int SkillTab::getSkillBegin() { int skillBegin = 0; @@ -244,14 +246,14 @@ int Skill_Tab::getSkillBegin() else return skillBegin; } -Icon* Skill_Tab::getIcon(int index) +Icon* SkillTab::getIcon(int index) { int skillBegin = getSkillBegin(); std::string icon = LocalPlayer::getSkillInfo(index + skillBegin).icon; return new Icon(icon); } -void Skill_Tab::updateSkill(int index) +void SkillTab::updateSkill(int index) { int skillBegin = getSkillBegin(); @@ -306,7 +308,7 @@ void Skill_Tab::updateSkill(int index) } } -void Skill_Tab::update() +void SkillTab::update() { int skillNum = getSkillNum(); |