diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-01-12 16:44:09 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-01-12 16:44:09 +0000 |
commit | eb31d0badc46b8e2e3c7fbc03363941bf3302256 (patch) | |
tree | 17ef01c8661ce7d09e6984c05fd9860b2dee6d16 /src/gui | |
parent | caeba363798727f75972ce6b8625fd9754bee903 (diff) | |
download | mana-client-eb31d0badc46b8e2e3c7fbc03363941bf3302256.tar.gz mana-client-eb31d0badc46b8e2e3c7fbc03363941bf3302256.tar.bz2 mana-client-eb31d0badc46b8e2e3c7fbc03363941bf3302256.tar.xz mana-client-eb31d0badc46b8e2e3c7fbc03363941bf3302256.zip |
*** empty log message ***
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/stats.cpp | 6 | ||||
-rw-r--r-- | src/gui/status.cpp | 27 | ||||
-rw-r--r-- | src/gui/status.h | 4 |
3 files changed, 31 insertions, 6 deletions
diff --git a/src/gui/stats.cpp b/src/gui/stats.cpp index d8ea9c34..bb095130 100644 --- a/src/gui/stats.cpp +++ b/src/gui/stats.cpp @@ -67,11 +67,11 @@ StatsWindow::StatsWindow(): void StatsWindow::update(){ std::stringstream statsStr[6]; - statsStr[0] << "Strenght: " << (int)char_info->STR; + statsStr[0] << "Strength: " << (int)char_info->STR; statsStr[1] << "Agility: " << (int)char_info->AGI; statsStr[2] << "Vitality: " << (int)char_info->VIT; - statsStr[3] << "Inteligence: " << (int)char_info->INT; - statsStr[4] << "Dexternity: " << (int)char_info->DEX; + statsStr[3] << "Intelligence: " << (int)char_info->INT; + statsStr[4] << "Dexterity: " << (int)char_info->DEX; statsStr[5] << "Luck: " << (int)char_info->LUK; // Update labels diff --git a/src/gui/status.cpp b/src/gui/status.cpp index 21a3c4a7..f2551ae5 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -29,21 +29,34 @@ StatusWindow::StatusWindow(): hp = new gcn::Label("HP"); sp = new gcn::Label("SP"); gp = new gcn::Label("GP"); + expLabel = new gcn::Label("Exp"); + jobExpLabel = new gcn::Label("Job"); healthBar = new ProgressBar(1.0f); manaBar = new ProgressBar(1.0f); + expBar = new ProgressBar(1.0f); + jobExpBar = new ProgressBar(1.0f); + - setSize(270, 40); + setSize(270, 80); hp->setPosition(6, 20); sp->setPosition(106, 20); gp->setPosition(206, 20); + expLabel->setPosition(6, 60); + jobExpLabel->setPosition(106, 60); healthBar->setDimension(gcn::Rectangle(16, 6, 60, 18)); manaBar->setDimension(gcn::Rectangle(116, 6, 60, 18)); + expBar->setDimension(gcn::Rectangle(16, 36, 60, 9)); + jobExpBar->setDimension(gcn::Rectangle(116, 36, 60, 9)); add(hp); add(sp); add(gp); + add(expLabel); + add(jobExpLabel); add(healthBar); add(manaBar); + add(expBar); + add(jobExpBar); } StatusWindow::~StatusWindow() @@ -51,8 +64,12 @@ StatusWindow::~StatusWindow() delete hp; delete sp; delete gp; + delete expLabel; + delete jobExpLabel; delete healthBar; delete manaBar; + delete expBar; + delete jobExpBar; } void StatusWindow::update() @@ -74,6 +91,14 @@ void StatusWindow::update() sprintf(tempstr, "SP % 4d / % 4d", char_info->sp, char_info->max_sp); sp->setCaption(tempstr); sp->adjustSize(); + + sprintf(tempstr, "Exp %d", char_info->xp); + expLabel->setCaption(tempstr); + expLabel->adjustSize(); + + sprintf(tempstr, "Job Points %d", char_info->job_xp); + sp->setCaption(tempstr); + sp->adjustSize(); healthBar->setProgress((float)char_info->hp / (float)char_info->max_hp); diff --git a/src/gui/status.h b/src/gui/status.h index 77cea322..9f34591e 100644 --- a/src/gui/status.h +++ b/src/gui/status.h @@ -57,8 +57,8 @@ class StatusWindow : public Window { void update(); private: - gcn::Label *hp, *sp, *gp; - ProgressBar *healthBar, *manaBar; + gcn::Label *hp, *sp, *gp, expLabel, jobExpLabel; + ProgressBar *healthBar, *manaBar, expBar, jobExpBar; }; #endif |