#include <map_label.hpp>
Public Member Functions | |
terrain_label (const std::string &, const std::string &, const gamemap::location &, const map_labels &, const SDL_Color colour=font::NORMAL_COLOUR) | |
creating new label | |
terrain_label (const map_labels &, const config &, const variable_set *variables) | |
Load label from config. | |
terrain_label (const map_labels &) | |
~terrain_label () | |
void | write (config &res) const |
void | read (const config &cfg, const variable_set *variables) |
const std::string & | text () const |
const std::string & | team_name () const |
const gamemap::location & | location () const |
const SDL_Colour & | colour () const |
void | set_text (const std::string &) |
void | update_info (const std::string &, const std::string &, const SDL_Color) |
void | scroll (double xmove, double ymove) const |
void | recalculate () |
void | calculate_shroud () const |
Private Member Functions | |
terrain_label (const terrain_label &) | |
const terrain_label & | operator= (const terrain_label &) |
void | clear () |
void | draw () |
bool | visible () const |
void | check_text_length () |
const std::string | cfg_colour () const |
Private Attributes | |
int | handle_ |
std::string | text_ |
std::string | team_name_ |
SDL_Color | colour_ |
const map_labels * | parent_ |
gamemap::location | loc_ |
Definition at line 90 of file map_label.hpp.
terrain_label::terrain_label | ( | const std::string & | text, | |
const std::string & | team_name, | |||
const gamemap::location & | loc, | |||
const map_labels & | parent, | |||
const SDL_Color | colour = font::NORMAL_COLOUR | |||
) |
creating new label
Definition at line 303 of file map_label.cpp.
References check_text_length(), and draw().
terrain_label::terrain_label | ( | const map_labels & | parent, | |
const config & | cfg, | |||
const variable_set * | variables | |||
) |
Load label from config.
Definition at line 331 of file map_label.cpp.
References check_text_length(), and read().
terrain_label::terrain_label | ( | const map_labels & | parent | ) |
Definition at line 319 of file map_label.cpp.
terrain_label::~terrain_label | ( | ) |
terrain_label::terrain_label | ( | const terrain_label & | ) | [private] |
void terrain_label::write | ( | config & | res | ) | const |
Definition at line 380 of file map_label.cpp.
References cfg_colour(), loc_, team_name(), text(), and gamemap::location::write().
Referenced by replay::add_label().
void terrain_label::read | ( | const config & | cfg, | |
const variable_set * | variables | |||
) |
Definition at line 347 of file map_label.cpp.
References colour(), colour_, int_to_color(), utils::interpolate_variables_into_string(), font::LABEL_COLOUR, loc_, string2rgb(), team_name_, and text_.
Referenced by terrain_label().
const std::string & terrain_label::text | ( | ) | const |
Definition at line 389 of file map_label.cpp.
References text_.
Referenced by events::menu_handler::do_search(), events::menu_handler::label_terrain(), and write().
const std::string & terrain_label::team_name | ( | ) | const |
Definition at line 394 of file map_label.cpp.
References team_name_.
Referenced by map_labels::add_label(), events::menu_handler::label_terrain(), and write().
const gamemap::location & terrain_label::location | ( | ) | const |
const SDL_Colour & terrain_label::colour | ( | ) | const |
void terrain_label::set_text | ( | const std::string & | text | ) |
void terrain_label::update_info | ( | const std::string & | text, | |
const std::string & | team_name, | |||
const | SDL_Color | |||
) |
Definition at line 428 of file map_label.cpp.
References check_text_length(), colour_, draw(), team_name_, and text_.
void terrain_label::scroll | ( | double | xmove, | |
double | ymove | |||
) | const |
void terrain_label::recalculate | ( | ) |
void terrain_label::calculate_shroud | ( | ) | const |
Definition at line 455 of file map_label.cpp.
References map_labels::disp(), handle_, is_shrouded(), loc_, parent_, and font::show_floating_label().
Referenced by draw().
const terrain_label& terrain_label::operator= | ( | const terrain_label & | ) | [private] |
void terrain_label::clear | ( | void | ) | [private] |
Definition at line 506 of file map_label.cpp.
References handle_, and font::remove_floating_label().
Referenced by draw(), and ~terrain_label().
void terrain_label::draw | ( | ) | [private] |
Definition at line 466 of file map_label.cpp.
References font::add_floating_label(), calculate_shroud(), cfg_colour(), clear(), colour_, map_labels::disp(), display::get_location_x(), display::get_location_y(), handle_, loc_, display::map_outside_area(), parent_, font::SIZE_NORMAL, text_, visible(), gamemap::location::x, and gamemap::location::y.
Referenced by recalculate(), terrain_label(), and update_info().
bool terrain_label::visible | ( | ) | const [private] |
Definition at line 492 of file map_label.cpp.
References loc_, parent_, map_labels::team_name(), team_name_, and map_labels::visible_global_label().
Referenced by draw().
void terrain_label::check_text_length | ( | ) | [private] |
Definition at line 498 of file map_label.cpp.
References map_labels::get_max_chars(), parent_, text_, and utils::truncate_as_wstring().
Referenced by terrain_label(), and update_info().
const std::string terrain_label::cfg_colour | ( | ) | const [private] |
int terrain_label::handle_ [private] |
Definition at line 135 of file map_label.hpp.
Referenced by calculate_shroud(), clear(), draw(), and scroll().
std::string terrain_label::text_ [private] |
Definition at line 137 of file map_label.hpp.
Referenced by check_text_length(), draw(), read(), set_text(), text(), and update_info().
std::string terrain_label::team_name_ [private] |
Definition at line 138 of file map_label.hpp.
Referenced by read(), team_name(), update_info(), and visible().
SDL_Color terrain_label::colour_ [private] |
Definition at line 139 of file map_label.hpp.
Referenced by cfg_colour(), colour(), draw(), read(), and update_info().
const map_labels* terrain_label::parent_ [private] |
Definition at line 141 of file map_label.hpp.
Referenced by calculate_shroud(), check_text_length(), draw(), and visible().
gamemap::location terrain_label::loc_ [private] |
Definition at line 142 of file map_label.hpp.
Referenced by calculate_shroud(), draw(), location(), read(), visible(), and write().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |