add raylib.zig as wrapper
This commit is contained in:
		
							parent
							
								
									3216292d08
								
							
						
					
					
						commit
						c51423874b
					
				
					 2 changed files with 7 additions and 8 deletions
				
			
		
							
								
								
									
										10
									
								
								src/main.zig
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/main.zig
									
										
									
									
									
								
							| 
						 | 
					@ -1,11 +1,5 @@
 | 
				
			||||||
const std = @import("std");
 | 
					const std = @import("std");
 | 
				
			||||||
const raylib = @cImport({
 | 
					const raylib = @import("raylib.zig");
 | 
				
			||||||
    @cInclude("raylib.h");
 | 
					 | 
				
			||||||
});
 | 
					 | 
				
			||||||
const raygui = @cImport({
 | 
					 | 
				
			||||||
    @cDefine("RAYGUI_IMPLEMENTATION", "1");
 | 
					 | 
				
			||||||
    @cInclude("raygui.h");
 | 
					 | 
				
			||||||
});
 | 
					 | 
				
			||||||
const sqlite = @cImport({
 | 
					const sqlite = @cImport({
 | 
				
			||||||
    @cInclude("sqlite3.h");
 | 
					    @cInclude("sqlite3.h");
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					@ -21,7 +15,7 @@ pub fn main() !void {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        raylib.ClearBackground(raylib.RAYWHITE);
 | 
					        raylib.ClearBackground(raylib.RAYWHITE);
 | 
				
			||||||
        raylib.DrawText("Congrats! You created your first window!", 190, 200, 20, raylib.LIGHTGRAY);
 | 
					        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) {}
 | 
					        if (raylib.GuiButton(.{ .x = 0, .y = 0, .width = 100, .height = 100 }, "MyButton") == 1) {}
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    raylib.CloseWindow();
 | 
					    raylib.CloseWindow();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										5
									
								
								src/raylib.zig
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								src/raylib.zig
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					pub usingnamespace @cImport({
 | 
				
			||||||
 | 
					    @cInclude("raylib.h");
 | 
				
			||||||
 | 
					    @cDefine("RAYGUI_IMPLEMENTATION", "1");
 | 
				
			||||||
 | 
					    @cInclude("raygui.h");
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue