From aa24221acfddc2ddff492585a104efbb2dd59429 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 22 Oct 2023 09:18:42 -0700 Subject: [PATCH] inspector: show imgui demo window only in debug --- src/Inspector.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Inspector.zig b/src/Inspector.zig index 73a4a8280..78d9a6365 100644 --- a/src/Inspector.zig +++ b/src/Inspector.zig @@ -4,6 +4,7 @@ const Inspector = @This(); const std = @import("std"); +const builtin = @import("builtin"); const cimgui = @import("cimgui"); const Surface = @import("Surface.zig"); const terminal = @import("terminal/main.zig"); @@ -83,9 +84,9 @@ pub fn render(self: *Inspector) void { self.renderSizeWindow(); } - // Flip this boolean to true whenever you want to see the ImGui demo - // window which can help you figure out how to use various ImGui widgets. - if (true) { + // In debug we show the ImGui demo window so we can easily view available + // widgets and such. + if (builtin.mode == .Debug) { var show: bool = true; cimgui.c.igShowDemoWindow(&show); }