(Widget) Check a checkbox -> uncheck the others

I made a neat looking level/ship selection menu. I’d like to limit the maximum number of checkable check boxes to one. For now, with every checking and unchecking, i increment/decrement a ShipChecks integer. If it’s greater than 1, checking should be disallowed. But i can’t branch it in a way to prevent clicks. Other boxes should be greyed out. How would you go about this?


checks

When someone clicks one, always grey them all out, and then select the one they clicked.

Brute force as suggested above could work pretty well, especially when we’re considering a handful of those only.


For something a tad more snazzy:

1 Like