summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMateusz Kaduk <mateusz.kaduk@gmail.com>2004-12-28 15:52:49 +0000
committerMateusz Kaduk <mateusz.kaduk@gmail.com>2004-12-28 15:52:49 +0000
commitc962acb281f41830a52df7c1888f92658aaf2700 (patch)
tree08a1c11923e3b6f5a16b0e41e765bd5b6f956995 /src
parent40aba2bd075b3e8c32c03d87696646364c125803 (diff)
downloadmana-client-c962acb281f41830a52df7c1888f92658aaf2700.tar.gz
mana-client-c962acb281f41830a52df7c1888f92658aaf2700.tar.bz2
mana-client-c962acb281f41830a52df7c1888f92658aaf2700.tar.xz
mana-client-c962acb281f41830a52df7c1888f92658aaf2700.zip
StatsWindow registered with ActionListener
Diffstat (limited to 'src')
-rw-r--r--src/gui/stats.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/stats.cpp b/src/gui/stats.cpp
index fa927ee7..5b933339 100644
--- a/src/gui/stats.cpp
+++ b/src/gui/stats.cpp
@@ -33,12 +33,12 @@ StatsWindow::StatsWindow(gcn::Container *parent)
{
std::stringstream statsStr[6];
- statsStr[0] << "Strenght: " << char_info->STR;
- statsStr[1] << "Agility: " << char_info->AGI;
- statsStr[2] << "Vitality: " << char_info->VIT;
+ statsStr[0] << "Strenght: " << char_info->STR;
+ statsStr[1] << "Agility: " << char_info->AGI;
+ statsStr[2] << "Vitality: " << char_info->VIT;
statsStr[3] << "Inteligence: " << char_info->INT;
- statsStr[4] << "Dexternity: " << char_info->DEX;
- statsStr[5] << "Luck: " << char_info->LUK;
+ statsStr[4] << "Dexternity: " << char_info->DEX;
+ statsStr[5] << "Luck: " << char_info->LUK;
/* New labels */
for (i = 0; i < 6; i++)
@@ -66,6 +66,7 @@ StatsWindow::StatsWindow(gcn::Container *parent)
for(i = 0; i < 6; i++) {
add(statsLabel[i]);
add(statsButton[i]);
+ statsButton[i]->addActionListener(this);
}
setSize(200, 150);
@@ -77,12 +78,12 @@ StatsWindow::StatsWindow(gcn::Container *parent)
void StatsWindow::update(){
std::stringstream statsStr[6];
- statsStr[0] << "Strenght: " << char_info->STR;
- statsStr[1] << "Agility: " << char_info->AGI;
- statsStr[2] << "Vitality: " << char_info->VIT;
+ statsStr[0] << "Strenght: " << char_info->STR;
+ statsStr[1] << "Agility: " << char_info->AGI;
+ statsStr[2] << "Vitality: " << char_info->VIT;
statsStr[3] << "Inteligence: " << char_info->INT;
- statsStr[4] << "Dexternity: " << char_info->DEX;
- statsStr[5] << "Luck: " << char_info->LUK;
+ statsStr[4] << "Dexternity: " << char_info->DEX;
+ statsStr[5] << "Luck: " << char_info->LUK;
/* Update labels */
for (i = 0; i < 6; i++)
@@ -140,5 +141,4 @@ void StatsWindow::action(const std::string& eventId) {
puts("LUK");
update();
}
- puts("default");
}