summaryrefslogtreecommitdiff
path: root/src/gui/login.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/login.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/login.cpp')
-rw-r--r--src/gui/login.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index 13a8c2f3..b5104204 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -130,14 +130,27 @@ void LoginDialog::action(const std::string& eventId)
void login() {
LoginDialog *dialog = new LoginDialog();
- while (state == LOGIN) {
- login_wallpaper->draw(buffer, 0, 0);
+ while (state == LOGIN)
+ {
+ // Handle SDL events
+ SDL_Event event;
+ while (SDL_PollEvent(&event)) {
+ switch (event.type) {
+ case SDL_QUIT:
+ state = EXIT;
+ break;
+ }
+
+ guiInput->pushInput(event);
+ }
+
+ login_wallpaper->draw(screen, 0, 0);
gui->logic();
gui->draw();
- blit(buffer, screen, 0, 0, 0, 0, 800, 600);
- if (key[KEY_ESC]) {
- state = EXIT;
- }
+ guiGraphics->updateScreen();
+ //if (key[KEY_ESC]) {
+ // state = EXIT;
+ //}
}
delete dialog;