From 009276b6cbd20ee697a209370d647945877e7e39 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 10 Aug 2020 15:31:48 +0200 Subject: [PATCH] Backends: Allegro 5: Fixed horizontal scrolling direction with mouse wheel / touch pads (#3394, #2424, #1463) [@nobody-special666] Amend 7dea158175615dc8939c57a06641bac911e33e8c + Fix vsproj GUID --- docs/CHANGELOG.txt | 4 +++- examples/example_allegro5/example_allegro5.vcxproj | 2 +- examples/imgui_impl_allegro5.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 76703d745d75..b30685f5afd1 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -49,7 +49,7 @@ Other Changes: clipping, more than 16 KB characters are visible in the same low-level ImDrawList::RenderText call. ImGui-level functions such as TextUnformatted() are not affected. This is quite rare but it will be addressed later). (#3349) -- Selectable: Fixed highlight/hit extent when used with horizontal scrolling (in or outside columns). +- Selectable: Fixed highlight/hit extent when used with horizontal scrolling (in or outside columns). Also fixed related text clipping when used in a column after the first one. (#3187, #3386) - Scrolling: Avoid SetScroll, SetScrollFromPos functions from snapping on the edge of scroll limits when close-enough by (WindowPadding - ItemPadding), which was a tweak with too many @@ -80,6 +80,8 @@ Other Changes: - Demo: Improved "Layout & Scrolling" -> "Child Windows" section. - Style Editor: Added preview of circle auto-tessellation when editing the corresponding value. - Backends: OpenGL3: Added support for glad2 loader. (#3330) [@moritz-h] +- Backends: Allegro 5: Fixed horizontal scrolling direction with mouse wheel / touch pads (it seems + like Allegro 5 reports it differently from GLFW and SDL). (#3394, #2424, #1463) [@nobody-special666] - Examples: Vulkan: Fixed GLFW+Vulkan and SDL+Vulkan clear color not being set. (#3390) [@RoryO] diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj index c86dcb2bc78f..f5fadc37fc89 100644 --- a/examples/example_allegro5/example_allegro5.vcxproj +++ b/examples/example_allegro5/example_allegro5.vcxproj @@ -19,7 +19,7 @@ - {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741} + {73F235B5-7D31-4FC6-8682-DDC5A097B9C1} example_allegro5 8.1 diff --git a/examples/imgui_impl_allegro5.cpp b/examples/imgui_impl_allegro5.cpp index 4a467c30d1fe..ca2cfae4634e 100644 --- a/examples/imgui_impl_allegro5.cpp +++ b/examples/imgui_impl_allegro5.cpp @@ -15,6 +15,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2020-08-10: Inputs: Fixed horizontal mouse wheel direction. // 2019-12-05: Inputs: Added support for ImGuiMouseCursor_NotAllowed mouse cursor. // 2019-07-21: Inputs: Added mapping for ImGuiKey_KeyPadEnter. // 2019-05-11: Inputs: Don't filter character value from ALLEGRO_EVENT_KEY_CHAR before calling AddInputCharacter(). @@ -332,7 +333,7 @@ bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* ev) if (ev->mouse.display == g_Display) { io.MouseWheel += ev->mouse.dz; - io.MouseWheelH += ev->mouse.dw; + io.MouseWheelH -= ev->mouse.dw; io.MousePos = ImVec2(ev->mouse.x, ev->mouse.y); } return true;