diff --git a/src/main.zig b/src/main.zig index e8981f8..dea1904 100644 --- a/src/main.zig +++ b/src/main.zig @@ -29,8 +29,8 @@ test "random" { } } } - const screenWidth = 800; - const screenHeight = 450; + const screenWidth = 1200; + const screenHeight = 800; const Particle = struct { const Self = @This(); @@ -151,11 +151,9 @@ fn rectangle(x : u16,y : u16,width : u16,height : u16) rl.Rectangle } pub fn main() anyerror!void { - // Initialization - //-------------------------------------------------------------------------------------- - const rect2 = rl.Rectangle{ .x = @as(f32, @floatFromInt(10)), .y = @as(f32, @floatFromInt(10)), .width = @as(f32, @floatFromInt(300)), .height = @as(f32, @floatFromInt(100)) }; - const rect3 = rl.Rectangle{ .x = @as(f32, @floatFromInt(10)), .y = @as(f32, @floatFromInt(150)), .width = @as(f32, @floatFromInt(600)), .height = @as(f32, @floatFromInt(10)) }; + const rect2 = rectangle(10,10,300,100); + const rect3 = rectangle(10,150,600,10); const rect4 = rectangle(10,170,600,10); const rect5 = rectangle(10,190,600,10); var msg_res : i32=-1; @@ -178,7 +176,7 @@ pub fn main() anyerror!void { defer rl.closeWindow(); // Close window and OpenGL context var texture : rl.Texture2D = undefined; - const image : rl.Image = rl.loadImage("resources/test_64.png"); + const image : rl.Image = rl.loadImage("resources/blut.png"); if(image.width > 0) { texture = rl.loadTextureFromImage(image); @@ -204,8 +202,6 @@ pub fn main() anyerror!void { .a = 255, }); - - if(state != 0){ msg_res = rg.guiMessageBox(rect2, "Title", "question?", "Nice;Cool"); if(msg_res > -1){ @@ -222,9 +218,9 @@ pub fn main() anyerror!void { else =>{}, } } - _ = rg.guiSlider(rect3,"0","5000",&value,ItoF(0),ItoF(500)); - _ = rg.guiSlider(rect4,"0","10",&value2,ItoF(0),ItoF(3)); - _ = rg.guiSlider(rect5,"0","10",&value3,ItoF(0),ItoF(3)); + _ = rg.guiSlider(rect3,"0","500",&value,ItoF(0),ItoF(500)); + _ = rg.guiSlider(rect4,"-3","3",&value2,ItoF(-3),ItoF(3)); + _ = rg.guiSlider(rect5,"-3","3",&value3,ItoF(-3),ItoF(3)); if(rl.isMouseButtonDown(rl.MouseButton.mouse_button_left)) { @@ -232,7 +228,6 @@ pub fn main() anyerror!void { } emitter.update(texture); - } } diff --git a/zig-out/bin/raylib-test b/zig-out/bin/raylib-test index cc78f35..6ae0e97 100755 Binary files a/zig-out/bin/raylib-test and b/zig-out/bin/raylib-test differ