15 #ifndef MAP_LABEL_HPP_INCLUDED
16 #define MAP_LABEL_HPP_INCLUDED
32 typedef std::map<map_location, terrain_label *>
label_map;
49 const int creator = -1,
52 const bool visible_in_fog =
true,
53 const bool visible_in_shroud =
false,
54 const bool immutable =
false,
59 void enable(
bool is_enabled);
134 const SDL_Color&
color()
const;
148 const SDL_Color color,
149 const bool visible_in_fog,
150 const bool visible_in_shroud,
151 const bool immutable,
const map_labels * parent_
void recalculate_shroud()
std::map< map_location, terrain_label * > label_map
std::string cfg_color() const
map_labels & operator=(const map_labels &)
const std::vector< std::string > & all_categories() const
void write(config &res) const
const map_location & location() const
bool hidden() const
This is a lightweight test used to see if labels are revealed as a result of unit actions (i...
const SDL_Color NORMAL_COLOR
const terrain_label & operator=(const terrain_label &)
void update_info(const t_string &, const int creator, const t_string &, const std::string &, const SDL_Color)
const terrain_label * set_label(const map_location &loc, const t_string &text, const int creator=-1, const std::string &team="", const SDL_Color 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="")
const std::string & team_name() const
const SDL_Color & color() const
This class stores all the data for a single 'side' (in game nomenclature).
const t_string & text() const
std::vector< std::string > categories
const std::string & category() const
bool viewable(const display_context &dc) const
This is a test used to see if we should bother with the overhead of actually creating a label...
void clear(const std::string &, bool force)
map_labels(const map_labels &)
terrain_label(const t_string &text, const int creator, const std::string &team_name, const map_location &loc, const map_labels &parent, const SDL_Color 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="")
creating new label
void enable(bool is_enabled)
terrain_label * get_label_private(const map_location &loc, const std::string &team_name)
For our private use, a wrapper for get_label() that can return a pointer to a non-const terrain_label...
const std::string & team_name() const
const display & disp() const
const terrain_label * get_label(const map_location &loc, const std::string &team_name) const
Encapsulates the map of the game.
void set_team(const team *)
void add_label(const map_location &, terrain_label *)
void recalculate_labels()
void read(const config &cfg)
bool visible_in_shroud() const
void clear_map(label_map &, bool)
bool visible_in_fog() const
void write(config &res) const
void read(const config &cfg)
To store label data Class implements logic for rendering.
const t_string & tooltip() const
void set_text(const t_string &)
bool visible_global_label(const map_location &) const
Returns whether or not a global (non-team) label can be shown at a specified location.
A config object defines a single node in a WML file, with access to child nodes.
SDL_Rect get_rect() const
std::map< std::string, label_map > team_label_map
GLsizei const GLcharARB ** string