#include "video/drawing_context.hpp"
#include "world.hpp"
+#include <algorithm>
#include <physfs.h>
enum MainMenuIDs {
contrib_menu->add_entry(i++, world->title);
contrib_worlds.push_back(world.release());
} catch(std::exception& e) {
-#ifdef DEBUG
log_warning << "Couldn't parse levelset info for '" << *it << "': " << e.what() << std::endl;
-#endif
}
}
break;
case MNID_CREDITS:
+ Menu::set_current(NULL);
main_loop->push_screen(new TextScroller("credits.txt"),
new FadeOut(0.5));
break;
}
}
- // 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());
}
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);