Compare commits

...

2 commits

Author SHA1 Message Date
Bach Le 1f4e388b68
Merge d300cf7cef into 7216815536 2025-10-23 12:57:28 +11:00
Bach Le d300cf7cef Fix Clay__GetParentElementId for new id scheme 2025-09-27 16:31:48 +08:00

3
clay.h
View file

@ -1322,8 +1322,7 @@ Clay_LayoutElement* Clay__GetOpenLayoutElement(void) {
}
uint32_t Clay__GetParentElementId(void) {
Clay_Context* context = Clay_GetCurrentContext();
return Clay_LayoutElementArray_Get(&context->layoutElements, Clay__int32_tArray_GetValue(&context->openLayoutElementStack, context->openLayoutElementStack.length - 2))->id;
return Clay__GetOpenLayoutElement()->id;
}
Clay_LayoutConfig * Clay__StoreLayoutConfig(Clay_LayoutConfig config) { return Clay_GetCurrentContext()->booleanWarnings.maxElementsExceeded ? &CLAY_LAYOUT_DEFAULT : Clay__LayoutConfigArray_Add(&Clay_GetCurrentContext()->layoutConfigs, config); }