supertux
Public Member Functions | List of all members
TitleScreen Class Referencefinal

Screen that displays the SuperTux logo, lets players start a new game, etc. More...

#include <title_screen.hpp>

Inheritance diagram for TitleScreen:
Inheritance graph
[legend]
Collaboration diagram for TitleScreen:
Collaboration graph
[legend]

Public Member Functions

 TitleScreen (Savegame &savegame, bool christmas=false)
 
void setup () override
 gets called before this screen gets activated (which is at least once before the first draw or update call
 
void leave () override
 gets called when the current screen is temporarily suspended
 
void draw (Compositor &compositor) override
 gets called once per frame. More...
 
void update (float dt_sec, const Controller &controller) override
 gets called for once (per logical) frame. More...
 
IntegrationStatus get_status () const override
 Gives details about what the user is doing right now. More...
 
void refresh_level ()
 
void refresh_copyright_text ()
 
void set_frame (const std::string &image)
 

Additional Inherited Members

- Static Public Member Functions inherited from Currenton< TitleScreen >
static TitleScreencurrent ()
 

Detailed Description

Screen that displays the SuperTux logo, lets players start a new game, etc.

Member Function Documentation

◆ draw()

void TitleScreen::draw ( Compositor compositor)
overridevirtual

gets called once per frame.

The screen should draw itself in this function. State changes should not be done in this function, but rather in update

Implements Screen.

◆ get_status()

IntegrationStatus TitleScreen::get_status ( ) const
overridevirtual

Gives details about what the user is doing right now.

Returns
activity details for presence integrations

Implements Screen.

◆ refresh_level()

void TitleScreen::refresh_level ( )

Check the savegame of the previously entered world on the current profile. If there is a title screen level set, use it. Otherwise, look for such level in the world's properties. If a level still isn't specified, or it cannot be entered, use the default.

Attempt to switch to the custom title level, using the default one as a fallback.

Initialize the main sector.

◆ update()

void TitleScreen::update ( float  dt_sec,
const Controller controller 
)
overridevirtual

gets called for once (per logical) frame.

Screens should do their state updates and logic here

Implements Screen.


The documentation for this class was generated from the following files: