15#include <SFML/Graphics.hpp>
28 const auto&
get_layout() const noexcept {
return m_layout; }
66 bool m_has_accepted{
false};
72 options_view_layout m_layout;
82 void decrease_selected();
86 void increase_selected();
93 const std::string panel_text,
chess_color
A chess piece color.
Definition chess_color.h:10
Definition controls_bar.h:12
A change of in_game_time}.
Definition delta_t.h:12
Options for the game.
Definition game_options.h:18
The Options dialog.
Definition options_view.h:19
const auto & get_layout() const noexcept
Definition options_view.h:28
options_view_item get_selected() const noexcept
Definition options_view.h:32
void draw_impl() override
Draw the menu on the main window.
Definition options_view.cpp:277
void process_resize_event_impl(sf::Event &event) override
Process a resize event.
Definition options_view.cpp:254
void tick_impl(const delta_t dt) override
Run the game, until the user quits.
Definition options_view.cpp:434
const auto & get_physical_controllers() const noexcept
Definition options_view.h:30
void stop_impl() override
Clean up after this window has been shown.
Definition options_view.cpp:427
const auto & get_game_options() const noexcept
Definition options_view.h:26
bool has_accepted() const noexcept
Has the user accepted these settings?
Definition options_view.h:39
options_view()
Definition options_view.cpp:24
bool process_event_impl(sf::Event &event) override
Process all events.
Definition options_view.cpp:93
void set_game_options(const game_options &go) noexcept
Set the game options.
Definition options_view.h:52
void set_selected(const options_view_item i)
Select an item.
Definition options_view.cpp:268
void start_impl() override
Prepare this window for being shown.
Definition options_view.cpp:421
The physical controllers used by all players.
Definition physical_controllers.h:12
A rectangle-shaped area on the screen.
Definition screen_rect.h:15
The abstract base class of all other views.
Definition view.h:26
void draw_panel(options_view &v, const screen_rect &panel_position, const std::string panel_text, const chess_color color)
Definition options_view.cpp:79
void draw_pieces(options_view &view)
Show all the pieces in the initial position.
Definition options_view.cpp:358
void draw_game_speed(options_view &v)
Show the game speed label and value.
Definition options_view.cpp:350
void draw_sound_effects_volume(options_view &v)
Show the sound effects volume label and value.
Definition options_view.cpp:414
void draw_background(options_view &v)
Show the bottom part.
Definition options_view.cpp:308
void draw_layout_panels(options_view &v)
Show all the layout panels.
Definition options_view.cpp:391
void draw_bottom_row(options_view &v, const side player_side)
Show the left player's settings of the bottom part, i.e.
Definition options_view.cpp:330
void draw_starting_position(options_view &v)
Show the starting position label and value.
Definition options_view.cpp:371
void draw_music_volume(options_view &v)
Show the music volume label and value.
Definition options_view.cpp:402
void draw_bottom(options_view &v)
Show the bottom part.
Definition options_view.cpp:316
void draw_bottom_header(options_view &v)
Show the header of the bottom part, i.e.
Definition options_view.cpp:323
void draw_selected_panel(options_view &v)
Show the selected panel.
Definition options_view.cpp:409
void draw_top(options_view &v)
Show the top part.
Definition options_view.cpp:378
options_view_item
A selectable item at in the Options menu.
Definition options_view_item.h:12
side
The side the player/piece is on.
Definition side.h:11