Skip to content

Commit c147a59

Browse files
committed
Clarified alternative for ImGuiButtonFlags_Repeat being ImGuiItemFlags_ButtonRepeat. (#8293)
1 parent 2d2c7d3 commit c147a59

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

imgui_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ enum ImGuiButtonFlagsPrivate_
914914
ImGuiButtonFlags_PressedOnRelease = 1 << 7, // return true on release (default requires click+release)
915915
ImGuiButtonFlags_PressedOnDoubleClick = 1 << 8, // return true on double-click (default requires click+release)
916916
ImGuiButtonFlags_PressedOnDragDropHold = 1 << 9, // return true when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
917-
//ImGuiButtonFlags_Repeat = 1 << 10, // hold to repeat
917+
//ImGuiButtonFlags_Repeat = 1 << 10, // hold to repeat -> use ImGuiItemFlags_ButtonRepeat instead.
918918
ImGuiButtonFlags_FlattenChildren = 1 << 11, // allow interactions even if a child window is overlapping
919919
ImGuiButtonFlags_AllowOverlap = 1 << 12, // require previous frame HoveredId to either match id or be null before being usable.
920920
//ImGuiButtonFlags_DontClosePopups = 1 << 13, // disable automatically closing parent popup on press

imgui_widgets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ void ImGui::BulletTextV(const char* fmt, va_list args)
477477
// - PressedOnDragDropHold can generally be associated with any flag.
478478
// - PressedOnDoubleClick can be associated by PressedOnClickRelease/PressedOnRelease, in which case the second release event won't be reported.
479479
//------------------------------------------------------------------------------------------------------------------------------------------------
480-
// The behavior of the return-value changes when ImGuiButtonFlags_Repeat is set:
480+
// The behavior of the return-value changes when ImGuiItemFlags_ButtonRepeat is set:
481481
// Repeat+ Repeat+ Repeat+ Repeat+
482482
// PressedOnClickRelease PressedOnClick PressedOnRelease PressedOnDoubleClick
483483
//-------------------------------------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)