Backends, Inputs: Made horizontal scroll wheel and horizontal scroll direction consistent accross backends/os. (#4019, #6096, #1463)

Documented assumptions.
This commit is contained in:
ocornut
2023-02-01 20:50:45 +01:00
parent 8d29665ae1
commit 3617a96372
10 changed files with 372 additions and 8 deletions

View File

@ -35,6 +35,36 @@ HOW TO UPDATE?
VERSION 1.89.3 (In Progress)
-----------------------------------------------------------------------
Breaking changes:
- Inputs, Scrolling: Made horizontal scroll wheel and horizontal scroll direction consistent
accross backends/os. (#4019, #6096, #1463) [@PathogenDavid, @ocornut, @rokups]
- Clarified that 'wheel_y > 0.0f' scrolls Up, 'wheel_y > 0.0f' scrolls Down.
- Clarified that 'wheel_x > 0.0f' scrolls Left, 'wheel_x > 0.0f' scrolls Right.
- Backends: Win32: flipping WM_MOUSEHWHEEL value to match other backends and
offer consistent horizontal scrolling direction. (#4019)
- Backends: SDL: flipping SDL_MOUSEWHEEL 'wheel.x' value to match other backends and
offer consistent horizontal scrolling direction. (#4019)
- Backends: GLFW+Emscripten: flipping both wheels axises + scaling magnitude down when
running on Emscripten's GLFW emulation. (#6096) [@topolarity]
- Shift+WheelY support on non-OSX machines was already correct. (#2424, #1463)
(whereaas on OSX machines Shift+WheelY turns into WheelX at the OS level).
- If you use a custom-backend, you should verify that:
- Wheel up (*) emit wheel_y > 0.0f values and scrolls up.
- Wheel down (*) emit wheel_y < 0.0f values and scrolls down.
- Wheel left (*) or mod+wheel up emit wheel_x > 0.0f values and scroll Left.
- Wheel right (*) or mod+wheel down emits wheel_x < 0.0f values and scroll Right.
- (*) both axises flipped on OSX for mouse and touchpad when 'Natural Scrolling' is on.
- (*) both axises flipped On Windows for touchpad only when 'Settings->Touchpad->Down motion scrolls up' is set.
- You can use 'Demo->Tools->Debug Log->IO" to visualize values submitted to Dear ImGui.
- Known issues remaining with Emscripten:
- The magnitude of wheeling values on Emscripten setups is still mostly wrong. (#6096)
- When running the Emscripten app on a Mac with a mouse, SHIFT+WheelY doesn't turn into WheelX.
This is because we don't know that we are running on Mac and apply our own Shift+swapping
on top of OSX' own swapping, so wheel axises are swapped twice. Emscripten apps may need
to find a way to detect this and set io.ConfigMacOSXBehaviors manually (if you know a way
let us know!), or offer the "OSX-style behavior" option to their user.
All changes:
- Window: Avoid rendering shapes for hidden resize grips.