raysan5 / raygui

A simple and easy-to-use immediate-mode gui library
zlib License
3.47k stars 298 forks source link

Fix GuiScrollBar dragging taking slider behavior #313

Closed FederAndInk closed 1 year ago

FederAndInk commented 1 year ago

Arrows are excluded to avoid dragging the scrollbar to the beginning/end when using them

Previous behavior:

https://github.com/raysan5/raygui/assets/24270152/85433f19-d2b4-4897-9ab0-03cff84b7f06

Fixed behavior:

https://github.com/raysan5/raygui/assets/24270152/41ee75a1-b559-463f-8363-a140cb64afdf

FederAndInk commented 1 year ago

This probably fixes #294 for good

raysan5 commented 1 year ago

@FederAndInk Nice! Thank you very much for taking care of this issue! 👍🙂

FederAndInk commented 1 year ago

No problem :) Glad to have helped, I am currently using Raygui on DRM backend with a touchscreen. Nice work :+1:

raysan5 commented 1 year ago

@FederAndInk Oh! Nice! Is it working as expected with the touch controls? Afair, they should be automatically mapped as mouse input but raygui has not been tested much on DRM backend...

FederAndInk commented 1 year ago

@FederAndInk Oh! Nice! Is it working as expected with the touch controls? Afair, they should be automatically mapped as mouse input but raygui has not been tested much on DRM backend...

yeah it's actually working really well, apart from listview scrolling until this fix and recent updates that enabled capturing the cursor to scroll outside the scrollbar