Timelines: In addition to the “Main Timeline” there is also “Button State” which sets the colors of the buttons. “Button01” is active (red color) at one second; “Button02” is active at two seconds, etc.
“setBtnColor” - overrides Hype’s “Normal~Hover” default behavior.
“setBtnState” - sets the button color as needed using the “Button State” timeline.
I have annotated the code thoroughly so I won’t replicate the annotation here.
Typically the user interface uses a unique color for the “hover” event. In the demo I have set the “hover” to match the “active” or “selected” state as You stipulated.
The code is set up to register a 2 digit ending on the ID for the button; so buttons with IDs below “10” will need to be labeled using “Button01”, “Button02”,“Button03”.
You could use another name like “menuButton” … just make sure that the last 2 digits of the button name matches the “Button State” timeline location in seconds. So the “active” state (red color) for “menuButton07” would be located at 7 seconds on this timeline.
Edit - Additional Notes
As it is now, it is easy to copy and paste the “Background Color” property setting from one button to a new one in the “Button State” timeline; then adjust the positioning for the “active” time for that new button.
The difference would be using the color of the button as the key indicator instead of a button’s timeline location - along with a variable that tracked the active button ID (and so its color) - as well as variables (or an array) that stored an individual button’s default (inactive, non-selected) color. If the default state was the same color for all buttons it would make things easier.