mirror of
https://github.com/nicbarker/clay.git
synced 2025-05-17 15:58:05 +00:00
Compare commits
3 Commits
5e9188b23d
...
a724c9de8a
Author | SHA1 | Date | |
---|---|---|---|
|
a724c9de8a | ||
|
fabdad43f6 | ||
|
ad4d00be33 |
8
clay.h
8
clay.h
@ -1,4 +1,4 @@
|
||||
// VERSION: 0.12
|
||||
// VERSION: 0.13
|
||||
|
||||
/*
|
||||
NOTE: In order to use this library you must define
|
||||
@ -1924,7 +1924,7 @@ void Clay__ConfigureOpenElement(const Clay_ElementDeclaration declaration) {
|
||||
.errorText = CLAY_STRING("A floating element was declared with a parentId, but no element with that ID was found."),
|
||||
.userData = context->errorHandler.userData });
|
||||
} else {
|
||||
clipElementId = Clay__int32_tArray_GetValue(&context->layoutElementClipElementIds, parentItem->layoutElement - context->layoutElements.internalArray);
|
||||
clipElementId = Clay__int32_tArray_GetValue(&context->layoutElementClipElementIds, (int32_t)(parentItem->layoutElement - context->layoutElements.internalArray));
|
||||
}
|
||||
} else if (declaration.floating.attachTo == CLAY_ATTACH_TO_ROOT) {
|
||||
floatingConfig.parentId = Clay__HashString(CLAY_STRING("Clay__RootContainer"), 0, 0).id;
|
||||
@ -3629,7 +3629,7 @@ uint32_t Clay_MinMemorySize(void) {
|
||||
Clay__Context_Allocate_Arena(&fakeContext.internalArena);
|
||||
Clay__InitializePersistentMemory(&fakeContext);
|
||||
Clay__InitializeEphemeralMemory(&fakeContext);
|
||||
return fakeContext.internalArena.nextAllocation + 128;
|
||||
return (uint32_t)fakeContext.internalArena.nextAllocation + 128;
|
||||
}
|
||||
|
||||
CLAY_WASM_EXPORT("Clay_CreateArenaWithCapacityAndMemory")
|
||||
@ -3682,7 +3682,7 @@ void Clay_SetPointerState(Clay_Vector2 position, bool isPointerDown) {
|
||||
context->treeNodeVisited.internalArray[dfsBuffer.length - 1] = true;
|
||||
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
|
||||
int32_t clipElementId = Clay__int32_tArray_GetValue(&context->layoutElementClipElementIds, currentElement - context->layoutElements.internalArray);
|
||||
int32_t clipElementId = Clay__int32_tArray_GetValue(&context->layoutElementClipElementIds, (int32_t)(currentElement - context->layoutElements.internalArray));
|
||||
Clay_LayoutElementHashMapItem *clipItem = Clay__GetHashMapItem(clipElementId);
|
||||
Clay_BoundingBox elementBox = mapItem->boundingBox;
|
||||
elementBox.x -= root->pointerOffset.x;
|
||||
|
Loading…
Reference in New Issue
Block a user