mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Stop advertisting for Drag v_min>v_max which was introduced in 1.73 likely for 0537ac00
then made unnecessary with 32c33c66
, added undocumented ImGuiItemFlags_ReadOnly as possible replacement (unused), (#211)
This commit is contained in:
@ -2113,6 +2113,8 @@ bool ImGui::DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v
|
||||
}
|
||||
if (g.ActiveId != id)
|
||||
return false;
|
||||
if (g.CurrentWindow->DC.ItemFlags & ImGuiItemFlags_ReadOnly)
|
||||
return false;
|
||||
|
||||
switch (data_type)
|
||||
{
|
||||
@ -2558,6 +2560,10 @@ bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_typ
|
||||
// It would be possible to lift that limitation with some work but it doesn't seem to be worth it for sliders.
|
||||
bool ImGui::SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, float power, ImGuiSliderFlags flags, ImRect* out_grab_bb)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
if (g.CurrentWindow->DC.ItemFlags & ImGuiItemFlags_ReadOnly)
|
||||
return false;
|
||||
|
||||
switch (data_type)
|
||||
{
|
||||
case ImGuiDataType_S8: { ImS32 v32 = (ImS32)*(ImS8*)p_v; bool r = SliderBehaviorT<ImS32, ImS32, float>(bb, id, ImGuiDataType_S32, &v32, *(const ImS8*)p_min, *(const ImS8*)p_max, format, power, flags, out_grab_bb); if (r) *(ImS8*)p_v = (ImS8)v32; return r; }
|
||||
|
Reference in New Issue
Block a user