Skip to content

Commit

Permalink
Fix scroll on mouse down being overriden by touch scroll (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhozak authored Oct 14, 2024
1 parent 05eb12b commit 3b03a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/raylib-sidebar-scrolling-container/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void UpdateDrawFrame(void)
//----------------------------------------------------------------------------------
// Handle scroll containers
Clay_Vector2 mousePosition = RAYLIB_VECTOR2_TO_CLAY_VECTOR2(GetMousePosition());
Clay_SetPointerState(mousePosition, IsMouseButtonDown(0));
Clay_SetPointerState(mousePosition, IsMouseButtonDown(0) && !scrollbarData.mouseDown);
Clay_SetLayoutDimensions((Clay_Dimensions) { (float)GetScreenWidth(), (float)GetScreenHeight() });
if (!IsMouseButtonDown(0)) {
scrollbarData.mouseDown = false;
Expand Down

0 comments on commit 3b03a79

Please sign in to comment.