AddButton

Add button that executes a function when clicked

Syntax

Groupbox:AddButton("Button Name", ButtonFunction())
  • <string> Name - Button name, does not need to be unique.

  • <function> Function - This function will run each time the button is clicked.

Button Functions

Button:AddTooltip("Tooltip Text")
Button:DisconnectKeybindButton()
Button:ConnectKeybindButton(KeybindButton)

Example

Code shown below is missing some critical syntax for simplicity

--// Creating Groupbox
local Groupbox = Tab:AddLeftGroupbox("Demo Groupbox")

--// Making a button that hides the UI window
Groupbox:AddButton("Hide Window", function()
    --/ Code that executes on button click
    Window.Active = false
end)
Button Demo

Last updated