inspector: show imgui demo window only in debug

This commit is contained in:
Mitchell Hashimoto
2023-10-22 09:18:42 -07:00
parent 880d7869a9
commit aa24221acf

View File

@ -4,6 +4,7 @@
const Inspector = @This(); const Inspector = @This();
const std = @import("std"); const std = @import("std");
const builtin = @import("builtin");
const cimgui = @import("cimgui"); const cimgui = @import("cimgui");
const Surface = @import("Surface.zig"); const Surface = @import("Surface.zig");
const terminal = @import("terminal/main.zig"); const terminal = @import("terminal/main.zig");
@ -83,9 +84,9 @@ pub fn render(self: *Inspector) void {
self.renderSizeWindow(); self.renderSizeWindow();
} }
// Flip this boolean to true whenever you want to see the ImGui demo // In debug we show the ImGui demo window so we can easily view available
// window which can help you figure out how to use various ImGui widgets. // widgets and such.
if (true) { if (builtin.mode == .Debug) {
var show: bool = true; var show: bool = true;
cimgui.c.igShowDemoWindow(&show); cimgui.c.igShowDemoWindow(&show);
} }