gui2/tgame_version: Replace fake checkbox widgets with Unicode

Makes it more obvious that the items in the Features pages cannot be
changed by the user.
This commit is contained in:
Ignacio R. Morelle 2015-08-15 22:35:06 -03:00
parent 305b90c9a5
commit 329a0e130a
2 changed files with 8 additions and 6 deletions

View file

@ -338,10 +338,11 @@
horizontal_grow = "true"
border = "all"
border_size = 5
[image]
[label]
id = "opt_status"
definition = "default_large"
linked_group = "opt_status"
[/image]
[/label]
[/column]
[/row]
[/grid]

View file

@ -50,8 +50,8 @@
namespace
{
const std::string img_feature_on = "buttons/checkbox-pressed.png";
const std::string img_feature_off = "buttons/checkbox.png";
const std::string text_feature_on = "<span color='#0f0'>&#10003;</span>";
const std::string text_feature_off = "<span color='#f00'>&#10005;</span>";
} // end anonymous namespace
@ -244,10 +244,11 @@ void tgame_version::pre_show(CVideo& /*video*/, twindow& window)
list_data["opt_name"]["label"] = opt.name;
if(opt.enabled) {
list_data["opt_status"]["label"] = img_feature_on;
list_data["opt_status"]["label"] = text_feature_on;
} else {
list_data["opt_status"]["label"] = img_feature_off;
list_data["opt_status"]["label"] = text_feature_off;
}
list_data["opt_status"]["use_markup"] = "true";
opts_listbox.add_row(list_data);
}