GUI2: added flag to enable markup from WML

This commit is contained in:
Charles Dang 2016-09-20 02:06:16 +11:00
parent 3e90310038
commit 2dd8cfdbdc
3 changed files with 8 additions and 0 deletions

View file

@ -577,6 +577,11 @@
type="bool"
default=true
[/key]
[key]
name="use_markup"
type="bool"
default=false
[/key]
[/tag]
[/tag]
[tag]

View file

@ -655,6 +655,7 @@ tbuilder_control::tbuilder_control(const config& cfg)
, tooltip(cfg["tooltip"].t_str())
, help(cfg["help"].t_str())
, use_tooltip_on_label_overflow(true)
, use_markup(cfg["use_markup"].to_bool(false))
{
if(definition.empty()) {
definition = "default";
@ -682,6 +683,7 @@ void tbuilder_control::init_control(tcontrol* control) const
control->set_tooltip(tooltip);
control->set_help_message(help);
control->set_use_tooltip_on_label_overflow(use_tooltip_on_label_overflow);
control->set_use_markup(use_markup);
#ifndef LOW_MEM
control->set_debug_border_mode(debug_border_mode);
control->set_debug_border_colour(debug_border_color);

View file

@ -532,6 +532,7 @@ public:
t_string tooltip;
t_string help;
bool use_tooltip_on_label_overflow;
bool use_markup;
};
} // namespace implementation