From d0c97b98e477cfdf46ed7f36fd16c64f7943d551 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 17 Jan 2005 15:11:19 +0000 Subject: Committing Allegro -> SDL switch, hugely breaking the game. --- src/gui/login.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/gui/login.cpp') 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; -- cgit v1.2.3-70-g09d2