Slider Widgets
Ctrl+Click on any slider to turn them into an input box. Manually input values aren’t clamped by default and can go off-bounds. UseImGuiSliderFlags_AlwaysClamp to always clamp.
SliderFloat
const char*
Widget label
float*
Pointer to float value
float
Minimum value
float
Maximum value
const char*
default:"%.3f"
Display format string
ImGuiSliderFlags
default:"0"
Slider flags (see ImGuiSliderFlags_)
bool
True when value has been modified
SliderFloat2
SliderFloat3
SliderFloat4
SliderInt
const char*
Widget label
int*
Pointer to int value
int
Minimum value
int
Maximum value
const char*
default:"%d"
Display format string
ImGuiSliderFlags
default:"0"
Slider flags
bool
True when value has been modified
SliderInt2
SliderInt3
SliderInt4
SliderAngle
const char*
Widget label
float*
Pointer to angle value in radians
float
default:"-360.0f"
Minimum angle in degrees
float
default:"+360.0f"
Maximum angle in degrees
const char*
default:"%.0f deg"
Display format
ImGuiSliderFlags
default:"0"
Slider flags
bool
True when value has been modified
VSliderFloat
const char*
Widget label
const ImVec2&
Slider size
float*
Pointer to float value
float
Minimum value
float
Maximum value
const char*
default:"%.3f"
Display format
ImGuiSliderFlags
default:"0"
Slider flags
bool
True when value has been modified
VSliderInt
Drag Widgets
Ctrl+Click on any drag box to turn them into an input box. UseImGuiSliderFlags_AlwaysClamp to always clamp. Speed is per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1).
DragFloat
const char*
Widget label
float*
Pointer to float value
float
default:"1.0f"
Speed of value change per pixel of mouse movement
float
default:"0.0f"
Minimum value (no bound if v_min >= v_max)
float
default:"0.0f"
Maximum value
const char*
default:"%.3f"
Display format
ImGuiSliderFlags
default:"0"
Slider flags
bool
True when value has been modified
DragFloat2
DragFloat3
DragFloat4
DragFloatRange2
const char*
Widget label
float*
Pointer to current minimum value
float*
Pointer to current maximum value
float
default:"1.0f"
Speed of value change
float
default:"0.0f"
Absolute minimum value
float
default:"0.0f"
Absolute maximum value
const char*
default:"%.3f"
Display format for min value
const char*
default:"NULL"
Display format for max value (uses format if NULL)
ImGuiSliderFlags
default:"0"
Slider flags
bool
True when value has been modified
DragInt
const char*
Widget label
int*
Pointer to int value
float
default:"1.0f"
Speed of value change
int
default:"0"
Minimum value
int
default:"0"
Maximum value
const char*
default:"%d"
Display format
ImGuiSliderFlags
default:"0"
Slider flags
bool
True when value has been modified
DragInt2
DragInt3
DragInt4
DragIntRange2
Slider Flags
ImGuiSliderFlags_
Flags forDragFloat(), DragInt(), SliderFloat(), SliderInt() etc.