mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 17:00:09 +00:00
wesnoth.set_dialog_value can now unfold treeview nodes (#978)
This commit is contained in:
parent
3d0bd73803
commit
4608c2d368
@ -495,6 +495,15 @@ int intf_set_dialog_value(lua_State *L)
|
||||
return luaW_type_error(L, 1, "unit or unit type");
|
||||
}
|
||||
}
|
||||
else if(gui2::tree_view_node *node = dynamic_cast<gui2::tree_view_node *>(w)) {
|
||||
const bool unfolded = luaW_toboolean(L, 1);
|
||||
if(unfolded) {
|
||||
node->unfold();
|
||||
}
|
||||
else {
|
||||
node->fold();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
t_string v = luaW_checktstring(L, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user