mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-08 17:17:06 +00:00
Campaign toggle button -> toggle pannel.
This change allows to change to the 'to be added' stacked widget later on, also fixes the issue that the campaign text ended up in the border.
This commit is contained in:
parent
0e1d1fea7e
commit
3a82d40ae4
@ -73,15 +73,50 @@
|
|||||||
grow_factor = 1
|
grow_factor = 1
|
||||||
horizontal_grow = "true"
|
horizontal_grow = "true"
|
||||||
|
|
||||||
[toggle_button]
|
[toggle_panel]
|
||||||
definition = "listbox_text_with_icon"
|
definition = "default"
|
||||||
|
|
||||||
return_value_id = "ok"
|
return_value_id = "ok"
|
||||||
[/toggle_button]
|
[grid]
|
||||||
|
|
||||||
|
[row]
|
||||||
|
|
||||||
|
[column]
|
||||||
|
grow_factor = 1
|
||||||
|
horizontal_grow = "true"
|
||||||
|
|
||||||
|
border = "left"
|
||||||
|
border_size = 3
|
||||||
|
|
||||||
|
[image]
|
||||||
|
id = "icon"
|
||||||
|
definition = "default"
|
||||||
|
[/image]
|
||||||
|
|
||||||
|
[/column]
|
||||||
|
|
||||||
|
[column]
|
||||||
|
grow_factor = 1
|
||||||
|
horizontal_grow = "true"
|
||||||
|
|
||||||
|
border = "right"
|
||||||
|
border_size = 8
|
||||||
|
|
||||||
|
[label]
|
||||||
|
id = "name"
|
||||||
|
definition = "default"
|
||||||
|
[/label]
|
||||||
|
|
||||||
|
[/column]
|
||||||
|
|
||||||
|
[/row]
|
||||||
|
|
||||||
|
[/grid]
|
||||||
|
|
||||||
|
[/toggle_panel]
|
||||||
|
|
||||||
[/column]
|
[/column]
|
||||||
|
|
||||||
|
|
||||||
[/row]
|
[/row]
|
||||||
|
|
||||||
[/list_definition]
|
[/list_definition]
|
||||||
|
@ -77,11 +77,15 @@ void tcampaign_selection::pre_show(CVideo& /*video*/, twindow& window)
|
|||||||
|
|
||||||
/*** Add list item ***/
|
/*** Add list item ***/
|
||||||
string_map list_item;
|
string_map list_item;
|
||||||
|
std::map<std::string, string_map> list_item_item;
|
||||||
|
|
||||||
list_item.insert(std::make_pair("icon", c["icon"]));
|
list_item["label"] = c["icon"];
|
||||||
list_item.insert(std::make_pair("label", c["name"]));
|
list_item_item.insert(std::make_pair("icon", list_item));
|
||||||
|
|
||||||
list->add_row(list_item);
|
list_item["label"] = c["name"];
|
||||||
|
list_item_item.insert(std::make_pair("name", list_item));
|
||||||
|
|
||||||
|
list->add_row(list_item_item);
|
||||||
|
|
||||||
/*** Add detail item ***/
|
/*** Add detail item ***/
|
||||||
string_map detail_item;
|
string_map detail_item;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user