Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
piece_action_textures.h
Go to the documentation of this file.
1#ifndef PIECE_ACTION_TEXTURES_H
2#define PIECE_ACTION_TEXTURES_H
3
4#ifndef LOGIC_ONLY
5
6#include "piece_action_type.h"
7
8#include <SFML/Graphics.hpp>
9
12{
13public:
15
16 std::string get_filename(
17 const piece_action_type item
18 ) const noexcept;
19
20 int get_n_textures() const noexcept
21 {
22 return sizeof(*this)
23 / sizeof(m_textures.at(piece_action_type::attack))
24 ;
25 }
26
29 sf::Texture& get_texture(
30 const piece_action_type t
31 ) noexcept;
32
33private:
34
35 std::map<piece_action_type, sf::Texture> m_textures;
36};
37
38#endif // LOGIC_ONLY
39
40#endif // TEXTURES_H
The textures for piece actions.
Definition piece_action_textures.h:12
sf::Texture & get_texture(const piece_action_type t) noexcept
Get an icon that accompanies a game option, to be used in the Options screen.
Definition piece_action_textures.cpp:35
piece_action_textures()
Definition piece_action_textures.cpp:10
std::string get_filename(const piece_action_type item) const noexcept
Definition piece_action_textures.cpp:26
int get_n_textures() const noexcept
Definition piece_action_textures.h:20
piece_action_type
The type of actions a piece can do.
Definition piece_action_type.h:9