mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
Merge a27933f6b56c8152066a1c16393031e3868c1017 into a1af3c1a59fe81f7a1cac10dcead0a383b99f245
This commit is contained in:
commit
1006abefe2
@ -10721,6 +10721,7 @@ void ImGui::UpdateMouseWheel()
|
||||
if (do_scroll[ImGuiAxis_X])
|
||||
{
|
||||
LockWheelingWindow(window, wheel.x);
|
||||
SetKeyOwner(ImGuiKey_MouseWheelX, window->ID);
|
||||
float max_step = window->InnerRect.GetWidth() * 0.67f;
|
||||
float scroll_step = ImTrunc(ImMin(2 * window->FontRefSize, max_step));
|
||||
SetScrollX(window, window->Scroll.x - wheel.x * scroll_step);
|
||||
@ -10729,6 +10730,7 @@ void ImGui::UpdateMouseWheel()
|
||||
if (do_scroll[ImGuiAxis_Y])
|
||||
{
|
||||
LockWheelingWindow(window, wheel.y);
|
||||
SetKeyOwner(ImGuiKey_MouseWheelY, window->ID);
|
||||
float max_step = window->InnerRect.GetHeight() * 0.67f;
|
||||
float scroll_step = ImTrunc(ImMin(5 * window->FontRefSize, max_step));
|
||||
SetScrollY(window, window->Scroll.y - wheel.y * scroll_step);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user