mirror of
https://github.com/nicbarker/clay.git
synced 2025-05-15 14:58:03 +00:00
Move userdata pointer to top of text element config
This commit is contained in:
parent
977ef87b92
commit
d60b491c29
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.
|
||||||
@ -360,8 +362,6 @@ typedef struct {
|
|||||||
// CLAY_TEXT_ALIGN_CENTER - Horizontally aligns wrapped lines of text to the center of their bounding box.
|
// 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_TEXT_ALIGN_RIGHT - Horizontally aligns wrapped lines of text to the right hand side of their bounding box.
|
||||||
Clay_TextAlignment textAlignment;
|
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
|
// 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
|
// text measurement cache, rather than just the pointer and length. This will incur significant performance cost for
|
||||||
// long bodies of text.
|
// long bodies of text.
|
||||||
|
Loading…
Reference in New Issue
Block a user