mirror of
https://github.com/nicbarker/clay.git
synced 2025-05-15 14:58:03 +00:00
Merge d60b491c29
into feead45f3e
This commit is contained in:
commit
fe7e607d0b
4
clay.h
4
clay.h
@ -339,6 +339,8 @@ typedef CLAY_PACKED_ENUM {
|
|||||||
|
|
||||||
// Controls various functionality related to text elements.
|
// Controls various functionality related to text elements.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
// A pointer that will be transparently passed through to the resulting render command.
|
||||||
|
void *userData;
|
||||||
// The RGBA color of the font to render, conventionally specified as 0-255.
|
// The RGBA color of the font to render, conventionally specified as 0-255.
|
||||||
Clay_Color textColor;
|
Clay_Color textColor;
|
||||||
// An integer transparently passed to Clay_MeasureText to identify the font to use.
|
// An integer transparently passed to Clay_MeasureText to identify the font to use.
|
||||||
@ -2660,7 +2662,7 @@ void Clay__CalculateFinalLayout(void) {
|
|||||||
.letterSpacing = textElementConfig->letterSpacing,
|
.letterSpacing = textElementConfig->letterSpacing,
|
||||||
.lineHeight = textElementConfig->lineHeight,
|
.lineHeight = textElementConfig->lineHeight,
|
||||||
}},
|
}},
|
||||||
.userData = sharedConfig->userData,
|
.userData = textElementConfig->userData,
|
||||||
.id = Clay__HashNumber(lineIndex, currentElement->id).id,
|
.id = Clay__HashNumber(lineIndex, currentElement->id).id,
|
||||||
.zIndex = root->zIndex,
|
.zIndex = root->zIndex,
|
||||||
.commandType = CLAY_RENDER_COMMAND_TYPE_TEXT,
|
.commandType = CLAY_RENDER_COMMAND_TYPE_TEXT,
|
||||||
|
Loading…
Reference in New Issue
Block a user