- ),
- Vector(0, SCREEN_HEIGHT - 50 + white_small_text->get_height() + 5),
- LEFT_ALLIGN, LAYER_FOREGROUND1);
-
- /* Don't draw menu, if quit is true */
- Menu* menu = Menu::current();
- if(menu)
- {
- menu->draw(context);
- menu->update();
-
- if(menu == main_menu)
- {
- switch (main_menu->check())
- {
- case MNID_STARTGAME:
- // Start Game, ie. goto the slots menu
- update_load_save_game_menu(load_game_menu);
- break;
- case MNID_LEVELS_CONTRIB:
- // Contrib Menu
- generate_contrib_menu();
- break;
-#if 0
- case MNID_LEVELEDITOR: {
- LevelEdtiro* leveleditor = new LevelEditor();
- leveleditor->run();
- delete leveleditor;
- Menu::set_current(main_menu);
- resume_demo();
- break;
- }
-#endif
- case MNID_CREDITS:
- fadeout(500);
- credits_music = sound_manager->load_music(
- "/music/credits.ogg");
- sound_manager->play_music(credits_music);
- display_text_file("credits.txt");
- fadeout(500);
- Menu::set_current(main_menu);
- break;
- case MNID_QUITMAINMENU:
- running = false;
- break;
- }
- }
- else if(menu == options_menu)
- {
- process_options_menu();
- }
- else if(menu == load_game_menu)
- {
- if(event.key.keysym.sym == SDLK_DELETE)
- {
- int slot = menu->get_active_item_id();
- std::stringstream stream;
- stream << slot;
- std::string str = _("Are you sure you want to delete slot") + stream.str() + "?";
-
- if(confirm_dialog(bkg_title, str.c_str())) {
- str = "save/slot" + stream.str() + ".stsg";
- printf("Removing: %s\n",str.c_str());
- PHYSFS_delete(str.c_str());
- }
-
- update_load_save_game_menu(load_game_menu);
- Menu::set_current(main_menu);
- resume_demo();
- }
- else if (process_load_game_menu())
- {
- resume_demo();
- }
- }
- else if(menu == contrib_menu)
- {
- check_levels_contrib_menu();
- }
- else if (menu == contrib_subset_menu)
- {
- check_contrib_subset_menu();
- }
- }
+),
+ Vector(0, SCREEN_HEIGHT - 50 + white_small_text->get_height() + 5),
+ LEFT_ALLIGN, LAYER_FOREGROUND1);
+}
+
+void
+TitleScreen::update(float elapsed_time)
+{
+ main_loop->set_speed(0.6);
+ Sector* sector = titlesession->get_current_sector();
+ sector->update(elapsed_time);