zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Popup_State Class Reference

#include <Popup_State.h>

Inherits Zeni::Widget_Gamestate.

Inherited by Zeni::Popup_Menu_State, and Zeni::Popup_Pause_State.

Public Member Functions

 Popup_State ()
 
- 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_cover ()
 Called when a Gamestate is pushed on top of this Gamestate in Game. More...
 
virtual void on_event (const SDL_Event &event)
 First check for events. Called by Game as part of the main gameloop. More...
 
virtual void on_uncover ()
 Called when a Gamestate is popped off Game, making this Gamestate on top. More...
 
void set_pausable (const bool &pausable_)
 

Protected Member Functions

void on_key (const SDL_KeyboardEvent &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 prerender ()
 No actual rendering, but any logic strictly necessary for rendering. More...
 
void render ()
 Then render. Called by Game as part of the main gameloop. 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

Gamestate m_gamestate
 
- Protected Attributes inherited from Zeni::Widget_Gamestate
Widgets m_widgets
 

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...
 

Detailed Description

Definition at line 32 of file Popup_State.h.

Constructor & Destructor Documentation

Zeni::Popup_State::Popup_State ( )
inline

Definition at line 37 of file Popup_State.h.

Member Function Documentation

void Zeni::Popup_State::on_key ( const SDL_KeyboardEvent event)
inlineprotectedvirtual

Override this input callback in your Gamestates. See SDL documentation for details.

Reimplemented from Zeni::Gamestate_Base.

Definition at line 69 of file Popup_State.h.

References Zeni::get_Game(), SDL_KeyboardEvent::keysym, Zeni::Gamestate::on_event(), Zeni::Game::pop_state(), SDL_PRESSED, SDLK_ESCAPE, SDL_KeyboardEvent::state, and SDL_Keysym::sym.

void Zeni::Popup_State::on_pop ( )
inlineprotectedvirtual
void Zeni::Popup_State::perform_logic ( )
inlineprotectedvirtual

Then perform logic. Called by Game as part of the main gameloop.

Reimplemented from Zeni::Gamestate_Base.

Reimplemented in Zeni::Popup_Pause_State.

Definition at line 77 of file Popup_State.h.

References Zeni::Widget_Gamestate::perform_logic().

void Zeni::Popup_State::prerender ( )
inlineprotectedvirtual

No actual rendering, but any logic strictly necessary for rendering.

Reimplemented from Zeni::Gamestate_Base.

Definition at line 84 of file Popup_State.h.

References Zeni::Gamestate_Base::prerender().

void Zeni::Popup_State::render ( )
inlineprotectedvirtual

Then render. Called by Game as part of the main gameloop.

Reimplemented from Zeni::Gamestate_Base.

Reimplemented in Zeni::Popup_Pause_State.

Definition at line 90 of file Popup_State.h.

References Zeni::Color::a, Zeni::Video::clear_depth_buffer(), Zeni::get_Colors(), Zeni::get_Video(), Zeni::Video::render(), and Zeni::Video::set_2d().

Referenced by Zeni::Popup_Pause_State::render().

Member Data Documentation

Gamestate Zeni::Popup_State::m_gamestate
protected

Definition at line 111 of file Popup_State.h.


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