UISimpleMenu:Toggle
From Nomad DB
Toggles a UISimpleMenu.
Syntax
menu:Toggle()
Key Binds
This function should be used for Key Binds, because it saves the menu's state. If you use multiple sub-menus, it will open the last visible sub-menu. For more information about sub-menus and how they work, check out UISimpleMenu:AddButton.
Example
local menu = UI.SimpleMenu()
menu:SetTitle("Test Menu")
-- [ Menu Code ] --
ScriptHook.RegisterKeyHandler("openMenu", function()
menu:Toggle()
end)