summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-18 15:55:52 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-18 15:55:52 +0000
commitd0333c99e0ff4c5510875bf8993056875d6c93af (patch)
treea0bb673db36b0cc0ca750500c6409b08e6eb40b6
parentd3175115354bb2417f01877a96d0068e2f2c875d (diff)
downloadmana-d0333c99e0ff4c5510875bf8993056875d6c93af.tar.gz
mana-d0333c99e0ff4c5510875bf8993056875d6c93af.tar.bz2
mana-d0333c99e0ff4c5510875bf8993056875d6c93af.tar.xz
mana-d0333c99e0ff4c5510875bf8993056875d6c93af.zip
Header, whitespace and intendation cleanups.
-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"