Page 1 of 1

[0.17.14] New checkbox style does not show checked state when first disabling the checkbox after checking it

Posted: Sun Mar 17, 2019 11:50 pm
by Solinya
This is a relatively minor display issue, but looks like a regression from the 0.16.51 behavior so reporting it here.

My mod has a frame that's created whenever a player clicks a specific button on the GUI or presses the appropriate key. On this frame I have some checkboxes that are enabled and unchecked. When a player checks a checkbox, I listen to the corresponding on_gui_click event and disable the checkbox to lock in their choice.

In 0.16.51:
The checkbox would show that it was disabled and checked.

In 0.17.14:
The same checkbox shows disabled but looks un-checked even though the player checked it (and the disabling triggered off the on_gui_click event that was fired).

Since I persist the checked state internally, if the player closes and reopens my frame, the checkbox will show up as disabled and checked as expected. Thus the appropriate control style is there, but maybe something isn't updating the style correctly when trying to apply both disable and checked.

Happens on both macOS 10.4.1 and Windows 10 1809. As the conditions to trigger require a mod setup, I threw together a minimal mod to showcase the problem.

To repro with the demo mod:
1. Start a new game.
2. Click the character sprite button in the top left (or press I) to bring up the demo frame.
3. Click one or more checkboxes. Once a checkbox has been checked, it will be disabled and the checkbox below enabled. Some of the checkboxes will become disabled but not display the checked state.

Note in my regular mod I was able to reproduce this 100% of the time, but in the demo case it's closer to 50%. I'm wondering if it depends on the order the checked and disabled signals are processed by the 0.17.x GUI.

Re: [0.17.14] New checkbox style does not show checked state when first disabling the checkbox after checking it

Posted: Wed Apr 03, 2019 2:16 pm
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.17.