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

Avoid disabling MenuToggleKey #27

Closed carmineos closed 4 years ago

carmineos commented 4 years ago

It should be avoided to flag the control for MenuToggleKey as disabled if there is no menu open.

Some scripts might want to perform specific actions based on control check state and do different based on if the control is enabled or disabled (or they can just don't care about the status but it's up to them). Having the MenuToggleKey flagged as disabled seems logically wrong as would never allow to such control to be enabled.

MenuAPI shouldn't flag any control as disabled for the entire lifetime of the script, it should only do it for the limited time required to perform its own checks.