summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-17 15:11:19 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-17 15:11:19 +0000
commitd0c97b98e477cfdf46ed7f36fd16c64f7943d551 (patch)
tree156acefaae842888432f923257b76bad12a16672 /src/gui/gui.cpp
parentd9593657605b2e286b478718c89bcbe7cd341c43 (diff)
downloadmana-d0c97b98e477cfdf46ed7f36fd16c64f7943d551.tar.gz
mana-d0c97b98e477cfdf46ed7f36fd16c64f7943d551.tar.bz2
mana-d0c97b98e477cfdf46ed7f36fd16c64f7943d551.tar.xz
mana-d0c97b98e477cfdf46ed7f36fd16c64f7943d551.zip
Committing Allegro -> SDL switch, hugely breaking the game.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index dd4216e5..c9742b05 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -22,13 +22,13 @@
*/
#include "gui.h"
-#include "allegroinput.h"
#include "window.h"
#include "windowcontainer.h"
// Guichan stuff
Gui *gui;
-gcn::AllegroGraphics *guiGraphics; // Graphics driver
+Graphics *guiGraphics; // Graphics driver
+gcn::SDLInput *guiInput; // GUI input
WindowContainer *guiTop; // The top container
Gui::Gui(Graphics *graphics)
@@ -37,15 +37,15 @@ Gui::Gui(Graphics *graphics)
guiGraphics = graphics;
// Set input
- guiInput = new AllegroInput();
+ guiInput = new gcn::SDLInput();
// Set image loader
- imageLoader = new gcn::AllegroImageLoader();
+ imageLoader = new gcn::SDLImageLoader();
gcn::Image::setImageLoader(imageLoader);
// Initialize top GUI widget
guiTop = new WindowContainer();
- guiTop->setDimension(gcn::Rectangle(0, 0, SCREEN_W, SCREEN_H));
+ guiTop->setDimension(gcn::Rectangle(0, 0, screen->w, screen->h));
guiTop->setOpaque(false);
Window::setWindowContainer(guiTop);
@@ -67,14 +67,11 @@ Gui::~Gui()
delete guiTop;
delete imageLoader;
delete guiInput;
- delete guiGraphics;
delete focusHandler;
}
void Gui::logic()
{
- guiInput->_pollInput();
-
while (!guiInput->isMouseQueueEmpty())
{
gcn::MouseInput mi = guiInput->dequeueMouseInput();
@@ -157,7 +154,7 @@ void Gui::draw()
guiGraphics->popClipArea();
// Draw the mouse
- draw_sprite(buffer, mouse_sprite, mouse_x, mouse_y);
+ //draw_sprite(buffer, mouse_sprite, mouse_x, mouse_y);
guiGraphics->_endDraw();
}