Fix some things that broke after rebasing

This commit is contained in:
Harrison Lambeth 2025-01-29 19:21:31 -07:00
parent 3f39223eb4
commit b97bf246c8

6
clay.h
View File

@ -510,11 +510,11 @@ typedef struct {
uintptr_t userData;
} Clay_ErrorHandler;
CLAY__TYPEDEF(Clay_PointQueryResult, struct
typedef struct
{
int32_t length;
const Clay_ElementId *results;
});
} Clay_PointQueryResult;
// Function Forward Declarations ---------------------------------
// Public API functions ---
@ -3206,7 +3206,7 @@ Clay_PointQueryResult Clay_GetElementIdsAtPoint(Clay_Vector2 position) {
continue;
}
context->treeNodeVisited.internalArray[dfsBuffer.length - 1] = true;
Clay_LayoutElement *currentElement = Clay_LayoutElementArray_Get(&context->layoutElements, Clay__int32_tArray_Get(&dfsBuffer, (int)dfsBuffer.length - 1));
Clay_LayoutElement *currentElement = Clay_LayoutElementArray_Get(&context->layoutElements, Clay__int32_tArray_GetValue(&dfsBuffer, (int)dfsBuffer.length - 1));
Clay_LayoutElementHashMapItem *mapItem = Clay__GetHashMapItem(currentElement->id); // TODO think of a way around this, maybe the fact that it's essentially a binary tree limits the cost, but the worst case is not great
Clay_BoundingBox elementBox = mapItem->boundingBox;
elementBox.x -= root->pointerOffset.x;