AddKeybindButton
Syntax
Groupbox:AddKeybindButton({
Index = "unique tool index",
Default = "[F4]",
Text = "ESP Toggle Keybind: [F4]"
})
KeybindButton Functions
KeybindButton:AddTooltip("Tooltip Text")
KeybindButton:SetText("ESP Toggle Keybind: [F3]")
KeybindButton:SetKey("[F3]")
KeybindButton:OnChanged(function(NewKey) end)
Example
Code shown below is missing some critical syntax for simplicity
--// Creating Groupbox
local Groupbox = Tab:AddLeftGroupbox("Demo Groupbox")
local keybindButton = Groupbox:AddKeybindButton({
Index = "Test_Keybinder_1";
Text = "Test Keybind: [F4]";
Default = "[F4]";
}):AddTooltip("Tooltip Text")
keybindButton = keybindButton:OnChanged(function(newKey)
local oldText = keybindButton.Text
keybindButton:SetText("Test Keybind: "..tostring(newKey))
local newText = keybindButton.Text
lib_ui:Notify("Test Keybind Text set from '"..tostring(oldText).."' to '"..tostring(newText).."'", 1)
end)
Last updated