23 #include <SDL2/SDL_rect.h> 35 typedef std::map<map_location, terrain_label>
label_map;
58 const int creator = -1,
59 const std::string&
team =
"",
61 const bool visible_in_fog =
true,
62 const bool visible_in_shroud =
false,
63 const bool immutable =
false,
64 const std::string& category =
"",
71 void enable(
bool is_enabled);
73 void clear(
const std::string&,
bool force);
88 template<
typename... T>
123 const bool visible_in_fog =
true,
124 const bool visible_in_shroud =
false,
125 const bool immutable =
false,
126 const std::string& category =
"",
166 return visible_in_fog_;
171 return visible_in_shroud_;
196 void update_info(
const t_string& text,
199 const std::string& team_name,
201 const bool visible_in_fog,
202 const bool visible_in_shroud,
203 const bool immutable,
204 const std::string& category);
207 void calculate_shroud();
212 bool viewable(
const display& disp)
const;
233 SDL_Rect get_rect()
const;
const map_labels * parent_
void recalculate_shroud()
const map_location & location() const
const color_t & color() const
map_labels & operator=(const map_labels &)
const std::vector< std::string > & all_categories() const
const std::string & category() const
const t_string & tooltip() const
const t_string & text() const
const std::string & team_name() const
bool visible_in_shroud() const
This class stores all the data for a single 'side' (in game nomenclature).
void set_text(const t_string &text)
std::map< map_location, terrain_label > label_map
std::vector< std::string > categories
const terrain_label * set_label(const map_location &loc, const t_string &text, const int creator=-1, const std::string &team="", const color_t color=font::NORMAL_COLOR, const bool visible_in_fog=true, const bool visible_in_shroud=false, const bool immutable=false, const std::string &category="", const t_string &tooltip="")
void clear(const std::string &, bool force)
map_labels(const map_labels &)
The basic class for representing 8-bit RGB or RGBA colour values.
void write(config &res) const
void enable(bool is_enabled)
const terrain_label * get_label(const map_location &loc, const std::string &team_name) const
bool visible_global_label(const map_location &) const
Returns whether or not a global (non-team) label can be shown at a specified location.
const color_t NORMAL_COLOR
Encapsulates the map of the game.
void set_team(const team *)
void recalculate_labels()
bool visible_in_fog() const
void clear_map(label_map &, bool)
const std::string & team_name() const
std::map< std::string, label_map > team_label_map
void read(const config &cfg)
To store label data Class implements logic for rendering.
terrain_label * add_label(T &&... args)
A config object defines a single node in a WML file, with access to child nodes.
terrain_label * get_label_private(const map_location &loc, const std::string &team_name)
std::string tooltip
Shown when hovering over an entry in the filter's drop-down list.