add raygui
This commit is contained in:
		
							parent
							
								
									b201817d12
								
							
						
					
					
						commit
						381db25621
					
				
					 4 changed files with 10 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								zig/3rd-party/raygui
									
										
									
									
										vendored
									
									
										Submodule
									
								
							
							
						
						
									
										1
									
								
								zig/3rd-party/raygui
									
										
									
									
										vendored
									
									
										Submodule
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
Subproject commit 85a5c104f509b183c8cc7db0d90c2ab7a2b198c8
 | 
			
		||||
| 
						 | 
				
			
			@ -20,6 +20,7 @@ pub fn build(b: *std.Build) void {
 | 
			
		|||
        .target = target,
 | 
			
		||||
        .optimize = optimize,
 | 
			
		||||
    });
 | 
			
		||||
    exe.addIncludePath(.{ .path = "3rd-party/raygui/src" });
 | 
			
		||||
    exe.linkLibrary(raylib_dep.artifact("raylib"));
 | 
			
		||||
 | 
			
		||||
    // This declares intent for the executable to be installed into the
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,10 @@ const std = @import("std");
 | 
			
		|||
const raylib = @cImport({
 | 
			
		||||
    @cInclude("raylib.h");
 | 
			
		||||
});
 | 
			
		||||
const raygui = @cImport({
 | 
			
		||||
    @cDefine("RAYGUI_IMPLEMENTATION", "1");
 | 
			
		||||
    @cInclude("raygui.h");
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
pub fn main() !void {
 | 
			
		||||
    const screen_width = 800;
 | 
			
		||||
| 
						 | 
				
			
			@ -14,6 +18,7 @@ pub fn main() !void {
 | 
			
		|||
 | 
			
		||||
        raylib.ClearBackground(raylib.RAYWHITE);
 | 
			
		||||
        raylib.DrawText("Congrats! You created your first window!", 190, 200, 20, raylib.LIGHTGRAY);
 | 
			
		||||
        if (raygui.GuiButton(.{ .x = 0, .y = 0, .width = 100, .height = 100 }, "MyButton") == 1) {}
 | 
			
		||||
    }
 | 
			
		||||
    raylib.CloseWindow();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue