@ -157,7 +157,6 @@ typedef int ImGuiButtonFlags; // -> enum ImGuiButtonFlags_ // Flags: f
typedefintImGuiColorEditFlags;// -> enum ImGuiColorEditFlags_ // Flags: for ColorEdit4(), ColorPicker4() etc.
typedefintImGuiConfigFlags;// -> enum ImGuiConfigFlags_ // Flags: for io.ConfigFlags
typedefintImGuiComboFlags;// -> enum ImGuiComboFlags_ // Flags: for BeginCombo()
typedefintImGuiDragFlags;// -> enum ImGuiDragFlags_ // Flags: for DragFloat(), DragInt() etc.
typedefintImGuiDragDropFlags;// -> enum ImGuiDragDropFlags_ // Flags: for BeginDragDropSource(), AcceptDragDropPayload()
typedefintImGuiFocusedFlags;// -> enum ImGuiFocusedFlags_ // Flags: for IsWindowFocused()
typedefintImGuiHoveredFlags;// -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc.
@ -165,7 +164,7 @@ typedef int ImGuiInputTextFlags; // -> enum ImGuiInputTextFlags_ // Flags: f
typedefintImGuiKeyModFlags;// -> enum ImGuiKeyModFlags_ // Flags: for io.KeyMods (Ctrl/Shift/Alt/Super)
typedefintImGuiPopupFlags;// -> enum ImGuiPopupFlags_ // Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen()
typedefintImGuiSelectableFlags;// -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
typedefintImGuiSliderFlags;// -> enum ImGuiSliderFlags_ // Flags: for SliderFloat(), SliderInt() etc.
typedefintImGuiSliderFlags;// -> enum ImGuiSliderFlags_ // Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
typedefintImGuiTabBarFlags;// -> enum ImGuiTabBarFlags_ // Flags: for BeginTabBar()
typedefintImGuiTabItemFlags;// -> enum ImGuiTabItemFlags_ // Flags: for BeginTabItem()
typedefintImGuiTreeNodeFlags;// -> enum ImGuiTreeNodeFlags_ // Flags: for TreeNode(), TreeNodeEx(), CollapsingHeader()
@ -460,7 +459,7 @@ namespace ImGui
IMGUI_APIboolCombo(constchar*label,int*current_item,constchar*items_separated_by_zeros,intpopup_max_height_in_items=-1);// Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0"
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
@ -468,22 +467,23 @@ namespace ImGui
// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits.
// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
// - Legacy: Pre-1.78 there are DragXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiDragFlags flags=0' argument.
// If you get a warning converting a float to ImGuiDragFlags, read https://github.com/ocornut/imgui/issues/3361
IMGUI_APIboolDragFloat(constchar*label,float*v,floatv_speed=1.0f,floatv_min=0.0f,floatv_max=0.0f,constchar*format="%.3f",ImGuiDragFlagsflags=0);// If v_min >= v_max we have no bound
IMGUI_APIboolDragInt(constchar*label,int*v,floatv_speed=1.0f,intv_min=0,intv_max=0,constchar*format="%d",ImGuiDragFlagsflags=0);// If v_min >= v_max we have no bound
// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
// - Legacy: Pre-1.78 there are DragXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
IMGUI_APIboolDragFloat(constchar*label,float*v,floatv_speed=1.0f,floatv_min=0.0f,floatv_max=0.0f,constchar*format="%.3f",ImGuiSliderFlagsflags=0);// If v_min >= v_max we have no bound
IMGUI_APIboolDragInt(constchar*label,int*v,floatv_speed=1.0f,intv_min=0,intv_max=0,constchar*format="%d",ImGuiSliderFlagsflags=0);// If v_min >= v_max we have no bound
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
@ -1290,26 +1290,16 @@ enum ImGuiColorEditFlags_
#endif
};
// Flags for DragFloat(), DragInt() etc.
enumImGuiDragFlags_
{
ImGuiDragFlags_None=0,
ImGuiDragFlags_InvalidMask_=0x7000000F,// [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed.
ImGuiDragFlags_ClampOnInput=1<<4,// Clamp value to min/max bounds (if any) when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
ImGuiDragFlags_Logarithmic=1<<5,// Make the widget logarithmic (linear otherwise). Consider using ImGuiDragFlags_NoRoundToFormat with this if using a format-string with small amount of digits.
ImGuiDragFlags_NoRoundToFormat=1<<6,// Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits)
ImGuiDragFlags_NoInput=1<<7// Disable CTRL+Click or Enter key allowing to input text directly into the widget
};
// Flags for SliderFloat(), SliderInt() etc.
// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
enumImGuiSliderFlags_
{
ImGuiSliderFlags_None=0,
ImGuiSliderFlags_InvalidMask_=0x7000000F,// [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed.
ImGuiSliderFlags_ClampOnInput=1<<4,// Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
ImGuiSliderFlags_Logarithmic=1<<5,// Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlags_NoRoundToFormat with this if using a format-string with small amount of digits.
ImGuiSliderFlags_NoRoundToFormat=1<<6,// Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits)
ImGuiSliderFlags_NoInput=1<<7// Disable CTRL+Click or Enter key allowing to input text directly into the widget
ImGuiSliderFlags_NoInput=1<<7,// Disable CTRL+Click or Enter key allowing to input text directly into the widget
ImGuiSliderFlags_InvalidMask_=0x7000000F// [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed.
ImGui::SameLine();HelpMarker("Disable rounding underlying value to match precision of the format string (e.g. %.3f values are rounded to those 3 digits).");
ImGui::SameLine();HelpMarker("Disable rounding underlying value to match precision of the format string (e.g. %.3f values are rounded to those 3 digits).");
// Read imgui.cpp "API BREAKING CHANGES" section for 1.78 if you hit this assert.
IM_ASSERT((flags==1||(flags&ImGuiDragFlags_InvalidMask_)==0)&&"Invalid ImGuiDragFlags flags! Has the 'float power' argument been mistakenly cast to flags? Call function with ImGuiDragFlags_Logarithmic flags instead.");
IM_ASSERT((flags==1||(flags&ImGuiSliderFlags_InvalidMask_)==0)&&"Invalid ImGuiSliderFlags flags! Has the 'float power' argument been mistakenly cast to flags? Call function with ImGuiSliderFlags_Logarithmic flags instead.");