From d1618770c7aff5099c07b139a6caea70d3481f7f Mon Sep 17 00:00:00 2001 From: Pivok Date: Mon, 9 Jun 2025 14:09:53 +0200 Subject: [PATCH 1/2] Make function public --- src/root.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/root.zig b/src/root.zig index 42fe20c..3a5e3c1 100644 --- a/src/root.zig +++ b/src/root.zig @@ -1083,7 +1083,7 @@ pub fn getElementId(string: []const u8) ElementId { } // TODO: doc -fn getScrollOffset() Vector2 { +pub fn getScrollOffset() Vector2 { return cdefs.Clay_GetScrollOffset(); } From d467608ca405245fe1b855c27eba8f3e737eab87 Mon Sep 17 00:00:00 2001 From: Dominic Grimm Date: Tue, 17 Jun 2025 14:20:14 +0200 Subject: [PATCH 2/2] WIP --- src/root.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/root.zig b/src/root.zig index 3a5e3c1..ef1edcf 100644 --- a/src/root.zig +++ b/src/root.zig @@ -723,7 +723,7 @@ pub const ElementDeclaration = extern struct { /// Firstly, tagging an element with an ID allows you to query information about the element later, such as its mouseover state or dimensions. /// /// Secondly, IDs are visually useful when attempting to read and modify UI code, as well as when using the built-in debug tools. - id: ElementId = .{ .base_id = 0, .id = 0, .offset = 0, .string_id = .{ .chars = &.{}, .length = 0 } }, + id: ElementId = .{ .base_id = 0, .id = 0, .offset = 0, .string_id = .{ .chars = &[_]u8{}, .length = 0 } }, /// Controls various settings that affect the size and position of an element, as well as the sizes and positions of any child elements. layout: LayoutConfig = .{}, /// Controls the background color of the resulting element.