TomGrobbe / MenuAPI

FiveM C# Menu API. Designed specifically as a replacement of NativeUI for vMenu. Full safezone scaling supported, both left and right aligned menus supported.
https://docs.vespura.com/mapi
62 stars 45 forks source link

Add support for multiple menu toggle keys #41

Open 0xLuca opened 3 years ago

0xLuca commented 3 years ago

I added the MenuToggleKey property to the Menu class. The script no longer checks if the one main menu opening key is pressed, but iterates through all registered menus and checks if their key is pressed to show and hide them. This adds the feature that you can use this api more than once without the need to add your own key press listener and without having the issue that wrong menus are being opened.

Warning to the vMenu author You would have to set the Menu's toggle key, and remove the assignment of the static MenuController.MenuToggleKey.