ImGuiWindow:SliderInt Asynchronous

Add a control for entering integer values within a range. Use it for a whole-number setting such as an item count. Kawaii currently renders a numeric text input, clamps to the range, and floors the submitted value.

Syntax
Luau
ImGuiWindow:SliderInt(
    label: string,
    value: number,
    minimum: number,
    maximum: number,
    callback: (number) -> ()
) -> ImGuiWindow

Parameters

Call this method with a ImGuiWindow receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.

Function parameters
ParameterTypeDescription
labelstringControl label.
valuenumberInitial value.
minimumnumberLower bound of the range.
maximumnumberUpper bound of the range.
callback(number) -> ()Receives the new value when the input is submitted.

Returns

ImGuiWindow

The same ImGuiWindow, allowing another window method to be chained.

Usage notes

Interaction callbacks run when the control is used. Their return values are discarded.

Example

Example
Luau
local window = imgui.create("Example controls")
window:SliderInt("Items per page", 10, 1, 50, function(value)
    print("Items:", value)
end)
Kawaii documentation