Lua: fix assert when assigning a selected index to a menu button or toggle button
This commit is contained in:
parent
b823dc3c6d
commit
557738dd49
1 changed files with 1 additions and 1 deletions
|
@ -240,7 +240,7 @@ WIDGET_SETTER("selected_index", int, gui2::selectable_item)
|
|||
if(value > int(w.num_states())) {
|
||||
throw std::invalid_argument("invalid index");
|
||||
}
|
||||
w.set_value(value + 1);
|
||||
w.set_value(value - 1);
|
||||
}
|
||||
|
||||
WIDGET_GETTER("value_compat,selected", bool, gui2::selectable_item)
|
||||
|
|
Loading…
Add table
Reference in a new issue