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

The Options dialog. More...

#include <options_view.h>

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

Public Member Functions

 options_view ()
 
void draw_impl () override
 Draw the menu on the main window.
 
const auto & get_game_options () const noexcept
 
const auto & get_layout () const noexcept
 
const auto & get_physical_controllers () const noexcept
 
options_view_item get_selected () const noexcept
 
bool has_accepted () const noexcept
 Has the user accepted these settings?
 
bool process_event_impl (sf::Event &event) override
 Process all events.
 
void process_resize_event_impl (sf::Event &event) override
 Process a resize event.
 
void set_game_options (const game_options &go) noexcept
 Set the game options.
 
void set_selected (const options_view_item i)
 Select an item.
 
void start_impl () override
 Prepare this window for being shown.
 
void stop_impl () override
 Clean up after this window has been shown.
 
void tick_impl (const delta_t dt) override
 Run the game, until the user quits.
 
- 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 Options dialog.

Constructor & Destructor Documentation

◆ options_view()

options_view::options_view ( )
explicit

Member Function Documentation

◆ draw_impl()

void options_view::draw_impl ( )
overridevirtual

Draw the menu on the main window.

Implements view.

◆ get_game_options()

const auto & options_view::get_game_options ( ) const
inlinenoexcept

◆ get_layout()

const auto & options_view::get_layout ( ) const
inlinenoexcept

◆ get_physical_controllers()

const auto & options_view::get_physical_controllers ( ) const
inlinenoexcept

◆ get_selected()

options_view_item options_view::get_selected ( ) const
inlinenoexcept

◆ has_accepted()

bool options_view::has_accepted ( ) const
inlinenoexcept

Has the user accepted these settings?

This is signalled by how this window is closed:

  • Enter: yes, accept
  • Escape: no, reject, keep old game options

◆ process_event_impl()

bool options_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 options_view::process_resize_event_impl ( sf::Event &  event)
overridevirtual

Process a resize event.

Implements view.

◆ set_game_options()

void options_view::set_game_options ( const game_options go)
inlinenoexcept

Set the game options.

This is used by the main window, that holds the game options that are used in the rest of the game.

◆ set_selected()

void options_view::set_selected ( const options_view_item  i)

Select an item.

Play a sound when the selected item changes

◆ start_impl()

void options_view::start_impl ( )
overridevirtual

Prepare this window for being shown.

Implements view.

◆ stop_impl()

void options_view::stop_impl ( )
overridevirtual

Clean up after this window has been shown.

Implements view.

◆ tick_impl()

void options_view::tick_impl ( const delta_t  dt)
overridevirtual

Run the game, until the user quits.

Implements view.


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