summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/gui/connection.cpp7
-rw-r--r--src/gui/connection.h7
-rw-r--r--src/gui/error.cpp3
-rw-r--r--src/gui/status.cpp13
-rw-r--r--src/gui/window.h1
6 files changed, 18 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 26384cc5..ea3c5926 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,16 @@
+2005-10-18 Björn Steinbrink <B.Steinbrink@gmx.de>
+
+ * src/gui/connection.cpp, src/gui/connection.h, src/gui/error.cpp,
+ src/gui/status.cpp, src/gui/window.h: Header, whitespace and
+ indentation cleanups.
+
2005-10-16 Duane Bailey <nayryeliab@gmail.com>
* src/main.cpp: opengl is now default for mac, win, and those who
define USE_OPENGL
* src/gui/setup.cpp: made it so those who use and go to fullscreen
requires a restart (texture/context baddies)
-
+
2005-10-16 Björn Steinbrink <B.Steinbrink@gmx.de>
* src/being.cpp, src/game.cpp, src/inventory.cpp, src/gui/buy.cpp,
diff --git a/src/gui/connection.cpp b/src/gui/connection.cpp
index bfa69f23..ecb98aee 100644
--- a/src/gui/connection.cpp
+++ b/src/gui/connection.cpp
@@ -29,7 +29,6 @@
#include "progressbar.h"
#include "../game.h"
-#include "../graphics.h"
#include "../log.h"
#include "../main.h"
@@ -50,12 +49,12 @@ ConnectionDialog::ConnectionDialog():
200 - 10, 20, 128, 128, 128);
mLabel = new gcn::Label("Connecting...");
mLabel->setPosition(5, mProgressBar->getY() - 25);
-
+
add(mLabel);
add(mCancelButton);
add(mProgressBar);
setLocationRelativeTo(getParent());
-
+
const char *host = iptostring(map_address);
openConnection(host, map_port);
}
@@ -73,7 +72,7 @@ void ConnectionDialog::logic()
}
mProgressBar->setProgress(mProgress);
Window::logic();
-
+
switch (mStatus)
{
case NET_CONNECTING:
diff --git a/src/gui/connection.h b/src/gui/connection.h
index f26c1344..fe416ddc 100644
--- a/src/gui/connection.h
+++ b/src/gui/connection.h
@@ -33,7 +33,6 @@
#include "../guichanfwd.h"
class Button;
-class Label;
class ProgressBar;
/**
@@ -59,16 +58,16 @@ class ConnectionDialog : public Window, public gcn::ActionListener {
* Called when receiving actions from the widgets.
*/
void action(const std::string& eventId);
-
+
void logic();
-
+
private:
gcn::Label *mLabel;
Button *mCancelButton;
ProgressBar *mProgressBar;
float mProgress;
int mStatus;
-
+
void mapLogin();
};
diff --git a/src/gui/error.cpp b/src/gui/error.cpp
index 3e76c5ee..42f4b217 100644
--- a/src/gui/error.cpp
+++ b/src/gui/error.cpp
@@ -23,10 +23,7 @@
#include "error.h"
-#include <guichan/widgets/label.hpp>
-
#include "../main.h"
-#include "../graphics.h"
ErrorDialog::ErrorDialog(const std::string &msg):
OkDialog("Error", msg)
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index 0c20b6fc..10b6431d 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -309,16 +309,13 @@ void StatusWindow::update()
{
hpBar->setColor(223, 32, 32); // Red
}
+ else if (player_info->hp < int((player_info->maxHp / 3) * 2))
+ {
+ hpBar->setColor(230, 171, 34); // Orange
+ }
else
{
- if (player_info->hp < int((player_info->maxHp / 3) * 2))
- {
- hpBar->setColor(230, 171, 34); // Orange
- }
- else
- {
- hpBar->setColor(0, 171, 34); // Green
- }
+ hpBar->setColor(0, 171, 34); // Green
}
hpBar->setProgress((float)player_info->hp / (float)player_info->maxHp);
diff --git a/src/gui/window.h b/src/gui/window.h
index ee85c97f..c7eba732 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -25,7 +25,6 @@
#define _TMW_WINDOW_H__
#include <guichan/widgets/window.hpp>
-#include <guichan/rectangle.hpp>
#include "../guichanfwd.h"