From afd1019d0c42782e8b18ac7df3f1a4bb983268ec Mon Sep 17 00:00:00 2001 From: Emmett McDow Date: Thu, 25 Dec 2025 14:49:41 -0500 Subject: [PATCH] Updates example, README, and build.zig.zon --- README.md | 2 +- build.zig.zon | 2 +- examples/raylib-video-demo/src/main.zig | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ae53179..22aa3b8 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ To enable a builtin renderer you should first add its third party library to you const cl = @import("clay-zig"); const raylib_dep = b.dependency("raylib-zig", .{ ... }); -cl.enableRenderer(exe.root_module, clay_dep, .{ .raylib = raylib_dep.module("raylib") }); +cl.enableRaylibRenderer(exe, clay_dep, raylib_dep); ``` ### Quick Start diff --git a/build.zig.zon b/build.zig.zon index dad3afb..c3f8d04 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,5 +1,5 @@ .{ - .name = "clay-zig", + .name = .clay_zig, .version = "0.0.0", .minimum_zig_version = "0.14.0", .dependencies = .{ diff --git a/examples/raylib-video-demo/src/main.zig b/examples/raylib-video-demo/src/main.zig index 3545fa3..25e0f68 100644 --- a/examples/raylib-video-demo/src/main.zig +++ b/examples/raylib-video-demo/src/main.zig @@ -20,7 +20,7 @@ pub fn main() !void { .msaa_4x_hint = true, .vsync_hint = true, }); - rl.setTraceLogLevel(.log_warning); + rl.setTraceLogLevel(.warning); rl.initWindow(1024, 768, "Introducing Clay Demo"); defer rl.closeWindow(); @@ -40,7 +40,7 @@ pub fn main() !void { cl.setMeasureTextFunction(renderer.measureText); renderer.fonts[FONT_ID_BODY_16] = rl.cdef.LoadFontEx("resources/Roboto-Regular.ttf", 48, 0, 400); - rl.setTextureFilter(renderer.fonts[FONT_ID_BODY_16].?.texture, .texture_filter_bilinear); + rl.setTextureFilter(renderer.fonts[FONT_ID_BODY_16].?.texture, .bilinear); while (!rl.windowShouldClose()) { cl.setLayoutDimensions(.{ @@ -50,7 +50,7 @@ pub fn main() !void { const mousePosition = rl.getMousePosition(); const scrollDelta = rl.getMouseWheelMoveV(); - cl.setPointerState(mousePosition, rl.isMouseButtonDown(.mouse_button_left)); + cl.setPointerState(mousePosition, rl.isMouseButtonDown(.left)); cl.updateScrollContainers(true, scrollDelta, rl.getFrameTime()); const content_background_config = cl.RectangleConfig{ @@ -59,7 +59,7 @@ pub fn main() !void { }; // Toggle the inspector with spacebar - if (rl.isKeyPressed(.key_space)) cl.setDebugModeEnabled(!cl.isDebugModeEnabled()); + if (rl.isKeyPressed(.space)) cl.setDebugModeEnabled(!cl.isDebugModeEnabled()); cl.beginLayout(); if (cl.open(.{