zui icon indicating copy to clipboard operation
zui copied to clipboard

Checkbox groups

Open MathemanFlo opened this issue 3 years ago • 0 comments

Changed my mind and implemented https://github.com/armory3d/armorpaint/pull/1349#issuecomment-1090383438. Implemented an AltExclusive behavior and an exclusive behavior (radio button). What did improve?

  1. The checkbox the user clicks on is automatically drawn correctly. This was not the case in my first approach.
  2. It is a bit more automated.
  3. It is much clearer and reusable.
  4. The implementation can be extended easily. For example a: SelectAtLeastOne would be easy to implement.

What's not perfect?

  1. The other checkboxes are only updated in the next frame.
  2. The code is not really shorter
  3. Checkboxes may return the wrong value because they are may be updated in endGroup.

Consider https://github.com/armory3d/armorpaint/pull/1349/commits/45b8bdb677888bdc96dc4b01a08d2ea37e5b8ed1 to see it in action.

MathemanFlo avatar Apr 19 '22 07:04 MathemanFlo