ImGuiWindow: SliderFloat Asynchronous
Add a numeric field for a fractional value such as scale or opacity. Despite its name, Kawaii presents an editable number; it clamps submitted input to the requested 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 | Label beside the numeric field. |
value | number | Initial value. |
minimum | number | Lower bound. |
maximum | number | Upper bound. |
callback | (number) -> () | Function receiving the submitted value. |
Returns
ImGuiWindowThe same ImGuiWindow handle, so more controls can be added with another method call.
Usage notes
The callback runs when the user interacts with the control. Its return value is ignored.
The callback runs when the field loses focus after a numeric submission. Invalid text restores the previous value.
Example
Luau
local window = imgui.create("Example controls")
window:SliderFloat("Scale", 1, 0.5, 2, function(value)
print("Scale:", value)
end)