summaryrefslogtreecommitdiff
path: root/src/gui/ministatus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/ministatus.cpp')
-rw-r--r--src/gui/ministatus.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp
index 9f789a9d..95577e69 100644
--- a/src/gui/ministatus.cpp
+++ b/src/gui/ministatus.cpp
@@ -35,19 +35,30 @@ MiniStatusWindow::MiniStatusWindow():
Popup("MiniStatus")
{
mHpBar = new ProgressBar(1.0f, 100, 20, 0, 171, 34);
+#ifdef EATHENA_SUPPORT
mMpBar = new ProgressBar(1.0f, 100, 20, 26, 102, 230);
mXpBar = new ProgressBar(1.0f, 100, 20, 143, 192, 211);
+#endif
mHpBar->setPosition(0, 3);
+#ifdef EATHENA_SUPPORT
mMpBar->setPosition(mHpBar->getWidth() + 3, 3);
mXpBar->setPosition(mMpBar->getX() + mMpBar->getWidth() + 3, 3);
+#endif
add(mHpBar);
+#ifdef EATHENA_SUPPORT
add(mMpBar);
add(mXpBar);
+#endif
+#ifdef EATHENA_SUPPORT
setContentSize(mXpBar->getX() + mXpBar->getWidth(),
mXpBar->getY() + mXpBar->getHeight());
+#else
+ setContentSize(mHpBar->getX() + mHpBar->getWidth(),
+ mHpBar->getY() + mHpBar->getHeight());
+#endif
}
void MiniStatusWindow::setIcon(int index, AnimatedSprite *sprite)
@@ -71,6 +82,7 @@ extern volatile int tick_time;
void MiniStatusWindow::update()
{
StatusWindow::updateHPBar(mHpBar);
+#ifdef EATHENA_SUPPORT
StatusWindow::updateMPBar(mMpBar);
StatusWindow::updateXPBar(mXpBar);
@@ -86,11 +98,11 @@ void MiniStatusWindow::update()
<< config.getValue("xpBarMonsterCounterName", "Monsters") <<" left...";
}
*/
+#endif
for (unsigned int i = 0; i < mIcons.size(); i++)
if (mIcons[i])
mIcons[i]->update(tick_time * 10);
-
}
void MiniStatusWindow::draw(gcn::Graphics *graphics)
@@ -102,7 +114,11 @@ void MiniStatusWindow::draw(gcn::Graphics *graphics)
void MiniStatusWindow::drawIcons(Graphics *graphics)
{
// Draw icons
+#ifdef TMWSERV_SUPPORT
+ int icon_x = mHpBar->getX() + mHpBar->getWidth() + 4;
+#else
int icon_x = mXpBar->getX() + mXpBar->getWidth() + 4;
+#endif
for (unsigned int i = 0; i < mIcons.size(); i++) {
if (mIcons[i]) {
mIcons[i]->draw(graphics, icon_x, 3);