Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
draw.h
Go to the documentation of this file.
1#ifndef DRAW_H
2#define DRAW_H
3
4#ifndef LOGIC_ONLY
5
10
11#include "ccfwd.h"
12#include "chess_color.h"
13#include "side.h"
14#include "game_speed.h"
17#include <SFML/Graphics/Texture.hpp>
18#include <SFML/System/String.hpp>
19#include <SFML/Window/Keyboard.hpp>
20#include <SFML/Window/Mouse.hpp>
21
23void draw_about_button(const screen_rect& sr);
24
28void draw_big_text(const sf::String& s, const screen_rect& r);
29
32
34void draw_controls_label(const screen_rect& sr);
35
38
41
44 const sf::String& s,
45 const screen_rect& sr,
46 const int outer_character_size,
47 const int inner_character_size
48);
49
51void draw_game_speed_icon(const screen_rect& sr);
52
55 const screen_rect& sr,
56 const game_speed speed
57);
58
60void draw_huge_fancy_text(const sf::String& s, const screen_rect& sr);
61
71 const sf::Keyboard::Key& k,
72 const screen_rect& r
73);
74
82 const sf::Mouse::Button& k,
83 const screen_rect& r
84);
85
93 const sf::Keyboard::Key& k,
94 const screen_rect& r
95);
96
104 const sf::Keyboard::Key& k,
105 const screen_rect& r,
106 const sf::Color background_color = sf::Color::Black
107);
108
116 const sf::Keyboard::Key& k,
117 const screen_rect& r,
118 const sf::Color background_color = sf::Color::Black
119);
120
123
126 const screen_rect& sr,
127 const volume v
128);
129
134
135
155 const physical_controllers& pc,
157 const side p
158);
159
161void draw_normal_fancy_text(const sf::String& s, const screen_rect& sr);
162
166void draw_normal_text(const sf::String& s, const screen_rect& r);
167
173 const std::vector<sf::String>& s, const screen_rect& r
174);
175
177void draw_options_button(const screen_rect& sr);
178
180void draw_outline(
181 const screen_rect& sr,
182 const sf::Color& outline_color = sf::Color::Red,
183 const int outline_thickness = 5
184);
185
188
190void draw_quit_button(const screen_rect& sr);
191
193void draw_rectangle(const screen_rect& sr, const sf::Color& fill_color = sf::Color::Black);
194
197
200 const screen_rect& sr,
201 const volume v
202);
203
205void draw_start_button(const screen_rect& sr);
206
209
212 const screen_rect& sr,
214);
215
216
220void draw_text(
221 const sf::String& s,
222 const screen_rect& r,
223 const int character_size,
224 const sf::Color fill_color = sf::Color::Black
225);
226
229void draw_texts(
230 const std::vector<sf::String>& s,
231 const screen_rect& r,
232 const int character_size,
233 const sf::Color fill_color = sf::Color::Black
234);
235
237void draw_texture(sf::Texture& t, const screen_rect& r, const sf::Color& fill_color = sf::Color::Transparent);
238
239constexpr int get_normal_character_size() noexcept { return 32; }
240
241#endif // LOGIC_ONLY
242
243#endif // DRAW_H
chess_color
A chess piece color.
Definition chess_color.h:10
The navigation controls for a player.
Definition navigation_controls_layout.h:25
The physical controllers used by all players.
Definition physical_controllers.h:12
A rectangle-shaped area on the screen.
Definition screen_rect.h:15
A relative sound intensity.
Definition volume.h:10
void draw_game_speed_icon(const screen_rect &sr)
The button that shows the text 'Game Speed'.
Definition draw.cpp:117
void draw_rectangle(const screen_rect &sr, const sf::Color &fill_color=sf::Color::Black)
Draw a rectangle.
Definition draw.cpp:412
void draw_big_text(const sf::String &s, const screen_rect &r)
Draw the text on the main window.
Definition draw.cpp:43
constexpr int get_normal_character_size() noexcept
Definition draw.h:239
void draw_input_prompt_symbol(const sf::Keyboard::Key &k, const screen_rect &r)
Draw a symbol for a keyboard input prompt.
Definition draw.cpp:184
void draw_game_speed_value(const screen_rect &sr, const game_speed speed)
The button that shows the value for the game speed.
Definition draw.cpp:157
void draw_input_prompt_inverted_symbol(const sf::Keyboard::Key &k, const screen_rect &r)
Draw the inverted symbol for a keyboard input prompt.
Definition draw.cpp:173
void draw_physical_controller_symbol(const physical_controller_type &t, const screen_rect &sr)
Draw the fancy physical controller symbol.
Definition draw.cpp:370
void draw_normal_text(const sf::String &s, const screen_rect &r)
Draw the text on the main window.
Definition draw.cpp:319
void draw_music_volume_label(const screen_rect &sr)
The button that shows the text 'Music volume'.
Definition draw.cpp:226
void draw_text(const sf::String &s, const screen_rect &r, const int character_size, const sf::Color fill_color=sf::Color::Black)
Draw the text on the main window.
Definition draw.cpp:545
void draw_normal_fancy_text(const sf::String &s, const screen_rect &sr)
Draw fancy text at a normal size.
Definition draw.cpp:324
void draw_starting_position_label(const screen_rect &sr)
A fancy label that shows the text 'Starting position'.
Definition draw.cpp:493
void draw_controls_bar(const screen_rect &r)
Draw a controls bar for a menu where there is navigation required.
void draw_options_button(const screen_rect &sr)
Draw an Options menu button on the main window.
Definition draw.cpp:335
void draw_chessboard_strip_texture(const chess_color c, const screen_rect &sr)
Draw a chessboard strip texture.
Definition draw.cpp:48
void draw_sound_effects_volume_label(const screen_rect &sr)
The button that shows the text 'Sound effects volume'.
Definition draw.cpp:420
void draw_input_prompt_symbol_on_background(const sf::Keyboard::Key &k, const screen_rect &r, const sf::Color background_color=sf::Color::Black)
Draw a symbol for a keyboard input prompt on a background.
Definition draw.cpp:216
void draw_quit_button(const screen_rect &sr)
Draw a Quit menu button on the main window.
Definition draw.cpp:380
void draw_controls_label(const screen_rect &sr)
A fancy label that shows the text 'Controls'.
Definition draw.cpp:56
void draw_huge_fancy_text(const sf::String &s, const screen_rect &sr)
Draw fancy text at a huge size.
Definition draw.cpp:167
void draw_fancy_text(const sf::String &s, const screen_rect &sr, const int outer_character_size, const int inner_character_size)
Draw fancy text at any custom size.
Definition draw.cpp:105
void draw_music_volume_value(const screen_rect &sr, const volume v)
The button that shows the value of the music.
Definition draw.cpp:266
void draw_fancy_physical_controller_type(const physical_controller_type &t, const screen_rect &sr)
Draw the fancy physical controller texture.
Definition draw.cpp:86
void draw_texts(const std::vector< sf::String > &s, const screen_rect &r, const int character_size, const sf::Color fill_color=sf::Color::Black)
Draw the texts on the main window, using one row per element.
Definition draw.cpp:563
void draw_start_button(const screen_rect &sr)
Draw a Start menu button on the main window.
Definition draw.cpp:472
void draw_input_prompt_inverted_symbol_on_background(const sf::Keyboard::Key &k, const screen_rect &r, const sf::Color background_color=sf::Color::Black)
Draw a symbol for a keyboard input prompt on a background.
Definition draw.cpp:206
void draw_sound_effects_volume_value(const screen_rect &sr, const volume v)
The button that shows the value of the music.
Definition draw.cpp:460
void draw_about_button(const screen_rect &sr)
Draw an About menu button on the main window.
Definition draw.cpp:21
void draw_texture(sf::Texture &t, const screen_rect &r, const sf::Color &fill_color=sf::Color::Transparent)
Draw the texture on the main window scaled to that size.
Definition draw.cpp:591
void draw_starting_position_value(const screen_rect &sr, const starting_position_type t)
A fancy label that shows the value of the starting position.
Definition draw.cpp:533
void draw_fancy_physical_controller_label(const physical_controller_type &t, const screen_rect &sr)
Draw the fancy physical controller texture with a text on it.
Definition draw.cpp:80
void draw_outline(const screen_rect &sr, const sf::Color &outline_color=sf::Color::Red, const int outline_thickness=5)
Draw a thick, red outline at the edges of this rectangle.
Definition draw.cpp:356
void draw_navigation_controls(const physical_controllers &pc, const navigation_controls_layout &r, const side p)
Draw the navigation controls for a player.
Definition draw.cpp:277
void draw_normal_texts(const std::vector< sf::String > &s, const screen_rect &r)
Draw the texts on the main window, using one row per element.
Definition draw.cpp:330
game_speed
The game speed.
Definition game_speed.h:11
physical_controller_type
The type of controller.
Definition physical_controller_type.h:15
side
The side the player/piece is on.
Definition side.h:11
starting_position_type
The starting position type.
Definition starting_position_type.h:10