âšī¸Menus
These are all the functions relating to the menu system
Example
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
Core.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
Core.Menus.Open("someMenuIdentifier")
Close
This will force close this menu
Core.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
Core.Menus.ToggleHide("someMenuIdentifier", true) --## True will hide
Last updated