From 4673c6eea0a7d69779b314be920b29625c88df44 Mon Sep 17 00:00:00 2001 From: QuirkyLemon Date: Fri, 25 Apr 2025 11:04:17 -0500 Subject: [PATCH] draw zeros with a darker color --- UI/ImDebugger/ImMemView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UI/ImDebugger/ImMemView.cpp b/UI/ImDebugger/ImMemView.cpp index 881d81179a..798b17ab53 100644 --- a/UI/ImDebugger/ImMemView.cpp +++ b/UI/ImDebugger/ImMemView.cpp @@ -150,6 +150,8 @@ void ImMemView::Draw(ImDrawList *drawList) { const ImColor secondarySelFg = 0xFFFFFFFF; const ImColor secondarySelBg = 0xFF808080; + const ImColor zeroColor = 0x888888ff; + if (address + j >= selectRangeStart_ && address + j < selectRangeEnd_ && !searching_) { if (asciiSelected_) { hexBGCol = secondarySelBg; @@ -180,6 +182,10 @@ void ImMemView::Draw(ImDrawList *drawList) { int bgWidth = 2; // continueRect ? 3 : 2; drawList->AddRectFilled(ImVec2(canvas_p0.x + hexX - 1, canvas_p0.y + rowY), ImVec2(canvas_p0.x + hexX + charWidth_ * bgWidth, canvas_p0.y + rowY + charHeight_), bg); } + if (temp[0] == '0' && temp[1] == '0') { + // if the byte is all zero make it darker + fg = zeroColor; + } drawList->AddText(ImVec2(canvas_p0.x + hexX, canvas_p0.y + rowY), fg, &temp[0], &temp[2]); if (underline >= 0) { float x = canvas_p0.x + hexX + underline * charWidth_;