mirror of
https://github.com/nicbarker/clay.git
synced 2025-01-23 18:06:04 +00:00
Fix scroll on mouse down being overriden by touch scroll (#42)
This commit is contained in:
parent
05eb12bed7
commit
3b03a79f28
@ -141,7 +141,7 @@ void UpdateDrawFrame(void)
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Handle scroll containers
|
// Handle scroll containers
|
||||||
Clay_Vector2 mousePosition = RAYLIB_VECTOR2_TO_CLAY_VECTOR2(GetMousePosition());
|
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() });
|
Clay_SetLayoutDimensions((Clay_Dimensions) { (float)GetScreenWidth(), (float)GetScreenHeight() });
|
||||||
if (!IsMouseButtonDown(0)) {
|
if (!IsMouseButtonDown(0)) {
|
||||||
scrollbarData.mouseDown = false;
|
scrollbarData.mouseDown = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user