Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.{
.name = "clay-zig",
.name = .clay_zig,
.version = "0.0.0",
.minimum_zig_version = "0.14.0",
.dependencies = .{
Expand Down
8 changes: 4 additions & 4 deletions examples/raylib-video-demo/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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(.{
Expand All @@ -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{
Expand All @@ -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(.{
Expand Down