| 2062 | } |
| 2063 | |
| 2064 | void Clay__OpenElementWithId(Clay_ElementId elementId) { |
| 2065 | Clay_Context* context = Clay_GetCurrentContext(); |
| 2066 | if (context->layoutElements.length == context->layoutElements.capacity - 1 || context->booleanWarnings.maxElementsExceeded) { |
| 2067 | context->booleanWarnings.maxElementsExceeded = true; |
| 2068 | return; |
| 2069 | } |
| 2070 | Clay_LayoutElement layoutElement = CLAY__DEFAULT_STRUCT; |
| 2071 | layoutElement.id = elementId.id; |
| 2072 | Clay_LayoutElement * openLayoutElement = Clay_LayoutElementArray_Add(&context->layoutElements, layoutElement); |
| 2073 | Clay__int32_tArray_Add(&context->openLayoutElementStack, context->layoutElements.length - 1); |
| 2074 | Clay__AddHashMapItem(elementId, openLayoutElement); |
| 2075 | Clay__StringArray_Add(&context->layoutElementIdStrings, elementId.stringId); |
| 2076 | if (context->openClipElementStack.length > 0) { |
| 2077 | Clay__int32_tArray_Set(&context->layoutElementClipElementIds, context->layoutElements.length - 1, Clay__int32_tArray_GetValue(&context->openClipElementStack, (int)context->openClipElementStack.length - 1)); |
| 2078 | } else { |
| 2079 | Clay__int32_tArray_Set(&context->layoutElementClipElementIds, context->layoutElements.length - 1, 0); |
| 2080 | } |
| 2081 | } |
| 2082 | |
| 2083 | void Clay__OpenTextElement(Clay_String text, Clay_TextElementConfig textConfig) { |
| 2084 | Clay_Context* context = Clay_GetCurrentContext(); |
no test coverage detected