chore: update to zgui 4f14a690fe8fbfce37a50dcf666e2293a19abbba
This commit is contained in:
parent
ddca95a721
commit
cb1cc16c8f
|
@ -1,6 +1,6 @@
|
||||||
# zgui v1.89.6 - dear imgui bindings
|
# zgui v1.89.6 - dear imgui bindings
|
||||||
|
|
||||||
Easy to use, hand-crafted API with default arguments, named parameters and Zig style text formatting. For a test application please see [here](https://github.com/michal-z/zig-gamedev/tree/main/samples/gui_test_wgpu).
|
Easy to use, hand-crafted API with default arguments, named parameters and Zig style text formatting. [Here](https://github.com/michal-z/zig-gamedev/tree/main/samples/minimal_zgpu_zgui) is a simple sample application, and [here](https://github.com/michal-z/zig-gamedev/tree/main/samples/gui_test_wgpu) is a full one.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Easy to use, hand-crafted API with default arguments, named parameters and Zig s
|
||||||
|
|
||||||
Copy `zgui` folder to a `libs` subdirectory of the root of your project.
|
Copy `zgui` folder to a `libs` subdirectory of the root of your project.
|
||||||
|
|
||||||
To get glfw/wgpu rendering backend working also copy `zgpu`, `zglfw` and `zpool` folders (see [zgpu](https://github.com/michal-z/zig-gamedev/tree/main/libs/zgpu) for the details). Alternatively, you can provide your own rendering backend, see: [backend_glfw_wgpu.zig](src/backend_glfw_wgpu.zig) for an example.
|
To get glfw/wgpu rendering backend working also copy `zgpu`, `zglfw`, `zpool` and `system-sdk` folders (see [zgpu](https://github.com/michal-z/zig-gamedev/tree/main/libs/zgpu) for the details). Alternatively, you can provide your own rendering backend, see: [backend_glfw_wgpu.zig](src/backend_glfw_wgpu.zig) for an example.
|
||||||
|
|
||||||
Then in your `build.zig` add:
|
Then in your `build.zig` add:
|
||||||
```zig
|
```zig
|
||||||
|
|
|
@ -72,7 +72,9 @@ pub fn package(
|
||||||
zgui_c_cpp.addIncludePath(.{ .path = thisDir() ++ "/libs" });
|
zgui_c_cpp.addIncludePath(.{ .path = thisDir() ++ "/libs" });
|
||||||
zgui_c_cpp.addIncludePath(.{ .path = thisDir() ++ "/libs/imgui" });
|
zgui_c_cpp.addIncludePath(.{ .path = thisDir() ++ "/libs/imgui" });
|
||||||
|
|
||||||
|
const abi = (std.zig.system.NativeTargetInfo.detect(target) catch unreachable).target.abi;
|
||||||
zgui_c_cpp.linkLibC();
|
zgui_c_cpp.linkLibC();
|
||||||
|
if (abi != .msvc)
|
||||||
zgui_c_cpp.linkLibCpp();
|
zgui_c_cpp.linkLibCpp();
|
||||||
|
|
||||||
const cflags = &.{"-fno-sanitize=undefined"};
|
const cflags = &.{"-fno-sanitize=undefined"};
|
||||||
|
|
|
@ -2703,7 +2703,7 @@ extern fn zguiSetNextItemOpen(is_open: bool, cond: Condition) void;
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
pub const SelectableFlags = packed struct(u32) {
|
pub const SelectableFlags = packed struct(u32) {
|
||||||
dont_close_popups: bool = false,
|
dont_close_popups: bool = false,
|
||||||
span_all_colums: bool = false,
|
span_all_columns: bool = false,
|
||||||
allow_double_click: bool = false,
|
allow_double_click: bool = false,
|
||||||
disabled: bool = false,
|
disabled: bool = false,
|
||||||
allow_item_overlap: bool = false,
|
allow_item_overlap: bool = false,
|
||||||
|
|
15
src/main.zig
15
src/main.zig
|
@ -1,15 +0,0 @@
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Zig bindings for 'dear imgui' library. Easy to use, hand-crafted API with default arguments,
|
|
||||||
// named parameters and Zig style text formatting.
|
|
||||||
//
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
pub const version = @import("std").SemanticVersion{ .major = 0, .minor = 9, .patch = 6 };
|
|
||||||
|
|
||||||
pub usingnamespace @import("gui.zig");
|
|
||||||
pub const plot = @import("plot.zig");
|
|
||||||
pub const backend = switch (@import("zgui_options").backend) {
|
|
||||||
.glfw_wgpu => @import("backend_glfw_wgpu.zig"),
|
|
||||||
.win32_dx12 => .{}, // TODO:
|
|
||||||
.no_backend => .{},
|
|
||||||
};
|
|
Loading…
Reference in New Issue