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