summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-12-02 16:17:42 -0700
committerIra Rice <irarice@gmail.com>2008-12-02 16:17:42 -0700
commit84164bd6cb597fe45f54e97cf9c8991e93e9a803 (patch)
tree4c6a563dec9692007b8da862f8e1f2f57f792d8a
parentd9f02ef550e80b596e951fc21e63f814df47914d (diff)
downloadmana-84164bd6cb597fe45f54e97cf9c8991e93e9a803.tar.gz
mana-84164bd6cb597fe45f54e97cf9c8991e93e9a803.tar.bz2
mana-84164bd6cb597fe45f54e97cf9c8991e93e9a803.tar.xz
mana-84164bd6cb597fe45f54e97cf9c8991e93e9a803.zip
Fixed status window so that the job level is displayed next to the
level, as well as making the job level bar more consistent. Signed-off-by: Ira Rice <irarice@gmail.com>
-rw-r--r--src/gui/status.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index d254f910..fbcc01d6 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -46,6 +46,7 @@ StatusWindow::StatusWindow(LocalPlayer *player):
mLvlLabel = new gcn::Label("Level:");
mGpLabel = new gcn::Label("Money:");
+ mJobLvlLabel = new gcn::Label("Job:");
mHpLabel = new gcn::Label("HP:");
mHpBar = new ProgressBar(1.0f, 80, 15, 0, 171, 34);
@@ -60,7 +61,7 @@ StatusWindow::StatusWindow(LocalPlayer *player):
mMpValueLabel = new gcn::Label("");
mJobXpLabel = new gcn::Label("Job:");
- mJobXpBar = new ProgressBar(1.0f, 60, 15, 220, 135, 203);
+ mJobXpBar = new ProgressBar(1.0f, 80, 15, 220, 135, 203);
mJobValueLabel = new gcn::Label("");
int y = 3;
@@ -68,6 +69,8 @@ StatusWindow::StatusWindow(LocalPlayer *player):
mLvlLabel->setPosition(x, y);
x += mLvlLabel->getWidth() + 40;
+ mJobLvlLabel->setPosition(x, y);
+ x += mJobLvlLabel->getWidth() + 40;
mGpLabel->setPosition(x, y);
y += mLvlLabel->getHeight() + 5; // Next Row
@@ -93,10 +96,11 @@ StatusWindow::StatusWindow(LocalPlayer *player):
mMpValueLabel->setPosition(x, y);
mJobXpLabel->setPosition(175, y);
- mJobXpBar->setPosition(225, y);
+ mJobXpBar->setPosition(205, y);
mJobValueLabel->setPosition(290, y);
add(mLvlLabel);
+ add(mJobLvlLabel);
add(mGpLabel);
add(mHpLabel);
add(mHpValueLabel);
@@ -224,12 +228,12 @@ void StatusWindow::update()
mLvlLabel->setCaption("Level: " + toString(mPlayer->mLevel));
mLvlLabel->adjustSize();
+ mJobLvlLabel->setCaption("Job: " + toString(mPlayer->mJobLevel));
+ mJobLvlLabel->adjustSize();
+
mGpLabel->setCaption("Money: " + toString(mPlayer->mGp) + " GP");
mGpLabel->adjustSize();
- mJobXpLabel->setCaption("Job: " + toString(mPlayer->mJobLevel));
- mJobXpLabel->adjustSize();
-
mHpValueLabel->setCaption(toString(mPlayer->mHp) +
"/" + toString(mPlayer->mMaxHp));
mHpValueLabel->adjustSize();
@@ -332,8 +336,10 @@ void StatusWindow::update()
mStatsReflexPoints->adjustSize();
// Update Second column widgets position
- mGpLabel->setPosition(mLvlLabel->getX() + mLvlLabel->getWidth() + 20,
- mLvlLabel->getY());
+ mJobLvlLabel->setPosition(mLvlLabel->getX() + mLvlLabel->getWidth() + 20,
+ mLvlLabel->getY());
+ mGpLabel->setPosition(mJobLvlLabel->getX() + mJobLvlLabel->getWidth() + 20,
+ mJobLvlLabel->getY());
mXpLabel->setPosition(
mHpValueLabel->getX() + mHpValueLabel->getWidth() + 10,
@@ -345,11 +351,13 @@ void StatusWindow::update()
mXpBar->getX() + mXpBar->getWidth() + 5,
mXpLabel->getY());
- mJobXpLabel->setPosition(mXpLabel->getX(), mMpLabel->getY());
+ mJobXpLabel->setPosition(mXpBar->getX() - mJobXpLabel->getWidth() - 5,
+ mMpLabel->getY());
mJobXpBar->setPosition(
- mXpBar->getX() + mXpBar->getWidth() - mJobXpBar->getWidth(),
+ mJobXpLabel->getX() + mJobXpLabel->getWidth() + 5,
mJobXpLabel->getY());
- mJobValueLabel->setPosition(290, mJobXpLabel->getY());
+ mJobValueLabel->setPosition(mJobXpBar->getX() + mJobXpBar->getWidth() + 5,
+ mJobXpLabel->getY());
}
void StatusWindow::draw(gcn::Graphics *g)