void label::set_dim(int w, int h) { if(w != width() || h != height()) { inner_set_dim(w, h); reformat_text(); recalculate_texture(); } }
void label::set_text(const std::string& text) { text_ = i18n::tr(text); reformat_text(); recalculate_texture(); }
void label::set_fixed_width(bool fixed_width) { fixed_width_ = fixed_width; reformat_text(); recalculate_texture(); }
void label::set_font(const std::string& font) { font_ = font; recalculate_texture(); }
void label::set_font_size(int size) { size_ = size; recalculate_texture(); }
void dialog_label::set_progress(int progress) { progress_ = progress; recalculate_texture(); }
dialog_label::dialog_label(const variant& v, game_logic::formula_callable* e) : label(v, e), progress_(0) { recalculate_texture(); }
dialog_label::dialog_label(const std::string& text, const SDL_Color& color, int size) : label(text, color, size), progress_(0) { recalculate_texture(); }