Menu widget functionality

Hello, I am trying to figure out how to achieve this:

I have like a terminal that the player can use ingame, and when used it constructs like a menu widget that will have submenus and functions that will do changes in the gameworld.

On the terminal i have different buttons, UP, Down,Left,Right,OK,Back.
When clicking the down button for example, I want to move down a step on the terminal display(it is basically a list of different texts that will have separete subMenus). And when clicked OK button, open the submenu for that selection.

Does anyone know or can point me in the right direction to use those buttons in such a way?

Thanks.

Assuming you keep the terminal display options in a panel/array (or both), you could use the up/down button to keep track of the index (just an int), get child at that index from that panel/array and store its reference in an additional variable as the Current Selection (this last step is optional). OK button can then use the index to locate the child in the panel/array or use the Current Selection directly.

Perhaps you could use *ExpandableArea *for this - it’s relatively straightforward to use and creates expandable cascading trees with a decent amount of flexibility. Not sure how you envisioned it, though. Might be miss here.

Alright! Sounds like you get me, I will test and see if i figure that out. This is the first time that I am getting into the widgets, so I will probably get back to you :slight_smile:

Thank you for the quick response