diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-03-04 16:34:02 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-03-04 16:34:02 +0000 |
commit | 7a57cee0d153a4db1d82369aae9160e8ece9ba26 (patch) | |
tree | a64fd35942c72d8eb1250effaaca0f4b82768cfc /src/gui/stats.cpp | |
parent | 47ddb7669a56c32597510d8153a6aa156bb4a397 (diff) | |
download | mana-7a57cee0d153a4db1d82369aae9160e8ece9ba26.tar.gz mana-7a57cee0d153a4db1d82369aae9160e8ece9ba26.tar.bz2 mana-7a57cee0d153a4db1d82369aae9160e8ece9ba26.tar.xz mana-7a57cee0d153a4db1d82369aae9160e8ece9ba26.zip |
A bunch of updates:
- inventory fixes
- equipment fixes
- graphic updates (items and monsters)
- weaponary system
- fixed status window
Diffstat (limited to 'src/gui/stats.cpp')
-rw-r--r-- | src/gui/stats.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/gui/stats.cpp b/src/gui/stats.cpp index bc2e4f34..4629d5fa 100644 --- a/src/gui/stats.cpp +++ b/src/gui/stats.cpp @@ -33,6 +33,7 @@ StatsWindow::StatsWindow(): for (i = 0; i < 6; i++) { statsLabel[i] = new gcn::Label(); statsDisplayLabel[i] = new gcn::Label(); + pointsLabel[i] = new gcn::Label("0"); } remainingStatsPointsLabel = new gcn::Label(); @@ -51,9 +52,10 @@ StatsWindow::StatsWindow(): // Set position for (i = 0; i < 6; i++) { - statsLabel[i]->setPosition(10,(i*23)+10); - statsDisplayLabel[i]->setPosition(120,(i*23)+10); - statsButton[i]->setPosition(170,(i*23)+10); + statsLabel[i]->setPosition(10,(i * 23) + 10); + statsDisplayLabel[i]->setPosition(120,(i * 23) + 10); + statsButton[i]->setPosition(150, (i * 23) + 5); + pointsLabel[i]->setPosition(180, (i * 23) + 10); } remainingStatsPointsLabel->setPosition(10, 156); @@ -62,6 +64,7 @@ StatsWindow::StatsWindow(): add(statsLabel[i]); add(statsDisplayLabel[i]); add(statsButton[i]); + add(pointsLabel[i]); statsButton[i]->addActionListener(this); } add(remainingStatsPointsLabel); @@ -75,6 +78,7 @@ StatsWindow::StatsWindow(): void StatsWindow::update(){ std::stringstream statsStr[6]; std::stringstream figureStr[6]; + std::stringstream pointsStr[6]; std::stringstream remainingStatsPointsStr; statsStr[0] << "Strength:"; @@ -90,9 +94,14 @@ void StatsWindow::update(){ statsStr[5] << "Luck:"; figureStr[5] << (int)char_info->LUK; - // for testing only... - - //remainingStatsPointsStr << "Remaining Status Points : " << char_info->statsPointsToAttribute; + remainingStatsPointsStr << "Remaining Status Points : " << char_info->statsPointsToAttribute; + + pointsStr[0] << (int)char_info->STRUp; + pointsStr[1] << (int)char_info->AGIUp; + pointsStr[2] << (int)char_info->VITUp; + pointsStr[3] << (int)char_info->INTUp; + pointsStr[4] << (int)char_info->DEXUp; + pointsStr[5] << (int)char_info->LUKUp; // Update labels for (i = 0; i < 6; i++) { @@ -100,6 +109,8 @@ void StatsWindow::update(){ statsLabel[i]->adjustSize(); statsDisplayLabel[i]->setCaption(figureStr[i].str()); statsDisplayLabel[i]->adjustSize(); + pointsLabel[i]->setCaption(pointsStr[i].str()); + pointsLabel[i]->adjustSize(); } remainingStatsPointsLabel->setCaption(remainingStatsPointsStr.str()); remainingStatsPointsLabel->adjustSize(); |