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.
Luau
ImGuiWindow:SliderInt(
label: string,
value: number,
minimum: number,
maximum: number,
callback: (number) -> ()
) -> ImGuiWindowParameters
Call this method with a ImGuiWindow receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
| Parameter | Type | Description |
|---|---|---|
label | string | Control label. |
value | number | Initial value. |
minimum | number | Lower bound of the range. |
maximum | number | Upper bound of the range. |
callback | (number) -> () | Receives the new value when the input is submitted. |
Returns
ImGuiWindowThe 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
Luau
local window = imgui.create("Example controls")
window:SliderInt("Items per page", 10, 1, 50, function(value)
print("Items:", value)
end)