Button Functions
Most widgets return true when the value has been changed or when pressed/selected.Button
const char*
Button label text
const ImVec2&
default:"ImVec2(0, 0)"
Button size. Use 0 for auto-sizing
bool
True when clicked
SmallButton
FramePadding.y == 0 to easily embed within text.
const char*
Button label text
bool
True when clicked
InvisibleButton
IsItemActive, IsItemHovered, etc.).
const char*
Unique identifier (not displayed)
const ImVec2&
Button size
ImGuiButtonFlags
default:"0"
Button flags (see ImGuiButtonFlags_)
bool
True when clicked
ArrowButton
const char*
Unique identifier
ImGuiDir
Arrow direction: ImGuiDir_Left, ImGuiDir_Right, ImGuiDir_Up, ImGuiDir_Down
bool
True when clicked
Checkbox & Radio
Checkbox
const char*
Checkbox label
bool*
Pointer to boolean value
bool
True when the value changes
CheckboxFlags (int)
const char*
Checkbox label
int*
Pointer to flags variable
int
Flag bit to toggle
bool
True when the value changes
CheckboxFlags (unsigned int)
const char*
Checkbox label
unsigned int*
Pointer to flags variable
unsigned int
Flag bit to toggle
bool
True when the value changes
RadioButton (bool)
if (RadioButton("one", my_value==1)) { my_value = 1; }
const char*
Radio button label
bool
Whether this option is currently selected
bool
True when clicked
RadioButton (int)
const char*
Radio button label
int*
Pointer to current value
int
Value for this button
bool
True when the value changes
Other Widgets
ProgressBar
float
Progress value (0.0f to 1.0f)
const ImVec2&
default:"ImVec2(-FLT_MIN, 0)"
Size of the progress bar
const char*
default:"NULL"
Optional text overlay
TextLink
const char*
Link text
bool
True when clicked
TextLinkOpenURL
const char*
Link text
const char*
default:"NULL"
URL to open (uses label if NULL)
bool
True when clicked
Button Flags
ImGuiButtonFlags_
Flags forInvisibleButton().