4 // Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
5 // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 #ifndef SUPERTUX_TITLE_H
22 #define SUPERTUX_TITLE_H
27 #include "game_session.hpp"
35 * Screen that displays the SuperTux logo, lets players start a new game, etc.
37 class TitleScreen : public Screen
41 virtual ~TitleScreen();
46 virtual void draw(DrawingContext& context);
48 virtual void update(float elapsed_time);
51 std::string get_slotinfo(int slot);
52 std::string get_level_name(const std::string& levelfile);
53 bool process_load_game_menu();
55 void update_load_game_menu();
56 void generate_main_menu();
57 void generate_contrib_menu();
58 void check_levels_contrib_menu();
59 void check_contrib_world_menu();
60 void free_contrib_menu();
61 void generate_addons_menu();
62 void check_addons_menu();
63 void free_addons_menu();
65 std::auto_ptr<Menu> main_menu;
66 std::auto_ptr<Menu> load_game_menu;
67 std::auto_ptr<Menu> contrib_menu;
68 std::auto_ptr<Menu> contrib_world_menu;
69 std::auto_ptr<World> main_world;
70 std::vector<World*> contrib_worlds;
71 std::auto_ptr<Menu> addons_menu;
72 std::vector<Addon> addons; /**< shown list of Add-ons */
73 std::vector<Addon> available_addons; /**< list of downloadable Add-ons */
74 std::vector<Addon> installed_addons; /**< list of currently installed Add-ons */
77 std::auto_ptr<CodeController> controller;
78 std::auto_ptr<GameSession> titlesession;