diff --git a/clay.h b/clay.h index 65d2854..73aa22a 100644 --- a/clay.h +++ b/clay.h @@ -360,6 +360,8 @@ typedef struct { // CLAY_TEXT_ALIGN_CENTER - Horizontally aligns wrapped lines of text to the center of their bounding box. // CLAY_TEXT_ALIGN_RIGHT - Horizontally aligns wrapped lines of text to the right hand side of their bounding box. Clay_TextAlignment textAlignment; + // A pointer that will be transparently passed through to the resulting render command. + void *userData; // When set to true, clay will hash the entire text contents of this string as an identifier for its internal // text measurement cache, rather than just the pointer and length. This will incur significant performance cost for // long bodies of text. @@ -2660,7 +2662,7 @@ void Clay__CalculateFinalLayout(void) { .letterSpacing = textElementConfig->letterSpacing, .lineHeight = textElementConfig->lineHeight, }}, - .userData = sharedConfig->userData, + .userData = textElementConfig->userData, .id = Clay__HashNumber(lineIndex, currentElement->id).id, .zIndex = root->zIndex, .commandType = CLAY_RENDER_COMMAND_TYPE_TEXT,