diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 02:02:57 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-09 02:02:57 +0000 |
commit | 81cf85e9ec1d37dc6e8dd9883f42bb50dace9135 (patch) | |
tree | 585415bbb85c48fc8fb83cd5f54e1cfe8e988ee7 /src/gui/status.cpp | |
parent | 78ab0ec914d3c5a97f162905afb3dede53f8b9ed (diff) | |
download | mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.gz mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.bz2 mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.tar.xz mana-81cf85e9ec1d37dc6e8dd9883f42bb50dace9135.zip |
Made the Button ctor accept eventId and action listener.
Diffstat (limited to 'src/gui/status.cpp')
-rw-r--r-- | src/gui/status.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/gui/status.cpp b/src/gui/status.cpp index c6416409..1a300fd1 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -135,18 +135,13 @@ StatusWindow::StatusWindow(LocalPlayer *player): } remainingStatsPointsLabel = new gcn::Label(); - // New buttons - for (int i = 0; i < 6; i++) { - statsButton[i] = new Button("+"); - } - // Set button events Id - statsButton[0]->setEventId("STR"); - statsButton[1]->setEventId("AGI"); - statsButton[2]->setEventId("VIT"); - statsButton[3]->setEventId("INT"); - statsButton[4]->setEventId("DEX"); - statsButton[5]->setEventId("LUK"); + statsButton[0] = new Button("+", "STR", this); + statsButton[1] = new Button("+", "AGI", this); + statsButton[2] = new Button("+", "VIT", this); + statsButton[3] = new Button("+", "INT", this); + statsButton[4] = new Button("+", "DEX", this); + statsButton[5] = new Button("+", "LUK", this); // Set position @@ -192,7 +187,6 @@ StatusWindow::StatusWindow(LocalPlayer *player): add(statsDisplayLabel[i]); add(statsButton[i]); add(pointsLabel[i]); - statsButton[i]->addActionListener(this); } add(statsAttackLabel); add(statsDefenseLabel); |