Hi, I’m trying to make the menu for my game but I’m having a few issues with it.
The first issue is that when I open the menu, my key presses still cause events to happen in the game instead of the menu until I use the mouse to click one of the buttons in the menu, then I can use buttons or my controller to navigate the menu. When I’m IN the menu however, both before AND after I click in the menu, I can still click and drag to make my character look around, and use input keys or controller to move and do other things.
The second issue is that when I press a key to open a menu, for example pressing the M key to open the map menu, and then click on another tab in the menu, for example Inventory, using my mouse or the 'next/previous tab key, I can still press the M button to close the menu, when I should only be able to close it with the escape button or the I (inventory) button, but that doesn’t close it properly, instead the menu does close but my mouse is still visible and my character doesn’t look around when I move the mouse, instead I have to click and drag to look around, I can still walk and use the other keys though.
The third issue is that when I open a menu, for example the Map menu again, click on the inventory, then press I to close it, if I then press one of the menu buttons again for example I to reopen the inventory, if I then press another menu key to open another tab the first press will do nothing, but the second will open a second menu and the first one will be stuck on the screen. This even happens if after reopening the menu I close the menu again, and then open it again and try press another menu key, it doesn’t matter how many times I open and close the menu in between, it always starts reopening more.
A fourth issue is more of a minor inconvenience, when I’m in the menu I can’t move my mouse beyond the game windows borders.
Here is what I think are the important bits of code, if you need to see the rest just let me know. Thanks!