Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
options_view_layout.h
Go to the documentation of this file.
1#ifndef OPTIONS_VIEW_LAYOUT_H
2#define OPTIONS_VIEW_LAYOUT_H
3
4#include "screen_rect.h"
5#include "layout.h"
6#include "options_view_item.h"
7#include "side.h"
8#include "board_layout.h"
9//#include "read_only.h"
10
11#include <vector>
12
50
55class options_view_layout
56{
57public:
58 explicit options_view_layout(
60 const int margin_width = get_default_margin_width()
61 );
62
63 const screen_rect& get_background() const noexcept { return m_background; }
64
65 const screen_rect& get_selectable_rect(const options_view_item item) const noexcept;
66
67 const screen_rect& get_game_speed_label() const noexcept { return m_game_speed_label; }
68 const screen_rect& get_game_speed_value() const noexcept { return m_game_speed_value; }
69
70 const screen_rect& get_music_volume_label() const noexcept { return m_music_volume_label; }
71 const screen_rect& get_music_volume_value() const noexcept { return m_music_volume_value; }
72
73 const screen_rect& get_sound_effects_volume_label() const noexcept { return m_sound_effects_volume_label; }
74 const screen_rect& get_sound_effects_volume_value() const noexcept { return m_sound_effects_volume_value; }
75
76 const screen_rect& get_starting_pos_label() const noexcept { return m_starting_pos_label; }
77 const screen_rect& get_starting_pos_value() const noexcept { return m_starting_pos_value; }
78
79 const board_layout& get_chess_board() const noexcept { return m_chess_board; }
80
82 const screen_rect& get_controls_label() const noexcept { return m_controls_label; }
83
85 const screen_rect& get_controller_type_value(const side player_side) const noexcept;
86
87private:
88
89 screen_rect m_background;
90 board_layout m_chess_board;
91 screen_rect m_controls_label;
92 screen_rect m_game_speed_label;
93 screen_rect m_game_speed_value;
94 screen_rect m_left_controls_value;
95 screen_rect m_music_volume_label;
96 screen_rect m_music_volume_value;
97 screen_rect m_right_controls_value;
98 screen_rect m_sound_effects_volume_label;
99 screen_rect m_sound_effects_volume_value;
100 screen_rect m_starting_pos_label;
101 screen_rect m_starting_pos_value;
102};
103
105std::vector<screen_rect> get_panels(const options_view_layout& layout);
106
109
110#endif // OPTIONS_VIEW_LAYOUT_H
std::vector< screen_rect > get_panels(const about_view_layout &layout)
Get the panels in the layout.
Definition about_view_layout.cpp:57
The layout of a chess board.
Definition board_layout.h:15
A rectangle-shaped area on the screen.
Definition screen_rect.h:15
constexpr int get_default_margin_width() noexcept
Get the default margin width/size, in pixels.
Definition layout.h:7
options_view_item
A selectable item at in the Options menu.
Definition options_view_item.h:12
void test_options_view_layout()
Definition options_view_layout.cpp:142
screen_rect get_default_screen_rect() noexcept
Get the default screen rectangle.
Definition screen_rect.cpp:140
side
The side the player/piece is on.
Definition side.h:11