wip imgui
This commit is contained in:
parent
683756900c
commit
17e0f0cb50
|
@ -38,9 +38,10 @@ export fn frame() void {
|
|||
});
|
||||
|
||||
//=== UI CODE STARTS HERE
|
||||
ig.igSetNextWindowPos(.{ .x = 10, .y = 10 }, ig.ImGuiCond_Once, .{ .x = 0, .y = 0 });
|
||||
ig.igSetNextWindowSize(.{ .x = 400, .y = 100 }, ig.ImGuiCond_Once);
|
||||
_ = ig.igBegin("Hello Dear ImGui!", 0, ig.ImGuiWindowFlags_None);
|
||||
const io = ig.igGetIO();
|
||||
ig.igSetNextWindowPos(.{ .x = 0, .y = 0 }, ig.ImGuiCond_Always, .{ .x = 0, .y = 0 });
|
||||
ig.igSetNextWindowSize(io.*.DisplaySize, ig.ImGuiCond_Always);
|
||||
_ = ig.igBegin("Hello Dear ImGui!", 0, ig.ImGuiWindowFlags_NoMove | ig.ImGuiWindowFlags_NoResize | ig.ImGuiWindowFlags_NoTitleBar | ig.ImGuiWindowFlags_NoCollapse);
|
||||
_ = ig.igColorEdit3("Background", &state.pass_action.colors[0].clear_value.r, ig.ImGuiColorEditFlags_None);
|
||||
ig.igEnd();
|
||||
//=== UI CODE ENDS HERE
|
||||
|
@ -68,7 +69,7 @@ pub fn main() void {
|
|||
.frame_cb = frame,
|
||||
.cleanup_cb = cleanup,
|
||||
.event_cb = event,
|
||||
.window_title = "sokol-zig + Dear Imgui",
|
||||
.window_title = "Doggo",
|
||||
.width = 800,
|
||||
.height = 600,
|
||||
.icon = .{ .sokol_default = true },
|
||||
|
|
Loading…
Reference in a new issue