Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Public Member Functions | List of all members
game_view Class Reference

The Game dialog. More...

#include <game_view.h>

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

Public Member Functions

 game_view ()
 
void draw_impl () override
 Show the game on-screen.
 
void tick_impl (delta_t dt) override
 Run the game, until the user quits.
 
double get_elapsed_time_secs () const noexcept
 The the elapsed time in seconds.
 
const auto & get_game () const noexcept
 
const auto & get_game_controller () const noexcept
 
const auto & get_game_options () const noexcept
 
const auto & get_layout () const noexcept
 
const auto & get_log () const noexcept
 Get the text log, i.e. things pieces have to say.
 
const auto & get_physical_controllers () const noexcept
 
replay get_replay () const
 
bool process_event_impl (sf::Event &event) override
 Process all events.
 
void process_resize_event_impl (sf::Event &event) override
 Process a resize events.
 
void set_game_options (const game_options &go) noexcept
 
void set_lobby_options (const lobby_options &lo) noexcept
 
void start_impl () override
 Prepare this window for being shown.
 
void stop_impl () override
 Clean up after this window has been shown.
 
- Public Member Functions inherited from view
 view ()
 
virtual ~view ()
 
void clear_next_state ()
 Clear the next state.
 
void draw ()
 Draw the menu on the main window.
 
const auto & get_next_state () const noexcept
 The next state to go to, if any.
 
bool is_active () const noexcept
 Is this window active?
 
bool process_event (sf::Event &e)
 Process an event.
 
void process_resize_event (sf::Event &event)
 Process a resize event.
 
void set_is_active (const bool is_active)
 Set if this window is active.
 
void set_next_state (const program_state next_state)
 Set the next state to go to.
 
void start ()
 Prepare this window for being shown.
 
void stop ()
 Clean up after this window has been shown.
 
void tick (const delta_t dt)
 Run the game, until the user quits.
 

Detailed Description

The Game dialog.

The Game dialog shows the game and displays the game} class. Here is where most of the action happens.

Constructor & Destructor Documentation

◆ game_view()

game_view::game_view ( )
explicit

Member Function Documentation

◆ draw_impl()

void game_view::draw_impl ( )
overridevirtual

Show the game on-screen.

Implements view.

◆ get_elapsed_time_secs()

double game_view::get_elapsed_time_secs ( ) const
noexcept

The the elapsed time in seconds.

◆ get_game()

const auto & game_view::get_game ( ) const
inlinenoexcept

◆ get_game_controller()

const auto & game_view::get_game_controller ( ) const
inlinenoexcept

◆ get_game_options()

const auto & game_view::get_game_options ( ) const
inlinenoexcept

◆ get_layout()

const auto & game_view::get_layout ( ) const
inlinenoexcept

◆ get_log()

const auto & game_view::get_log ( ) const
inlinenoexcept

Get the text log, i.e. things pieces have to say.

◆ get_physical_controllers()

const auto & game_view::get_physical_controllers ( ) const
inlinenoexcept

◆ get_replay()

replay game_view::get_replay ( ) const

◆ process_event_impl()

bool game_view::process_event_impl ( sf::Event &  event)
overridevirtual

Process all events.

Returns
if the user wants to quit

Implements view.

◆ process_resize_event_impl()

void game_view::process_resize_event_impl ( sf::Event &  event)
overridevirtual

Process a resize events.

Implements view.

◆ set_game_options()

void game_view::set_game_options ( const game_options go)
inlinenoexcept

◆ set_lobby_options()

void game_view::set_lobby_options ( const lobby_options lo)
noexcept

◆ start_impl()

void game_view::start_impl ( )
overridevirtual

Prepare this window for being shown.

Implements view.

◆ stop_impl()

void game_view::stop_impl ( )
overridevirtual

Clean up after this window has been shown.

Implements view.

◆ tick_impl()

void game_view::tick_impl ( delta_t  dt)
overridevirtual

Run the game, until the user quits.

Implements view.


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