From f13c5c3ec30e28ff6671dc80b72e9372b493be23 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 4 May 2022 11:53:06 +0200 Subject: [PATCH] Do not force `GuiScrollPanel()` up/down key inputs --- src/raygui.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/raygui.h b/src/raygui.h index d7e0d2f..5b17787 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -1523,6 +1523,7 @@ Rectangle GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED; else state = GUI_STATE_FOCUSED; +#if defined(SUPPORT_SCROLLBAR_KEY_INPUT) if (hasHorizontalScrollBar) { if (IsKeyDown(KEY_RIGHT)) scrollPos.x -= GuiGetStyle(SCROLLBAR, SCROLL_SPEED); @@ -1534,7 +1535,7 @@ Rectangle GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, if (IsKeyDown(KEY_DOWN)) scrollPos.y -= GuiGetStyle(SCROLLBAR, SCROLL_SPEED); if (IsKeyDown(KEY_UP)) scrollPos.y += GuiGetStyle(SCROLLBAR, SCROLL_SPEED); } - +#endif float wheelMove = GetMouseWheelMove(); // Horizontal scroll (Shift + Mouse wheel)