Approach to create a menu system for the title screen

At its simplest this would be:

data structure

  • a Lua table with one item for each button
  • a variable to keep track of the current button

drawing

  • a function to draw a single button
  • a loop to draw all of your table items as buttons

buttons

  • input handler to increase/decrease value of current button variable when down/up are pressed

highlighting

  • modify draw function so it draws highlight (eg. thicker border) if the index of the button being drawn is equal to the value of the current button variable

So, you could say that - yes - you can do this stuff from scratch yourself, but it doesn't have to be very complicated.

Of course you can make it as simple or as complicated as you like. Knowing when to stop is the next challenge :slight_smile:

3 Likes