mirror of
https://github.com/nicbarker/clay.git
synced 2025-09-18 04:26:18 +00:00
[Core] Fixed a bug where userdata wasn't getting correctly passed through for image render commands
This commit is contained in:
parent
95fcd85a2a
commit
b9c5f8e47f
4
clay.h
4
clay.h
|
@ -2226,6 +2226,7 @@ void Clay__CalculateFinalLayout(void) {
|
|||
Clay_ElementConfig *elementConfig = Clay__ElementConfigArraySlice_Get(¤tElement->elementConfigs, sortedConfigIndexes[elementConfigIndex]);
|
||||
Clay_RenderCommand renderCommand = {
|
||||
.boundingBox = currentElementBoundingBox,
|
||||
.userData = sharedConfig->userData,
|
||||
.id = currentElement->id,
|
||||
};
|
||||
|
||||
|
@ -2406,6 +2407,7 @@ void Clay__CalculateFinalLayout(void) {
|
|||
.cornerRadius = sharedConfig->cornerRadius,
|
||||
.width = borderConfig->width
|
||||
}},
|
||||
.userData = sharedConfig->userData,
|
||||
.id = Clay__HashNumber(currentElement->id, currentElement->childrenOrTextContent.children.length).id,
|
||||
.commandType = CLAY_RENDER_COMMAND_TYPE_BORDER,
|
||||
};
|
||||
|
@ -2422,6 +2424,7 @@ void Clay__CalculateFinalLayout(void) {
|
|||
.renderData = { .rectangle = {
|
||||
.backgroundColor = borderConfig->color,
|
||||
} },
|
||||
.userData = sharedConfig->userData,
|
||||
.id = Clay__HashNumber(currentElement->id, currentElement->childrenOrTextContent.children.length + 1 + i).id,
|
||||
.commandType = CLAY_RENDER_COMMAND_TYPE_RECTANGLE,
|
||||
});
|
||||
|
@ -2437,6 +2440,7 @@ void Clay__CalculateFinalLayout(void) {
|
|||
.renderData = { .rectangle = {
|
||||
.backgroundColor = borderConfig->color,
|
||||
} },
|
||||
.userData = sharedConfig->userData,
|
||||
.id = Clay__HashNumber(currentElement->id, currentElement->childrenOrTextContent.children.length + 1 + i).id,
|
||||
.commandType = CLAY_RENDER_COMMAND_TYPE_RECTANGLE,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue