From aee3641ae8d1a785ff50c08d47d9d659d4542b94 Mon Sep 17 00:00:00 2001 From: johan0A Date: Sun, 29 Dec 2024 18:57:28 +0100 Subject: [PATCH] support for zig 0.14.0-dev.2569+30169d1d2 --- README.md | 2 +- examples/clay-official-website/build.zig.zon | 4 ++-- examples/clay-official-website/src/main.zig | 10 +++++----- examples/raylib-sidebar-container/build.zig.zon | 4 ++-- examples/raylib-sidebar-container/src/main.zig | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index e6514ab..9f03e99 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ clay.setPointerState(.{ }, is_left_mouse_button_down); ``` -5. Call [clay.BeginLayout(screenWidth, screenHeight)](https://github.com/nicbarker/clay/blob/main/README.md#clay_beginlayout) and declare your layout using the provided macros. +5. Call [clay.BeginLayout(screenWidth, screenHeight)](https://github.com/nicbarker/clay/blob/main/README.md#clay_beginlayout) and declare your layout using the provided functions. ```Zig const light_grey: clay.Color = .{ 224, 215, 210, 255 }; diff --git a/examples/clay-official-website/build.zig.zon b/examples/clay-official-website/build.zig.zon index a2aaa56..68acf3f 100644 --- a/examples/clay-official-website/build.zig.zon +++ b/examples/clay-official-website/build.zig.zon @@ -6,8 +6,8 @@ .path = "../../", }, .@"raylib-zig" = .{ - .url = "https://github.com/Not-Nik/raylib-zig/archive/90109ff8041229ae8b615dca362f646586f20bd3.tar.gz", - .hash = "122062d2421175ba6bf89382c86621270e4883f1074ee4cc09da282e231bdef57328", + .url = "https://github.com/Not-Nik/raylib-zig/archive/35332edacf2e03236220f12a8dd3410b1c39d9eb.tar.gz", + .hash = "1220c34fe472645e173a7168eb513ca8343af3c3f61b618daedda30ec3932b002637", }, }, .paths = .{ diff --git a/examples/clay-official-website/src/main.zig b/examples/clay-official-website/src/main.zig index 103280d..653ffe2 100644 --- a/examples/clay-official-website/src/main.zig +++ b/examples/clay-official-website/src/main.zig @@ -599,7 +599,7 @@ fn createLayout(lerp_value: f32) cl.ClayArray(cl.RenderCommand) { fn loadFont(file_data: ?[]const u8, font_id: u16, font_size: i32) void { renderer.raylib_fonts[font_id] = rl.loadFontFromMemory(".ttf", file_data, font_size * 2, null); - rl.setTextureFilter(renderer.raylib_fonts[font_id].?.texture, .texture_filter_bilinear); + rl.setTextureFilter(renderer.raylib_fonts[font_id].?.texture, .bilinear); } pub fn main() anyerror!void { @@ -614,7 +614,7 @@ pub fn main() anyerror!void { cl.setMeasureTextFunction(renderer.measureText); // init raylib - rl.setTraceLogLevel(.log_error); + rl.setTraceLogLevel(.err); rl.setConfigFlags(.{ .msaa_4x_hint = true, .vsync_hint = true, @@ -644,12 +644,12 @@ pub fn main() anyerror!void { checkImage4 = rl.loadTextureFromImage(rl.loadImageFromMemory(".png", @embedFile("resources/check_4.png"))); checkImage5 = rl.loadTextureFromImage(rl.loadImageFromMemory(".png", @embedFile("resources/check_5.png"))); - rl.setTextureFilter(syntaxImage, .texture_filter_bilinear); + rl.setTextureFilter(syntaxImage, .bilinear); var animation_lerp_value: f32 = -1.0; var debug_mode_enabled = false; while (!rl.windowShouldClose()) { - if (rl.isKeyPressed(.key_d)) { + if (rl.isKeyPressed(.d)) { debug_mode_enabled = !debug_mode_enabled; cl.setDebugModeEnabled(debug_mode_enabled); } @@ -666,7 +666,7 @@ pub fn main() anyerror!void { cl.setPointerState(.{ .x = mouse_pos.x, .y = mouse_pos.y, - }, rl.isMouseButtonDown(.mouse_button_left)); + }, rl.isMouseButtonDown(.left)); const scroll_delta = rl.getMouseWheelMoveV().multiply(.{ .x = 6, .y = 6 }); cl.updateScrollContainers( diff --git a/examples/raylib-sidebar-container/build.zig.zon b/examples/raylib-sidebar-container/build.zig.zon index a2aaa56..68acf3f 100644 --- a/examples/raylib-sidebar-container/build.zig.zon +++ b/examples/raylib-sidebar-container/build.zig.zon @@ -6,8 +6,8 @@ .path = "../../", }, .@"raylib-zig" = .{ - .url = "https://github.com/Not-Nik/raylib-zig/archive/90109ff8041229ae8b615dca362f646586f20bd3.tar.gz", - .hash = "122062d2421175ba6bf89382c86621270e4883f1074ee4cc09da282e231bdef57328", + .url = "https://github.com/Not-Nik/raylib-zig/archive/35332edacf2e03236220f12a8dd3410b1c39d9eb.tar.gz", + .hash = "1220c34fe472645e173a7168eb513ca8343af3c3f61b618daedda30ec3932b002637", }, }, .paths = .{ diff --git a/examples/raylib-sidebar-container/src/main.zig b/examples/raylib-sidebar-container/src/main.zig index 020ab2f..cf411bc 100644 --- a/examples/raylib-sidebar-container/src/main.zig +++ b/examples/raylib-sidebar-container/src/main.zig @@ -73,7 +73,7 @@ fn createLayout(profile_picture: *const rl.Texture2D) cl.ClayArray(cl.RenderComm fn loadFont(file_data: ?[]const u8, font_id: u16, font_size: i32) void { renderer.raylib_fonts[font_id] = rl.loadFontFromMemory(".ttf", file_data, font_size * 2, null); - rl.setTextureFilter(renderer.raylib_fonts[font_id].?.texture, .texture_filter_bilinear); + rl.setTextureFilter(renderer.raylib_fonts[font_id].?.texture, .bilinear); } pub fn main() anyerror!void { @@ -88,7 +88,7 @@ pub fn main() anyerror!void { cl.setMeasureTextFunction(renderer.measureText); // init raylib - rl.setTraceLogLevel(.log_error); + rl.setTraceLogLevel(.err); rl.setConfigFlags(.{ .msaa_4x_hint = true, .vsync_hint = true, @@ -104,7 +104,7 @@ pub fn main() anyerror!void { var debug_mode_enabled = false; while (!rl.windowShouldClose()) { - if (rl.isKeyPressed(.key_d)) { + if (rl.isKeyPressed(.d)) { debug_mode_enabled = !debug_mode_enabled; cl.setDebugModeEnabled(debug_mode_enabled); } @@ -113,7 +113,7 @@ pub fn main() anyerror!void { cl.setPointerState(.{ .x = mouse_pos.x, .y = mouse_pos.y, - }, rl.isMouseButtonDown(.mouse_button_left)); + }, rl.isMouseButtonDown(.left)); const scroll_delta = rl.getMouseWheelMoveV().multiply(.{ .x = 6, .y = 6 }); cl.updateScrollContainers(