armortools icon indicating copy to clipboard operation
armortools copied to clipboard

Alt click deselect

Open MathemanFlo opened this issue 3 years ago • 2 comments

Implements https://github.com/armory3d/armorpaint/issues/1347#issuecomment-1082798154 Namely: Hold alt and click on a channel in material or layer context menu in order to exclusively enable this channel.

MathemanFlo avatar Mar 30 '22 11:03 MathemanFlo

Wonder if we can automate this somehow in zui, maybe with some optional grouping:

ui.beginGroup();
ui.check();
ui.check();
ui.check();
ui.endGroup();

And make alt key select the check exclusively. What do you think?

luboslenco avatar Apr 06 '22 15:04 luboslenco

Yes we could do that. But I have one concern: Checkboxes are no radio buttons. The feature you propose is very similar to radio buttons, but the current situation is only temporarily radio-button-like. If I would read this code I would definitely expect it to be a radio button group. Thus I'm not completely sure whether it is a good idea. Implementing the feature is maybe also not so straight forward. Ideally everything should happen in one frame thus ui has to remember the checkboxes in the group, check which one changed in endGroup, disable all others and tell the calling context about that. If you want to do that in one frame it might not be that much shorter for the caller than the current implementation or do I miss something?

MathemanFlo avatar Apr 06 '22 18:04 MathemanFlo