MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / Clay__OpenElementWithId

Function Clay__OpenElementWithId

include/clay.h:2064–2081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2062}
2063
2064void 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
2083void Clay__OpenTextElement(Clay_String text, Clay_TextElementConfig textConfig) {
2084 Clay_Context* context = Clay_GetCurrentContext();

Callers 1

Clay_BeginLayoutFunction · 0.85

Calls 2

Clay_GetCurrentContextFunction · 0.85
Clay__AddHashMapItemFunction · 0.85

Tested by

no test coverage detected