When creating a selected button in a row or a column let’s say, the most convenient solution I’ve found is to reset every other button’s visual, and change the normal style for the selected one. So hereby I propose a new feature, for selectable buttons.
Each button would have a text input in the detail panels, called “Selection”. Typing into this would work as much like categories. Then each button would have an extra slot at the style:
- Normal
- Hovered
- Pressed
- Selected
When a button is clicked, a “Selected” event could be called, that puts every button within the same category, as entered above in the “Selection” text box, and set the style to the one that’s defined in the “Selected” style section.
With this, having more categories and calling selected event, would only change the buttons within the same category. For instance we set two categories:
- Inventory
- TopMenu
Pressin a new button on the top menu would swap all the buttons with “TopMenu” tag to selected, changing the visual per style defined, and leaving every other button alone. Pressing a new button in the inventory would do the same with the ones tagged as “Inventory” not touching any other button, like the ones tagged as “TopMenu”