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

The abstract base class of all other views. More...

#include <view.h>

Inheritance diagram for view:
Inheritance graph
[legend]

Public Member Functions

 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 abstract base class of all other views.

Class name Descripion
about_view Shows contributors
controls_view Setup the controls
game_view Playing the game
loading_view Loading the game
lobby_view The lobby
menu_view The main menu
options_view Game settings
played_game_view View a played game

Constructor & Destructor Documentation

◆ view()

view::view ( )

◆ ~view()

view::~view ( )
virtual

Member Function Documentation

◆ clear_next_state()

void view::clear_next_state ( )

Clear the next state.

◆ draw()

void view::draw ( )

Draw the menu on the main window.

◆ get_next_state()

const auto & view::get_next_state ( ) const
inlinenoexcept

The next state to go to, if any.

◆ is_active()

bool view::is_active ( ) const
inlinenoexcept

Is this window active?

It can be activated by 'start' and deactivated by 'stop'

◆ process_event()

bool view::process_event ( sf::Event &  e)

Process an event.

◆ process_resize_event()

void view::process_resize_event ( sf::Event &  event)

Process a resize event.

◆ set_is_active()

void view::set_is_active ( const bool  is_active)

Set if this window is active.

◆ set_next_state()

void view::set_next_state ( const program_state  next_state)

Set the next state to go to.

Use clear_next_state} to clear the next state

◆ start()

void view::start ( )

Prepare this window for being shown.

◆ stop()

void view::stop ( )

Clean up after this window has been shown.

◆ tick()

void view::tick ( const delta_t  dt)

Run the game, until the user quits.


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