From 9f60890a20cee894d6963f6f1b73d82f5e7cc70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Wed, 14 Sep 2022 08:34:31 +0000 Subject: [PATCH] improve debug ui --- code/game/src/debug_ui.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/src/debug_ui.c b/code/game/src/debug_ui.c index 178d503..6fbd2a8 100644 --- a/code/game/src/debug_ui.c +++ b/code/game/src/debug_ui.c @@ -37,7 +37,7 @@ typedef struct { #define DBG_GAP_HEIGHT DBG_FONT_SPACING * 0.5f static uint8_t is_shadow_rendered; -static uint8_t is_debug_open = 0; +static uint8_t is_debug_open = 1; static uint8_t is_handle_ctrl_held; static float debug_xpos = DBG_START_XPOS; static float debug_ypos = DBG_START_YPOS; @@ -92,6 +92,7 @@ static debug_item items[] = { .kind = DITEM_LIST, .name = "general", .list = { + .is_collapsed = true, .items = (debug_item[]) { { .kind = DITEM_TEXT, .name = "delta time", .proc = DrawDeltaTime }, { .kind = DITEM_TEXT, .name = "pos", .proc = DrawCameraPos }, @@ -104,6 +105,7 @@ static debug_item items[] = { .kind = DITEM_LIST, .name = "world simulation", .list = { + .is_collapsed = true, .items = (debug_item[]) { { .kind = DITEM_COND, .on_success = CondIsWorldRunning }, { .kind = DITEM_BUTTON, .name = "pause", .on_click = ActWorldToggleSim }, @@ -127,6 +129,7 @@ static debug_item items[] = { .kind = DITEM_LIST, .name = "debug actions", .list = { + .is_collapsed = true, .items = (debug_item[]) { { .kind = DITEM_BUTTON, .name = "spawn car", .on_click = ActSpawnCar }, { .kind = DITEM_BUTTON, .name = "place ice rink", .on_click = ActPlaceIceRink }, @@ -157,6 +160,7 @@ static debug_item items[] = { .kind = DITEM_LIST, .name = "conn metrics", .list = { + .is_collapsed = true, .items = (debug_item[]) { { .kind = DITEM_COND, .on_success = CondClientDisconnected }, { .kind = DITEM_TEXT, .name = "status", .proc = DrawLiteral, .text = "disconnected" },