mirror of
https://github.com/nicbarker/clay.git
synced 2025-09-18 12:36:17 +00:00
Merge bac3ca8b1d
into 0d6969c8c3
This commit is contained in:
commit
b512ed7bc2
7
clay.h
7
clay.h
|
@ -513,6 +513,9 @@ typedef struct Clay_CustomElementConfig {
|
|||
// A transparent pointer through which you can pass custom data to the renderer.
|
||||
// Generates CUSTOM render commands.
|
||||
void* customData;
|
||||
|
||||
// An integer Dd value to help identify the custom data element during the rendering stage.
|
||||
uint32_t customCommandId;
|
||||
} Clay_CustomElementConfig;
|
||||
|
||||
CLAY__WRAPPER_STRUCT(Clay_CustomElementConfig);
|
||||
|
@ -598,8 +601,11 @@ typedef struct Clay_CustomRenderData {
|
|||
// Controls the "radius", or corner rounding of this custom element.
|
||||
// The rounding is determined by drawing a circle inset into the element corner by (radius, radius) pixels.
|
||||
Clay_CornerRadius cornerRadius;
|
||||
|
||||
// A pointer transparently passed through from the original element definition.
|
||||
void* customData;
|
||||
// An id value transparently passed through from the original element definition.
|
||||
uint32_t customCommandId;
|
||||
} Clay_CustomRenderData;
|
||||
|
||||
// Render command data when commandType == CLAY_RENDER_COMMAND_TYPE_SCISSOR_START || commandType == CLAY_RENDER_COMMAND_TYPE_SCISSOR_END
|
||||
|
@ -2919,6 +2925,7 @@ void Clay__CalculateFinalLayout(void) {
|
|||
.backgroundColor = sharedConfig->backgroundColor,
|
||||
.cornerRadius = sharedConfig->cornerRadius,
|
||||
.customData = elementConfig->config.customElementConfig->customData,
|
||||
.customCommandId = elementConfig->config.customElementConfig->customCommandId
|
||||
}
|
||||
};
|
||||
emitRectangle = false;
|
||||
|
|
Loading…
Reference in a new issue