zenilib
0.5.3.0
|
Provide a simple title screen for games. More...
#include <Title_State.h>
Inherits Zeni::Widget_Gamestate.
Classes | |
class | Instructions_Button |
class | Play_Button |
class | Title |
Public Member Functions | |
Title_State (const String &title_) | |
~Title_State () | |
void | on_cover () |
Called when a Gamestate is pushed on top of this Gamestate in Game. More... | |
void | on_key (const SDL_KeyboardEvent &) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
void | on_push () |
Called when the Gamestate is pushed onto the stack in Game. More... | |
void | on_uncover () |
Called when a Gamestate is popped off Game, making this Gamestate on top. More... | |
void | perform_logic () |
Then perform logic. Called by Game as part of the main gameloop. More... | |
Public Member Functions inherited from Zeni::Widget_Gamestate | |
Widget_Gamestate (const std::pair< Point2f, Point2f > &virtual_window_, const bool &fix_aspect_ratio_=true) | |
const bool & | fix_aspect_ratio () const |
const std::pair< Point2f, Point2f > & | get_virtual_window () const |
void | on_key (const SDL_KeyboardEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
void | on_mouse_button (const SDL_MouseButtonEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
void | on_mouse_motion (const SDL_MouseMotionEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
void | on_pop () |
Called when the Gamestate is popped off the stack in Game. More... | |
void | on_push () |
Called when the Gamestate is pushed onto the stack in Game. More... | |
void | perform_logic () |
Then perform logic. Called by Game as part of the main gameloop. More... | |
void | render () |
Then render. Called by Game as part of the main gameloop. More... | |
Public Member Functions inherited from Zeni::Gamestate_Base | |
Gamestate_Base () | |
virtual | ~Gamestate_Base () |
const bool & | is_pausable () const |
virtual void | on_event (const SDL_Event &event) |
First check for events. Called by Game as part of the main gameloop. More... | |
virtual void | prerender () |
No actual rendering, but any logic strictly necessary for rendering. More... | |
void | set_pausable (const bool &pausable_) |
Additional Inherited Members | |
Static Public Member Functions inherited from Zeni::Gamestate_Base | |
static char | to_char (const SDL_Keysym &ks) |
Returns a character key corresponding to the current combination of keys pressed or the null character (0). More... | |
static SDL_Keycode | to_sym (const String &text_version) |
Convert a text representation to an actual sym. More... | |
static String | to_text (const SDL_Keycode &sym) |
Convert a sym to a text representation. More... | |
Protected Member Functions inherited from Zeni::Gamestate_Base | |
virtual void | on_active (const SDL_ActiveEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
virtual void | on_controller_axis (const SDL_ControllerAxisEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
virtual void | on_controller_button (const SDL_ControllerButtonEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
virtual void | on_controller_device (const SDL_ControllerDeviceEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
virtual void | on_quit (const SDL_QuitEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
virtual void | on_system_wm_event (const SDL_SysWMEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
virtual void | on_user_event (const SDL_UserEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
virtual void | on_video_expose (const SDL_ExposeEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
virtual void | on_video_resize (const SDL_ResizeEvent &event) |
Override this input callback in your Gamestates. See SDL documentation for details. More... | |
Protected Attributes inherited from Zeni::Widget_Gamestate | |
Widgets | m_widgets |
Provide a simple title screen for games.
Contact: bazal d@ze nipex .com
Definition at line 40 of file Title_State.h.
|
inline |
Definition at line 96 of file Title_State.h.
References Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::configure_video_button, Zeni::get_Colors(), Zeni::get_Video(), Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::instructions_button, Zeni::Widgets::lend_Widget(), Zeni::Widget_Gamestate::m_widgets, Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::play_button, Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::quit_button, Zeni::Video::set_clear_Color(), Zeni::Text_Box::set_justify(), Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::sound_check_box, Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::title, and Zeni::ZENI_CENTER.
|
inline |
Definition at line 119 of file Title_State.h.
References Zeni::get_Video(), and Zeni::Video::set_clear_Color().
|
inlinevirtual |
Called when a Gamestate is pushed on top of this Gamestate in Game.
Reimplemented from Zeni::Gamestate_Base.
Definition at line 127 of file Title_State.h.
References Zeni::Game::controller_mouse, Zeni::Game::Controller_Mouse::enabled, and Zeni::get_Game().
|
inlinevirtual |
Override this input callback in your Gamestates. See SDL documentation for details.
Reimplemented from Zeni::Gamestate_Base.
Definition at line 138 of file Title_State.h.
|
inlinevirtual |
Called when the Gamestate is pushed onto the stack in Game.
Reimplemented from Zeni::Gamestate_Base.
Definition at line 123 of file Title_State.h.
References Zeni::Game::controller_mouse, Zeni::Game::Controller_Mouse::enabled, and Zeni::get_Game().
|
inlinevirtual |
Called when a Gamestate is popped off Game, making this Gamestate on top.
Reimplemented from Zeni::Gamestate_Base.
Definition at line 131 of file Title_State.h.
References Zeni::Game::controller_mouse, Zeni::Game::Controller_Mouse::enabled, Zeni::get_Controllers(), Zeni::get_Game(), Zeni::get_Window(), Zeni::Window::MOUSE_NORMAL, Zeni::Controllers::reset_vibration_all(), and Zeni::Window::set_mouse_state().
|
inlinevirtual |
Then perform logic. Called by Game as part of the main gameloop.
Reimplemented from Zeni::Gamestate_Base.
Definition at line 143 of file Title_State.h.
References Zeni::get_Colors(), Zeni::get_Video(), Zeni::Widget_Gamestate::perform_logic(), and Zeni::Video::set_clear_Color().
Popup_Menu_State::Configure_Video_Button Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::configure_video_button |
Definition at line 91 of file Title_State.h.
Referenced by Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::Title_State().
Zeni::Title_State::Instructions_Button Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::instructions_button |
Zeni::Title_State::Play_Button Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::play_button |
Popup_Menu_State::Quit_Button Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::quit_button |
Definition at line 94 of file Title_State.h.
Referenced by Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::Title_State().
Popup_Menu_State::Sound_Check_Box Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::sound_check_box |
Definition at line 93 of file Title_State.h.
Referenced by Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::Title_State().
Zeni::Title_State::Title Zeni::Title_State< PLAY_STATE, INSTRUCTIONS_STATE >::title |