src/supertux/title_screen.hpp

Go to the documentation of this file.
00001 //  SuperTux
00002 //  Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
00003 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
00004 //
00005 //  This program is free software: you can redistribute it and/or modify
00006 //  it under the terms of the GNU General Public License as published by
00007 //  the Free Software Foundation, either version 3 of the License, or
00008 //  (at your option) any later version.
00009 //
00010 //  This program is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 //  GNU General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU General Public License
00016 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 
00018 #ifndef HEADER_SUPERTUX_SUPERTUX_TITLE_HPP
00019 #define HEADER_SUPERTUX_SUPERTUX_TITLE_HPP
00020 
00021 #include "supertux/game_session.hpp"
00022 
00023 class AddonMenu;
00024 class CodeController;
00025 class ContribMenu;
00026 class ContribWorldMenu;
00027 class MainMenu;
00028 class Menu;
00029 class PlayerStatus;
00030 class World;
00031 
00035 class TitleScreen : public Screen
00036 {
00037 public:
00038   static std::string get_level_name(const std::string& levelfile);
00039 
00040 public:
00041   TitleScreen(PlayerStatus* player_status);
00042   virtual ~TitleScreen();
00043 
00044   virtual void setup();
00045   virtual void leave();
00046 
00047   virtual void draw(DrawingContext& context);
00048 
00049   virtual void update(float elapsed_time);
00050 
00051 public:
00052   static void start_game(World* world);
00053 
00054 private:
00055   void make_tux_jump();
00056   void generate_main_menu();
00057   
00058 private:
00059   std::auto_ptr<MainMenu> main_menu;
00060   SurfacePtr frame;
00061   std::auto_ptr<CodeController> controller;
00062   std::auto_ptr<GameSession> titlesession;
00063 
00064 private:
00065   TitleScreen(const TitleScreen&);
00066   TitleScreen& operator=(const TitleScreen&);
00067 };
00068 
00069 #endif
00070 
00071 /* EOF */

Generated on Mon Jun 9 03:38:23 2014 for SuperTux by  doxygen 1.5.1