X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftitle.cpp;h=724d1afb5d7e95cc8c960f9d7c83e2166dd318a0;hb=47c58b6b5d40807eee7bd37fa2fd5d2188a333fd;hp=dfa805e4c8a1c7b32e50c2c468906c2c46d7140e;hpb=058e2f6298d8319c0fe03c5e950a36a8f1f57aba;p=supertux.git diff --git a/src/title.cpp b/src/title.cpp index dfa805e4c..724d1afb5 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -44,6 +44,7 @@ #include "video/drawing_context.hpp" #include "world.hpp" +#include #include enum MainMenuIDs { @@ -421,6 +422,7 @@ TitleScreen::update(float elapsed_time) break; case MNID_CREDITS: + Menu::set_current(NULL); main_loop->push_screen(new TextScroller("credits.txt"), new FadeOut(0.5)); break; @@ -439,9 +441,9 @@ TitleScreen::update(float elapsed_time) } } - // reopen menu of user closed it (so that the app doesn't close when user + // reopen menu if user closed it (so that the app doesn't close when user // accidently hit ESC) - if(Menu::current() == 0) { + if(Menu::current() == 0 && main_loop->has_no_pending_fadeout()) { generate_main_menu(); Menu::set_current(main_menu.get()); } @@ -450,6 +452,7 @@ TitleScreen::update(float elapsed_time) void TitleScreen::start_game() { + Menu::set_current(NULL); std::string basename = current_world->get_basedir(); basename = basename.substr(0, basename.length()-1); std::string worlddirname = FileSystem::basename(basename);