Section:Toggle({
Name <string>
Default <boolean>
Callback <function(): boolean>
}, <string or nil> Flag)
Functions
:UpdateName(<string>)
:SetVisiblity(<boolean>)
:UpdateState(<boolean>)
:GetState(: boolean)
.State : boolean
.IgnoreConfig <boolean>
.Settings : table -- Not everything may be updated, but Callback should be correct.
Example
sections.MainSection1:Toggle({
Name = "Flight",
Default = false,
Callback = function(value)
Window:Notify({
Title = "Kuzu Hub",
Description = (value and "Enabled " or "Disabled ") .. "Flight"
})
end,
}, "FlightToggle")