![]() |
Conquer Chess
Chess and Starcraft combined
|
#include "draw.h"#include "board_layout.h"#include "game_options.h"#include "square_layout.h"#include "game_resources.h"#include "physical_controllers.h"#include "piece.h"#include "render_window.h"#include "sfml_helper.h"#include "navigation_controls_layout.h"#include <SFML/Graphics/RectangleShape.hpp>#include <cassert>#include <sstream>
Functions | |
| void | draw_about_button (const screen_rect &sr) |
| Draw an About menu button on the main window. | |
| void | draw_big_text (const sf::String &s, const screen_rect &sr) |
| Draw the text on the main window. | |
| void | draw_chessboard_strip_texture (const chess_color c, const screen_rect &sr) |
| Draw a chessboard strip texture. | |
| void | draw_controls_label (const screen_rect &sr) |
| A fancy label that shows the text 'Controls'. | |
| 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. | |
| void | draw_fancy_physical_controller_type (const physical_controller_type &t, const screen_rect &sr) |
| Draw the fancy physical controller texture. | |
| 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. | |
| void | draw_game_speed_icon (const screen_rect &sr) |
| The button that shows the text 'Game Speed'. | |
| void | draw_game_speed_value (const screen_rect &sr, const game_speed speed) |
| The button that shows the value for the game speed. | |
| void | draw_huge_fancy_text (const sf::String &s, const screen_rect &sr) |
| Draw fancy text at a huge size. | |
| void | draw_input_prompt_inverted_symbol (const sf::Keyboard::Key &k, const screen_rect &r) |
| Draw the inverted symbol for a keyboard input prompt. | |
| void | draw_input_prompt_symbol (const sf::Keyboard::Key &k, const screen_rect &r) |
| Draw a symbol for a keyboard input prompt. | |
| void | draw_input_prompt_symbol (const sf::Mouse::Button &k, const screen_rect &r) |
| Draw a symbol for a mouse input prompt. | |
| void | draw_input_prompt_inverted_symbol_on_background (const sf::Keyboard::Key &k, const screen_rect &r, const sf::Color background_color) |
| Draw a symbol for a keyboard input prompt on a background. | |
| void | draw_input_prompt_symbol_on_background (const sf::Keyboard::Key &k, const screen_rect &r, const sf::Color background_color) |
| Draw a symbol for a keyboard input prompt on a background. | |
| void | draw_music_volume_label (const screen_rect &sr) |
| The button that shows the text 'Music volume'. | |
| void | draw_music_volume_value (const screen_rect &sr, const volume v) |
| The button that shows the value of the music. | |
| void | draw_navigation_controls (const physical_controllers &pc, const navigation_controls_layout &layout, const side p) |
| Draw the navigation controls for a player. | |
| void | draw_normal_text (const sf::String &s, const screen_rect &sr) |
| Draw the text on the main window. | |
| void | draw_normal_fancy_text (const sf::String &s, const screen_rect &sr) |
| Draw fancy text at a normal size. | |
| 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. | |
| void | draw_options_button (const screen_rect &sr) |
| Draw an Options menu button on the main window. | |
| void | draw_outline (const screen_rect &sr, const sf::Color &outline_color, const int outline_thickness) |
| Draw a thick, red outline at the edges of this rectangle. | |
| void | draw_physical_controller_symbol (const physical_controller_type &t, const screen_rect &sr) |
| Draw the fancy physical controller symbol. | |
| void | draw_quit_button (const screen_rect &sr) |
| Draw a Quit menu button on the main window. | |
| void | draw_rectangle (const screen_rect &sr, const sf::Color &fill_color) |
| Draw a rectangle. | |
| void | draw_sound_effects_volume_label (const screen_rect &sr) |
| The button that shows the text 'Sound effects volume'. | |
| void | draw_sound_effects_volume_value (const screen_rect &sr, const volume v) |
| The button that shows the value of the music. | |
| void | draw_start_button (const screen_rect &sr) |
| Draw a Start menu button on the main window. | |
| void | draw_starting_position_label (const screen_rect &sr) |
| A fancy label that shows the text 'Starting position'. | |
| 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. | |
| void | draw_text (const sf::String &s, const screen_rect &sr, const int character_size, const sf::Color fill_color) |
| Draw the text on the main window. | |
| void | draw_texts (const std::vector< sf::String > &s, const screen_rect &r, const int character_size, const sf::Color fill_color) |
| Draw the texts on the main window, using one row per element. | |
| void | draw_texture (sf::Texture &t, const screen_rect &sr, const sf::Color &fill_color) |
| Draw the texture on the main window scaled to that size. | |
| void | draw_texture (sf::Texture &t, const screen_coordinate &c, const screen_coordinate &size) |
| void draw_about_button | ( | const screen_rect & | sr | ) |
Draw an About menu button on the main window.
| void draw_big_text | ( | const sf::String & | s, |
| const screen_rect & | r | ||
| ) |
Draw the text on the main window.
Use Ariel font, 48 pixels, black letters and bold face
| void draw_chessboard_strip_texture | ( | const chess_color | c, |
| const screen_rect & | sr | ||
| ) |
Draw a chessboard strip texture.
| void draw_controls_label | ( | const screen_rect & | sr | ) |
A fancy label that shows the text 'Controls'.
| 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.
| void draw_fancy_physical_controller_type | ( | const physical_controller_type & | t, |
| const screen_rect & | sr | ||
| ) |
Draw the fancy physical controller texture.
| 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.
| void draw_game_speed_icon | ( | const screen_rect & | sr | ) |
The button that shows the text 'Game Speed'.
| void draw_game_speed_value | ( | const screen_rect & | sr, |
| const game_speed | speed | ||
| ) |
The button that shows the value for the game speed.
| void draw_huge_fancy_text | ( | const sf::String & | s, |
| const screen_rect & | sr | ||
| ) |
Draw fancy text at a huge size.
| void draw_input_prompt_inverted_symbol | ( | const sf::Keyboard::Key & | k, |
| const screen_rect & | r | ||
| ) |
Draw the inverted symbol for a keyboard input prompt.
For example, a symbol for the key A
@seealso Use draw_input_prompt_symbol} for the regular symbol
| 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.
For example, a symbol for the key A on a black background
@seealso Use draw_input_prompt_symbol_on_background} for the regular symbol
| void draw_input_prompt_symbol | ( | const sf::Keyboard::Key & | k, |
| const screen_rect & | r | ||
| ) |
Draw a symbol for a keyboard input prompt.
For example, a symbol for the key A
@seealso
| void draw_input_prompt_symbol | ( | const sf::Mouse::Button & | k, |
| const screen_rect & | r | ||
| ) |
Draw a symbol for a mouse input prompt.
For example, a symbol for the left mouse button
@seealso
| 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.
For example, a symbol for the key A on a black background
@seealso Use draw_input_prompt_inverted_symbol_on_background} for the inverted symbol
| void draw_music_volume_label | ( | const screen_rect & | sr | ) |
The button that shows the text 'Music volume'.
| void draw_music_volume_value | ( | const screen_rect & | sr, |
| const volume | v | ||
| ) |
The button that shows the value of the music.
| void draw_navigation_controls | ( | const physical_controllers & | pc, |
| const navigation_controls_layout & | r, | ||
| const side | p | ||
| ) |
Draw the navigation controls for a player.
Must be 3x64 pixels wide and 2x64 pixels high For a keyboard:
For a mouse
| void draw_normal_fancy_text | ( | const sf::String & | s, |
| const screen_rect & | sr | ||
| ) |
Draw fancy text at a normal size.
| void draw_normal_text | ( | const sf::String & | s, |
| const screen_rect & | r | ||
| ) |
Draw the text on the main window.
Use Ariel font, 32 pixels, black letters and bold face
| 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.
Use Ariel font, 32 pixels, black letters and bold face
| void draw_options_button | ( | const screen_rect & | sr | ) |
Draw an Options menu button on the main window.
| void draw_outline | ( | const screen_rect & | sr, |
| const sf::Color & | outline_color, | ||
| const int | outline_thickness | ||
| ) |
Draw a thick, red outline at the edges of this rectangle.
| void draw_physical_controller_symbol | ( | const physical_controller_type & | t, |
| const screen_rect & | sr | ||
| ) |
Draw the fancy physical controller symbol.
| void draw_quit_button | ( | const screen_rect & | sr | ) |
Draw a Quit menu button on the main window.
| void draw_rectangle | ( | const screen_rect & | sr, |
| const sf::Color & | fill_color | ||
| ) |
Draw a rectangle.
| void draw_sound_effects_volume_label | ( | const screen_rect & | sr | ) |
The button that shows the text 'Sound effects volume'.
| void draw_sound_effects_volume_value | ( | const screen_rect & | sr, |
| const volume | v | ||
| ) |
The button that shows the value of the music.
| void draw_start_button | ( | const screen_rect & | sr | ) |
Draw a Start menu button on the main window.
| void draw_starting_position_label | ( | const screen_rect & | sr | ) |
A fancy label that shows the text 'Starting position'.
| 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.
| 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.
Use Ariel font, black letters and bold face
| void draw_texts | ( | const std::vector< sf::String > & | s, |
| const screen_rect & | r, | ||
| const int | character_size, | ||
| const sf::Color | fill_color | ||
| ) |
Draw the texts on the main window, using one row per element.
| void draw_texture | ( | sf::Texture & | t, |
| const screen_coordinate & | c, | ||
| const screen_coordinate & | size | ||
| ) |
| void draw_texture | ( | sf::Texture & | t, |
| const screen_rect & | sr, | ||
| const sf::Color & | fill_color | ||
| ) |
Draw the texture on the main window scaled to that size.