support for zig 0.14.0-dev.2569+30169d1d2

This commit is contained in:
johan0A 2024-12-29 18:57:28 +01:00
parent bf960a152b
commit aee3641ae8
5 changed files with 14 additions and 14 deletions

View file

@ -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 };

View file

@ -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 = .{

View file

@ -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(

View file

@ -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 = .{

View file

@ -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(