mirror of
https://github.com/nicbarker/clay.git
synced 2025-01-23 18:06:04 +00:00
Fix a compile bug in update scroll containers
This commit is contained in:
parent
f17afc387a
commit
b2d922c78d
1
clay.h
1
clay.h
@ -3038,6 +3038,7 @@ void Clay_Initialize(Clay_Arena arena, Clay_Dimensions layoutDimensions) {
|
|||||||
|
|
||||||
CLAY_WASM_EXPORT("Clay_UpdateScrollContainers")
|
CLAY_WASM_EXPORT("Clay_UpdateScrollContainers")
|
||||||
void Clay_UpdateScrollContainers(bool enableDragScrolling, Clay_Vector2 scrollDelta, float deltaTime) {
|
void Clay_UpdateScrollContainers(bool enableDragScrolling, Clay_Vector2 scrollDelta, float deltaTime) {
|
||||||
|
bool isPointerActive = enableDragScrolling && (Clay__pointerInfo.state == CLAY__POINTER_INFO_PRESSED || Clay__pointerInfo.state == CLAY__POINTER_INFO_PRESSED_THIS_FRAME);
|
||||||
// Don't apply scroll events to ancestors of the inner element
|
// Don't apply scroll events to ancestors of the inner element
|
||||||
int32_t highestPriorityElementIndex = -1;
|
int32_t highestPriorityElementIndex = -1;
|
||||||
Clay__ScrollContainerDataInternal *highestPriorityScrollData = CLAY__NULL;
|
Clay__ScrollContainerDataInternal *highestPriorityScrollData = CLAY__NULL;
|
||||||
|
@ -167,7 +167,7 @@ void UpdateDrawFrame(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Clay_UpdateScrollContainers(false, (Clay_Vector2) {mouseWheelX, mouseWheelY}, GetFrameTime());
|
Clay_UpdateScrollContainers(true, (Clay_Vector2) {mouseWheelX, mouseWheelY}, GetFrameTime());
|
||||||
// Generate the auto layout for rendering
|
// Generate the auto layout for rendering
|
||||||
double currentTime = GetTime();
|
double currentTime = GetTime();
|
||||||
Clay_RenderCommandArray renderCommands = CreateLayout();
|
Clay_RenderCommandArray renderCommands = CreateLayout();
|
||||||
|
Loading…
Reference in New Issue
Block a user