GUI: add functions to inhibit inertial scrolling
This commit is contained in:
parent
bb5b99ec96
commit
6b34b9fcab
6 changed files with 40 additions and 6 deletions
2
extern/imgui_patched/imgui_widgets.cpp
vendored
2
extern/imgui_patched/imgui_widgets.cpp
vendored
|
|
@ -2949,7 +2949,7 @@ bool ImGui::SliderScalar(const char* label, ImGuiDataType data_type, void* p_dat
|
|||
|
||||
const bool temp_input_allowed = (flags & ImGuiSliderFlags_NoInput) == 0;
|
||||
ItemSize(total_bb, style.FramePadding.y);
|
||||
if (!ItemAdd(total_bb, id, &frame_bb, temp_input_allowed ? ImGuiItemFlags_Inputable : 0))
|
||||
if (!ItemAdd(total_bb, id, &frame_bb, (temp_input_allowed ? ImGuiItemFlags_Inputable : 0) | ImGuiItemFlags_NoInertialScroll))
|
||||
return false;
|
||||
|
||||
// Default format string when passing NULL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue