summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-10-09 21:34:58 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-10-09 21:34:58 +0000
commit31047c05a9b56c101566301d81931c66bc4b9ecd (patch)
tree8646f4383a0297732e76227bc601cd0f80ec5151 /src/game.cpp
parent2327c5a7c3b054e52b69286da906f8e5c4432d1c (diff)
downloadmana-client-31047c05a9b56c101566301d81931c66bc4b9ecd.tar.gz
mana-client-31047c05a9b56c101566301d81931c66bc4b9ecd.tar.bz2
mana-client-31047c05a9b56c101566301d81931c66bc4b9ecd.tar.xz
mana-client-31047c05a9b56c101566301d81931c66bc4b9ecd.zip
Corrected the white browser font bug and the black hp/mp bug which were linked. Added a debug window.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index bc256b7c..8b952ebd 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -68,6 +68,10 @@
#include "gui/ministatus.h"
#include "gui/trade.h"
+#ifdef DEBUG
+#include "gui/debugwindow.h"
+#endif
+
#include "net/messagein.h"
#include "net/messageout.h"
#include "net/network.h"
@@ -116,6 +120,9 @@ TradeWindow *tradeWindow;
//BuddyWindow *buddyWindow;
HelpWindow *helpWindow;
PopupMenu *popupMenu;
+#ifdef DEBUG
+DebugWindow *debugWindow;
+#endif
Inventory *inventory = NULL;
@@ -216,7 +223,9 @@ void createGuiWindows()
//buddyWindow = new BuddyWindow();
helpWindow = new HelpWindow();
popupMenu = new PopupMenu();
-
+#ifdef DEBUG
+ debugWindow = new DebugWindow();
+#endif
// Initialize window positions
int screenW = graphics->getWidth();
int screenH = graphics->getHeight();
@@ -250,7 +259,9 @@ void createGuiWindows()
//buddyWindow->setVisible(false);
helpWindow->setVisible(false);
popupMenu->setVisible(false);
-
+#ifdef DEBUG
+ debugWindow->setVisible(true);
+#endif
// Do not focus any text field
gui->focusNone();
}
@@ -280,6 +291,9 @@ void destroyGuiWindows()
//delete buddyWindow;
delete helpWindow;
delete popupMenu;
+#ifdef DEBUG
+ delete debugWindow;
+#endif
}
void do_init()
@@ -635,7 +649,14 @@ void do_input()
setupWindow->requestMoveToTop();
used = true;
break;
-
+#ifdef DEBUG
+ // Debug window
+ case SDLK_d:
+ debugWindow->setVisible(!debugWindow->isVisible());
+ if (debugWindow->isVisible()) debugWindow->requestMoveToTop();
+ used = true;
+ break;
+#endif
// screenshot (picture, hence the p)
case SDLK_p:
{