18 #ifndef HEADER_SUPERTUX_SUPERTUX_SCREEN_MANAGER_HPP 19 #define HEADER_SUPERTUX_SUPERTUX_SCREEN_MANAGER_HPP 23 #include "squirrel/squirrel_thread_queue.hpp" 24 #include "supertux/screen.hpp" 25 #include "util/currenton.hpp" 46 void quit(std::unique_ptr<ScreenFade> fade = {});
47 void set_speed(
float speed);
48 void set_target_framerate(
float framerate);
49 float get_target_framerate()
const;
50 float get_speed()
const;
51 bool has_pending_fadeout()
const;
54 void push_screen(std::unique_ptr<Screen> screen, std::unique_ptr<ScreenFade> fade = {});
55 void pop_screen(std::unique_ptr<ScreenFade> fade = {});
56 void set_screen_fade(std::unique_ptr<ScreenFade> fade);
63 void update_gamelogic(
float dt_sec);
64 void process_events();
65 void handle_screen_switch();
70 std::unique_ptr<MenuStorage> m_menu_storage;
71 std::unique_ptr<MenuManager> m_menu_manager;
72 std::unique_ptr<ControllerHUD> m_controller_hud;
75 float m_target_framerate;
79 enum Type { PUSH_ACTION, POP_ACTION, QUIT_ACTION };
81 std::unique_ptr<Screen> screen;
84 std::unique_ptr<Screen> screen_ = {}) :
86 screen(std::move(screen_))
90 std::vector<Action> m_actions;
92 std::unique_ptr<ScreenFade> m_screen_fade;
93 std::vector<std::unique_ptr<Screen> > m_screen_stack;
Manages, updates and draws all Screens, Controllers, Menus and the Console.
Definition: screen_manager.hpp:39
Definition: screen_manager.cpp:130
A 'Currenton' allows access to the currently active instance of a class via the static current() func...
Definition: currenton.hpp:30
Definition: compositor.hpp:29
Definition: video_system.hpp:36
Definition: controller_hud.hpp:27
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
Screen to be displayed simultaneously with another Screen.
Definition: screen_fade.hpp:27