Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
physical_controller_textures.h
Go to the documentation of this file.
1#ifndef PHYSICAL_CONTROLLER_TEXTURES_H
2#define PHYSICAL_CONTROLLER_TEXTURES_H
3
4#ifndef LOGIC_ONLY
5
7
8#include <SFML/Graphics/Texture.hpp>
9
10#include <map>
11
14{
15public:
17
19 sf::Texture& get_fancy(const physical_controller_type t) noexcept;
20
22 sf::Texture& get_symbol(const physical_controller_type t) noexcept;
23
24 std::string get_fancy_filename(const physical_controller_type t) const noexcept;
25
26 std::string get_filename(const physical_controller_type t) const noexcept;
27
28 int get_n_textures() const noexcept
29 {
30 return sizeof(*this) / sizeof(m_symbols.at(physical_controller_type::mouse));
31 }
32
33private:
34
35
36 std::map<physical_controller_type, sf::Texture> m_fancy_textures;
37 std::map<physical_controller_type, sf::Texture> m_symbols;
38};
39
40#endif // LOGIC_ONLY
41
42#endif // PHYSICAL_CONTROLLER_TEXTURES_H
The textures used in the Lobby dialog.
Definition physical_controller_textures.h:14
physical_controller_textures()
Definition physical_controller_textures.cpp:10
std::string get_filename(const physical_controller_type t) const noexcept
Definition physical_controller_textures.cpp:57
std::string get_fancy_filename(const physical_controller_type t) const noexcept
Definition physical_controller_textures.cpp:50
sf::Texture & get_fancy(const physical_controller_type t) noexcept
Get a fancy image for a controller type.
Definition physical_controller_textures.cpp:43
sf::Texture & get_symbol(const physical_controller_type t) noexcept
Get a symbol for a controller type.
Definition physical_controller_textures.cpp:66
int get_n_textures() const noexcept
Definition physical_controller_textures.h:28
physical_controller_type
The type of controller.
Definition physical_controller_type.h:15