Drags, Sliders: Added ImGuiDragFlags_NoRoundToFormat / ImGuiSliderFlags_NoRoundToFormat flags (#642)

This commit is contained in:
omar
2020-07-23 23:01:10 +02:00
committed by ocornut
parent 170d02bd99
commit 8018623c5b
4 changed files with 22 additions and 10 deletions

View File

@ -1296,7 +1296,8 @@ enum ImGuiDragFlags_
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 // Should this widget be logarithmic? (linear otherwise)
ImGuiDragFlags_Logarithmic = 1 << 5, // Make the widget logarithmic (linear otherwise)
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)
};
// Flags for SliderFloat(), SliderInt() etc.
@ -1305,7 +1306,8 @@ enum ImGuiSliderFlags_
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 // Should this widget be logarithmic? (linear otherwise)
ImGuiSliderFlags_Logarithmic = 1 << 5, // Make the widget logarithmic (linear otherwise)
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)
};
// Identify a mouse button.