summaryrefslogtreecommitdiff
path: root/src/gui/newskill.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-21 00:03:11 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-21 00:03:11 +0000
commitf741c14337dd0850a7201f5aa2185e40a625353a (patch)
treedd1dd0cf95b6117e4a8aea96317f6301eaa078ed /src/gui/newskill.cpp
parentf7214b33bf5cbb85df57e8d0035af7a25826e985 (diff)
downloadmana-f741c14337dd0850a7201f5aa2185e40a625353a.tar.gz
mana-f741c14337dd0850a7201f5aa2185e40a625353a.tar.bz2
mana-f741c14337dd0850a7201f5aa2185e40a625353a.tar.xz
mana-f741c14337dd0850a7201f5aa2185e40a625353a.zip
Updates to change log, file lists, lots of doxygen comments and small changes.
Diffstat (limited to 'src/gui/newskill.cpp')
-rw-r--r--src/gui/newskill.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/newskill.cpp b/src/gui/newskill.cpp
index 341fe046..c3c16f2b 100644
--- a/src/gui/newskill.cpp
+++ b/src/gui/newskill.cpp
@@ -20,7 +20,7 @@
*
* $Id$
*/
-
+
/* This file implements the new skill dialog for use under the latest
* version of the skill system as of 2005/02/20
*/
@@ -45,41 +45,41 @@ char *skill_name[] = {
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", ""
};
-
+
NewSkillDialog::NewSkillDialog():
Window("Skills")
{
// the window
setSize(400, 300);
-
+
// the skill labels
skillLabel = new gcn::Label[N_SKILL];
- for(int a=0;a<N_SKILL;a++) {
+ for (int a = 0; a < N_SKILL; a++) {
skillLabel[a].setCaption(skill_name[a]);
skillLabel[a].setDimension(gcn::Rectangle(8, 190, 200, 16));
}
-
+
// the close button
closeButton = new Button("Close");
closeButton->setEventId("close");
closeButton->setPosition(160, 210);
add(closeButton);
-
+
// setting up the container
skillList = new gcn::Container();
- skillList->setDimension(gcn::Rectangle(0,0,230,600));
- for(int b=0;b<N_SKILL;b++) {
- skillList->add(&skillLabel[b],20,20*b);
+ skillList->setDimension(gcn::Rectangle(0, 0, 230, 600));
+ for (int b = 0; b < N_SKILL; b++) {
+ skillList->add(&skillLabel[b], 20, 20 * b);
}
// the scroll area (content = container)
- skillScrollArea = new gcn::ScrollArea();
- skillScrollArea->setDimension(gcn::Rectangle(5, 5, 229, 300));
+ skillScrollArea = new ScrollArea();
+ skillScrollArea->setDimension(gcn::Rectangle(5, 5, 229, 290));
skillScrollArea->setContent(skillList);
add(skillScrollArea);
-
-
+
+
closeButton->addActionListener(this);
@@ -89,7 +89,7 @@ NewSkillDialog::NewSkillDialog():
NewSkillDialog::~NewSkillDialog()
{
delete skillScrollArea;
- delete skillLabel;
+ delete[] skillLabel;
delete closeButton;
}
@@ -99,4 +99,4 @@ void NewSkillDialog::action(const std::string& eventId)
{
setVisible(false);
}
-} \ No newline at end of file
+}