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.

Syntax
Luau
ImGuiWindow:SliderFloat(
    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
labelstringLabel beside the numeric field.
valuenumberInitial value.
minimumnumberLower bound.
maximumnumberUpper bound.
callback(number) -> ()Function receiving the submitted value.

Returns

ImGuiWindow

The 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

Example
Luau
local window = imgui.create("Example controls")
window:SliderFloat("Scale", 1, 0.5, 2, function(value)
    print("Scale:", value)
end)
Kawaii documentation