DirkScripts
Docs
ℹ️ Menus
#Example
{% embed url="https://streamable.com/p2lc5w ↗" %}
#Register
Use this to register a menu, you can make a menu position based, if it is position based it'll open within a defined range of that position, else it will need to be forced with Open/Close functions
luaCore.Menus.Register("someMenuIdentifier", { Pos = vector4(0,0,0,0), --## OPTIONAL: Vec3,Vec4 Distance = 1.5, --## OPTIONAL: integer Options = { --## Similar Format to target systems { icon = "fa-solid fa-dumpster", label = "Main Option", subtext = "This is our main option", --## OPTIONAL action = function(menuFuncs) --## IF NOT ACTION THIS WILL NOT BE A CLICKABLE OPTION menuFuncs.removeFocus() --## Removes focus from this menu should you want to after click --## Do what we want here end, canInteract = function() --## OPTIONAL return true end } } })
#Open
Forces the menu with this ID open
luaCore.Menus.Open("someMenuIdentifier")
#Close
This will force close this menu
luaCore.Menus.Close("someMenuIdentifier")
#ToggleHide
This works best with position based menus essentially it will close them and stop it reappearing until you toggle this back on
luaCore.Menus.ToggleHide("someMenuIdentifier", true) --## True will hide
