I wanted to create my own cheat menu inside the game to test out things on the spot.
The one I created is working out of 5 variables and an array.
The problem is that not all submenus work the same way, some have confirmation boxes, inputs, or have more depth than others.
This is my menu:
dropbox.com/s/ejfp08nv94kfhfi/debugmenuv2.capx
There are various Submenus but right now only this paths are implemented:
Add>Add Item>Number of Items to add
Savefile>Slots>Save/Load>Name slot (Load is not implemented)
Don't worry about them not working I just plugged this from my project and it's missing all the functions that make them work properly, all I care is about how to make a better menu system that is adaptable.
If you're interested and want to take your hands on to your head, this is how mine is working
Variables:
- ConfigMenu: This variable acts like a boolean it goes 1 if the menu has inputs and 0 if not.
- ActiveMenu: This variable acts when an option on a submenu is selected this keeps track of it.
- MenuLvl: Since the menu has limited keybindings I need this one so construct knows what to do with every
key on different levels.
- DebugMenus: This is a string which holds all the submenus of the selected MenuNumber
- MenuNumber: It's a number that goes from 1 to the number of tokens at the DebugMenu string With the Up and Down Arrows
I pop and push the names of the selected submenus into the array, to be able to back to the previous menu.
after a while all this variables became really bothersome, having events for every submenu + their lvls etc it looks as messy as it sounds I'm also using text position and others to keep track of the options and I don't feel like that's a really good way to do it, so I was wondering how you would approach this kind of menu, thanks beforehand.