summaryrefslogtreecommitdiff
path: root/src/gui/newskill.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/newskill.cpp')
-rw-r--r--src/gui/newskill.cpp44
1 files changed, 10 insertions, 34 deletions
diff --git a/src/gui/newskill.cpp b/src/gui/newskill.cpp
index 0baf81a5..c04ad6a0 100644
--- a/src/gui/newskill.cpp
+++ b/src/gui/newskill.cpp
@@ -92,31 +92,19 @@ NewSkillDialog::NewSkillDialog():
resetNSD();
// create controls
- catButton[0] = new Button("Weapons");
- catButton[1] = new Button("Magic");
- catButton[2] = new Button("Craft");
- catButton[3] = new Button("General");
- catButton[4] = new Button("Combat");
- catButton[5] = new Button("E. Resist");
- catButton[6] = new Button("S. Resist");
- catButton[7] = new Button("Hunting");
- catButton[8] = new Button("Stat");
- closeButton = new Button("Close");
+ catButton[0] = new Button("Weapons", "g1", this);
+ catButton[1] = new Button("Magic", "g2", this);
+ catButton[2] = new Button("Craft", "g3", this);
+ catButton[3] = new Button("General", "g4", this);
+ catButton[4] = new Button("Combat", "g5", this);
+ catButton[5] = new Button("E. Resist", "g6", this);
+ catButton[6] = new Button("S. Resist", "g7", this);
+ catButton[7] = new Button("Hunting", "g8", this);
+ catButton[8] = new Button("Stat", "g9", this);
+ closeButton = new Button("Close", "close", this);
// captions
- // events
- catButton[0]->setEventId("g1");
- catButton[1]->setEventId("g2");
- catButton[2]->setEventId("g3");
- catButton[3]->setEventId("g4");
- catButton[4]->setEventId("g5");
- catButton[5]->setEventId("g6");
- catButton[6]->setEventId("g7");
- catButton[7]->setEventId("g8");
- catButton[8]->setEventId("g9");
- closeButton->setEventId("close");
-
// positioning
setContentSize(350, 250);
catButton[0]->setDimension(gcn::Rectangle(0,0,60,20));
@@ -152,18 +140,6 @@ NewSkillDialog::NewSkillDialog():
add(catButton[8]);
add(closeButton);
- // add event detection
- catButton[0]->addActionListener(this);
- catButton[1]->addActionListener(this);
- catButton[2]->addActionListener(this);
- catButton[3]->addActionListener(this);
- catButton[4]->addActionListener(this);
- catButton[5]->addActionListener(this);
- catButton[6]->addActionListener(this);
- catButton[7]->addActionListener(this);
- catButton[8]->addActionListener(this);
- closeButton->addActionListener(this);
-
// finsihing touches
setLocationRelativeTo(getParent());
}