diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-10-18 15:55:52 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-10-18 15:55:52 +0000 |
commit | d0333c99e0ff4c5510875bf8993056875d6c93af (patch) | |
tree | a0bb673db36b0cc0ca750500c6409b08e6eb40b6 /src | |
parent | d3175115354bb2417f01877a96d0068e2f2c875d (diff) | |
download | mana-d0333c99e0ff4c5510875bf8993056875d6c93af.tar.gz mana-d0333c99e0ff4c5510875bf8993056875d6c93af.tar.bz2 mana-d0333c99e0ff4c5510875bf8993056875d6c93af.tar.xz mana-d0333c99e0ff4c5510875bf8993056875d6c93af.zip |
Header, whitespace and intendation cleanups.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/connection.cpp | 7 | ||||
-rw-r--r-- | src/gui/connection.h | 7 | ||||
-rw-r--r-- | src/gui/error.cpp | 3 | ||||
-rw-r--r-- | src/gui/status.cpp | 13 | ||||
-rw-r--r-- | src/gui/window.h | 1 |
5 files changed, 11 insertions, 20 deletions
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" |