slider_t

local slider = menu.add_slider("group", "slidy", 1, 10)

get

returns the current slider value

float get()

Example

print(slider:get())

set

sets the current slider value

void set(<float> value)

Example

slider:set(5.0)

set_visible

sets whether this control is visible

void set_visible(<bool> is_visible)

Example

slider:set_visible(true)

add_color_picker

adds a color picker sub control

color_picker_t add_color_picker(<string> name, [optional] <color_t> default_color, [optional] <bool> has_alpha)

Example

local colly = slider:add_color_picker("bruh color")

add_keybind

adds a keybind sub control

keybind_t add_keybind(<string> name, [optional] <int> default_key)

Example

local keybind = slider:add_keybind("bruh key")

Last updated