summaryrefslogtreecommitdiff
path: root/src/gui/status.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-01-12 16:44:09 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-01-12 16:44:09 +0000
commiteb31d0badc46b8e2e3c7fbc03363941bf3302256 (patch)
tree17ef01c8661ce7d09e6984c05fd9860b2dee6d16 /src/gui/status.cpp
parentcaeba363798727f75972ce6b8625fd9754bee903 (diff)
downloadmana-eb31d0badc46b8e2e3c7fbc03363941bf3302256.tar.gz
mana-eb31d0badc46b8e2e3c7fbc03363941bf3302256.tar.bz2
mana-eb31d0badc46b8e2e3c7fbc03363941bf3302256.tar.xz
mana-eb31d0badc46b8e2e3c7fbc03363941bf3302256.zip
*** empty log message ***
Diffstat (limited to 'src/gui/status.cpp')
-rw-r--r--src/gui/status.cpp27
1 files changed, 26 insertions, 1 deletions
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);