z index to i32 and update odin bindings

This commit is contained in:
Nic Barker 2025-01-26 15:11:26 +13:00
parent e41a8eea88
commit a2c1b860a6
6 changed files with 3 additions and 3 deletions

View File

@ -185,7 +185,7 @@ RenderCommand :: struct {
boundingBox: BoundingBox, boundingBox: BoundingBox,
config: ElementConfigUnion, config: ElementConfigUnion,
text: StringSlice, text: StringSlice,
zIndex: u32, zIndex: i32,
id: u32, id: u32,
commandType: RenderCommandType, commandType: RenderCommandType,
} }

Binary file not shown.

Binary file not shown.

4
clay.h
View File

@ -472,7 +472,7 @@ CLAY__TYPEDEF(Clay_RenderCommand, struct {
Clay_BoundingBox boundingBox; Clay_BoundingBox boundingBox;
Clay_ElementConfigUnion config; Clay_ElementConfigUnion config;
Clay_StringSlice text; // TODO I wish there was a way to avoid having to have this on every render command Clay_StringSlice text; // TODO I wish there was a way to avoid having to have this on every render command
uint32_t zIndex; int32_t zIndex;
uint32_t id; uint32_t id;
Clay_RenderCommandType commandType; Clay_RenderCommandType commandType;
}); });
@ -2601,8 +2601,8 @@ void Clay__CalculateFinalLayout() {
Clay__AddRenderCommand(CLAY__INIT(Clay_RenderCommand) { Clay__AddRenderCommand(CLAY__INIT(Clay_RenderCommand) {
.boundingBox = clipHashMapItem->boundingBox, .boundingBox = clipHashMapItem->boundingBox,
.config = { .scrollElementConfig = Clay__StoreScrollElementConfig(CLAY__INIT(Clay_ScrollElementConfig)CLAY__DEFAULT_STRUCT) }, .config = { .scrollElementConfig = Clay__StoreScrollElementConfig(CLAY__INIT(Clay_ScrollElementConfig)CLAY__DEFAULT_STRUCT) },
.id = Clay__RehashWithNumber(rootElement->id, 10), // TODO need a better strategy for managing derived ids
.zIndex = root->zIndex, .zIndex = root->zIndex,
.id = Clay__RehashWithNumber(rootElement->id, 10), // TODO need a better strategy for managing derived ids
.commandType = CLAY_RENDER_COMMAND_TYPE_SCISSOR_START, .commandType = CLAY_RENDER_COMMAND_TYPE_SCISSOR_START,
}); });
} }