Compare commits

..

1 Commits

Author SHA1 Message Date
Harrison Lambeth
db85494e85
Merge b97bf246c8 into b9c5f8e47f 2025-02-06 02:33:14 +01:00
7 changed files with 2 additions and 8 deletions

View File

@ -229,9 +229,8 @@ RenderCommandData :: struct #raw_union {
RenderCommand :: struct { RenderCommand :: struct {
boundingBox: BoundingBox, boundingBox: BoundingBox,
renderData: RenderCommandData, renderData: RenderCommandData,
userData: rawptr, zIndex: i32,
id: u32, id: u32,
zIndex: i16,
commandType: RenderCommandType, commandType: RenderCommandType,
} }
@ -327,7 +326,6 @@ ElementDeclaration :: struct {
custom: CustomElementConfig, custom: CustomElementConfig,
scroll: ScrollElementConfig, scroll: ScrollElementConfig,
border: BorderElementConfig, border: BorderElementConfig,
userData: rawptr
} }
ErrorType :: enum { ErrorType :: enum {

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -71,13 +71,9 @@ clayRaylibRender :: proc(renderCommands: ^clay.ClayArray(clay.RenderCommand), al
) )
case clay.RenderCommandType.Image: case clay.RenderCommandType.Image:
config := renderCommand.renderData.image config := renderCommand.renderData.image
tintColor := config.backgroundColor
if (tintColor.rgba == 0) {
tintColor = { 255, 255, 255, 255 }
}
// TODO image handling // TODO image handling
imageTexture := cast(^raylib.Texture2D)config.imageData imageTexture := cast(^raylib.Texture2D)config.imageData
raylib.DrawTextureEx(imageTexture^, raylib.Vector2{boundingBox.x, boundingBox.y}, 0, boundingBox.width / cast(f32)imageTexture.width, clayColorToRaylibColor(tintColor)) raylib.DrawTextureEx(imageTexture^, raylib.Vector2{boundingBox.x, boundingBox.y}, 0, boundingBox.width / cast(f32)imageTexture.width, clayColorToRaylibColor(config.backgroundColor))
case clay.RenderCommandType.ScissorStart: case clay.RenderCommandType.ScissorStart:
raylib.BeginScissorMode( raylib.BeginScissorMode(
cast(i32)math.round(boundingBox.x), cast(i32)math.round(boundingBox.x),