Page 1 of 1

[0.16.3] radiobutton can not be toggled off

Posted: Fri Dec 15, 2017 8:38 pm
by Cooldude2606
Simple enough when i create a radiobutton you can toggle it to the true state (this raises the on_gui_checked_state_changed) but once the state is true i can not toggle it to false again (there is no on_gui_checked_state_changed or on_gui_click event). This is the code i used to make the button:
/c game.player.gui.top.add{type='frame',name='test'}.add{type='radiobutton',name='test',state=false}
* note checkboxs work fine only radiobuttons are effected

Re: [0.16.3] radiobutton can not be toggled off

Posted: Fri Dec 15, 2017 9:01 pm
by Rseding91
Thanks for the report. That's how radio buttons work. It's up to you in the mod code to toggle other radio buttons off when the player toggles other ones on.

Re: [0.16.3] radiobutton can not be toggled off

Posted: Wed Dec 20, 2017 9:31 pm
by arbarbonif
The lua documentation should probably be changed then. As is it says "Identical to checkbox except circular", but checkboxes can be unchecked...