ImGuiWindow: SliderFloat Asynchronous
Add a control for entering numeric values within a range. Use it for a fractional setting such as scale or opacity. Kawaii currently renders this as a numeric text input that clamps submitted values to the range.
Luau
ImGuiWindow:SliderFloat(
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:SliderFloat("Scale", 1, 0.5, 2, function(value)
print("Scale:", value)
end)