Scrolling menu

I just set up a flag for the buttons, then use an if statement and tween an indicator to the next item. So buttonSelected == 1, highlight button 1 and execute the command for that button if it’s selected, if there are more buttons then can show on the display, I would just tween the alpha of certain buttons and tween the new buttons into view and keep that buttonSelected variable increasing to the next number.

I will add that if I need to roll over I would add an if statement like
if (buttonSelected >= 10) {
buttonSelected = 1;
}
and
if (buttonSelected <= 0) {
buttonSelected = 9;
}

2 Likes