-
Notifications
You must be signed in to change notification settings - Fork 7
How this engine was coded
This engine was coded when I was still learning programming, so I don't recommand coding like I did in this engine,
but I will still explain here how it was coded
The main menu is mainly done by using multiple variables to store which option of each menu is selected, and having a function to display each sub-menu
It also has a variable that stores which sub-menu is active
When pressing a key, it will check which sub-menu is active, and react accordingly (change the selected option of the current menu for a up or down key, change the current sub-menu for the enter key...)
A dictionnary stores a value for each String corresponding to the name of an option. In the options menu, when interacting with an option, its value will be changed in this dictionnary. When exiting the game, the dictionnary of the options written in a json file, and loaded back at startup