summaryrefslogtreecommitdiff
path: root/src/gui/skill.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skill.cpp')
-rw-r--r--src/gui/skill.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index 9fbae7a6..39ccbb06 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -1,9 +1,8 @@
/*
- * Aethyra
+ * The Mana World
* Copyright (C) 2004 The Mana World Development Team
*
- * This file is part of Aethyra based on original code
- * from The Mana World.
+ * This file is part of The Mana World.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,11 +45,14 @@ struct SkillInfo
bool modifiable;
};
-static const SkillInfo fakeSkillInfo = { _("???"), false };
+static const SkillInfo fakeSkillInfo = {
+ _("Mystery Skill"),
+ false
+};
std::vector<SkillInfo> skill_db;
-static void initSkillinfo(void);
+static void initSkillinfo();
class SkillGuiTableModel : public StaticTableModel
{
@@ -76,12 +78,12 @@ public:
return 35;
}
- virtual int getRowHeight(void)
+ virtual int getRowHeight()
{
return 12;
}
- virtual void update(void)
+ virtual void update()
{
mEntriesNr = mDialog->getSkills().size();
resize();
@@ -113,7 +115,6 @@ public:
}
}
-
private:
SkillDialog *mDialog;
int mEntriesNr;
@@ -132,7 +133,7 @@ SkillDialog::SkillDialog():
mTable->setActionEventId("skill");
mTable->addActionListener(this);
- setWindowName(_("Skills"));
+ setWindowName("Skills");
setCloseButton(true);
setDefaultSize(255, 260, ImageRect::CENTER);
@@ -155,7 +156,7 @@ SkillDialog::SkillDialog():
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
- setLocationRelativeTo(getParent());
+ center();
loadWindowState();
}
@@ -234,7 +235,7 @@ bool SkillDialog::hasSkill(int id)
void SkillDialog::addSkill(int id, int lvl, int mp)
{
- SKILL *tmp = new SKILL();
+ SKILL *tmp = new SKILL;
tmp->id = id;
tmp->lv = lvl;
tmp->sp = mp;
@@ -255,11 +256,11 @@ void SkillDialog::setSkill(int id, int lvl, int mp)
void SkillDialog::cleanList()
{
- for_each(mSkillList.begin(), mSkillList.end(), make_dtor(mSkillList));
+ delete_all(mSkillList);
mSkillList.clear();
}
-static void initSkillinfo(void)
+static void initSkillinfo()
{
SkillInfo emptySkillInfo = { "", false };