Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
include
lobby_menu_textures.h
Go to the documentation of this file.
1
#ifndef LOBBY_MENU_TEXTURES_H
2
#define LOBBY_MENU_TEXTURES_H
3
4
#ifndef LOGIC_ONLY
5
6
#include "
race.h
"
7
#include "
chess_color.h
"
8
9
#include <SFML/Graphics.hpp>
10
11
#include <map>
12
14
class
lobby_menu_textures
15
{
16
public
:
17
lobby_menu_textures
();
18
20
sf::Texture&
get_color
(
const
chess_color
color
)
noexcept
;
21
22
std::string
get_color_filename
(
23
const
chess_color
race
24
)
const
noexcept
;
25
27
sf::Texture&
get_head
(
const
race
r)
noexcept
;
28
29
std::string
get_head_filename
(
30
const
race
race
31
)
const
noexcept
;
32
34
sf::Texture&
get_ready
(
const
bool
is_ready)
noexcept
;
35
36
std::string
get_ready_filename
(
37
const
bool
is_ready
38
)
const
noexcept
;
39
40
int
get_n_textures
() const noexcept
41
{
42
return
sizeof
(*this) /
sizeof
(m_heads.at(
race::classic
));
43
}
44
45
private
:
46
47
std::map<race, sf::Texture> m_heads;
48
49
std::map<chess_color, sf::Texture> m_color;
50
51
std::map<bool, sf::Texture> m_ready;
52
53
};
54
55
#endif
// LOGIC_ONLY
56
57
#endif
// TEXTURES_H
chess_color.h
chess_color
chess_color
A chess piece color.
Definition
chess_color.h:10
lobby_menu_textures
The textures used in the Lobby dialog.
Definition
lobby_menu_textures.h:15
lobby_menu_textures::get_head
sf::Texture & get_head(const race r) noexcept
Get the head of a representative of the race.
Definition
lobby_menu_textures.cpp:93
lobby_menu_textures::get_n_textures
int get_n_textures() const noexcept
Definition
lobby_menu_textures.h:40
lobby_menu_textures::lobby_menu_textures
lobby_menu_textures()
Definition
lobby_menu_textures.cpp:11
lobby_menu_textures::get_head_filename
std::string get_head_filename(const race race) const noexcept
Definition
lobby_menu_textures.cpp:69
lobby_menu_textures::get_color_filename
std::string get_color_filename(const chess_color race) const noexcept
Definition
lobby_menu_textures.cpp:60
lobby_menu_textures::get_color
sf::Texture & get_color(const chess_color color) noexcept
Get an abstract chess color.
Definition
lobby_menu_textures.cpp:53
lobby_menu_textures::get_ready
sf::Texture & get_ready(const bool is_ready) noexcept
Get a texture to state if the person is ready yes/no.
Definition
lobby_menu_textures.cpp:78
lobby_menu_textures::get_ready_filename
std::string get_ready_filename(const bool is_ready) const noexcept
Definition
lobby_menu_textures.cpp:85
lobby_view_item::color
@ color
race.h
race
race
The chess race.
Definition
race.h:10
race::classic
@ classic
Generated by
1.9.8