Skip to content

Commit

Permalink
zgui: remove a redundant installArtifact call, which was causing `art…
Browse files Browse the repository at this point in the history
…ifact("imgui")` calls to fail with a ambiguous artifact error (#606)
  • Loading branch information
kcbanner committed May 24, 2024
1 parent f550718 commit af76366
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion libs/zgui/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});

b.installArtifact(lib);
if (target.result.os.tag == .windows) {
lib.defineCMacro("IMGUI_API", "__declspec(dllexport)");
lib.defineCMacro("IMPLOT_API", "__declspec(dllexport)");
Expand Down
7 changes: 6 additions & 1 deletion libs/zgui/src/gui.zig
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,12 @@ pub fn setNextWindowBgAlpha(args: SetNextWindowBgAlpha) void {
zguiSetNextWindowBgAlpha(args.alpha);
}
extern fn zguiSetNextWindowBgAlpha(alpha: f32) void;

//--------------------------------------------------------------------------------------------------
pub fn setWindowFocus(name: ?[:0]const u8) void {
zguiSetWindowFocus(name orelse null);
}
extern fn zguiSetWindowFocus(name: ?[*:0]const u8) void;
//-------------------------------------------------------------------------------------------------
pub fn setKeyboardFocusHere(offset: i32) void {
zguiSetKeyboardFocusHere(offset);
}
Expand Down
6 changes: 5 additions & 1 deletion libs/zgui/src/zgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ ZGUI_API void zguiSetNextWindowBgAlpha(float alpha) {
ImGui::SetNextWindowBgAlpha(alpha);
}

ZGUI_API void zguiSetWindowFocus(const char* name) {
ImGui::SetWindowFocus(name);
}

ZGUI_API void zguiSetKeyboardFocusHere(int offset) {
ImGui::SetKeyboardFocusHere(offset);
}
Expand Down Expand Up @@ -2701,4 +2705,4 @@ extern "C"
}

} /* extern "C" */
#endif
#endif

0 comments on commit af76366

Please sign in to comment.