11#include <SFML/Graphics.hpp>
55std::
string to_str(const sf::Keyboard::Key k);
58std::
string to_str(const sf::Mouse::Button k);
chess_color
A chess piece color.
Definition chess_color.h:10
The coordinate on a screen.
Definition screen_coordinate.h:12
A rectangle-shaped area on the screen.
Definition screen_rect.h:15
piece_action_type
The type of actions a piece can do.
Definition piece_action_type.h:9
std::string key_str_to_resource_name(std::string key_str)
Convert an SFML key that has already been converted to a filename to a filename, as used by input_pro...
Definition sfml_helper.cpp:74
sf::Color f_shield_to_color(const double f)
Convert a fraction of shield (i.e. a value e [0.0, 1.0] to a color.
Definition sfml_helper.cpp:35
std::vector< sf::Keyboard::Key > get_all_sfml_keys() noexcept
Get all the SFML keys.
Definition sfml_helper.cpp:55
void test_sfml_helper()
Tes these function.
Definition sfml_helper.cpp:176
std::vector< sf::Mouse::Button > get_all_sfml_buttons() noexcept
Get all the SFML mouse buttons.
Definition sfml_helper.cpp:45
bool is_shift_pressed() noexcept
Determine if the left or right shift has been pressed.
Definition sfml_helper.cpp:66
std::string to_resource_name(const sf::Keyboard::Key k)
Convert an SFML key to a filename, as used by input_prompt_textures}.
Definition sfml_helper.cpp:631
void set_text_position(sf::Text &text, const screen_rect &screen_rect)
Make 'text' have the same size and position as the 'screen_rect' Assumes the text already has a font ...
Definition sfml_helper.cpp:153
void set_rect(sf::RectangleShape &rectangle, const screen_coordinate &screen_size)
Make 'rectangle' have the same size as the screen_coordinat}.
Definition sfml_helper.cpp:124
std::string to_str(const sf::Keyboard::Key k)
Convert an SFML key to a string.
Definition sfml_helper.cpp:642
sf::Color f_health_to_color(const double f)
Convert a fraction of health (i.e. a value e [0.0, 1.0] to a color.
Definition sfml_helper.cpp:25
std::string to_inverted_resource_name(const sf::Keyboard::Key k)
Convert an SFML key to a filename, as used by input_prompt_textures}.
Definition sfml_helper.cpp:618
std::string to_one_char_str(const sf::Keyboard::Key)
Convert a key to its one-character description.
Definition sfml_helper.cpp:520
sf::Color to_sfml_color(const chess_color color) noexcept
Convert chess_color to sf::Color.
Definition sfml_helper.cpp:566