From 75b2ba9f5118f37e90e0076ff6882f197d889e74 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Thu, 18 Dec 2025 15:49:13 +1000 Subject: [PATCH] variable value colour --- ...readsVariablesSubTab.DebuggerVariableCustomDraw.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/SharpIDE.Godot/Features/Debug_/Tab/SubTabs/ThreadsVariablesSubTab.DebuggerVariableCustomDraw.cs b/src/SharpIDE.Godot/Features/Debug_/Tab/SubTabs/ThreadsVariablesSubTab.DebuggerVariableCustomDraw.cs index fbc5ddc..01004d8 100644 --- a/src/SharpIDE.Godot/Features/Debug_/Tab/SubTabs/ThreadsVariablesSubTab.DebuggerVariableCustomDraw.cs +++ b/src/SharpIDE.Godot/Features/Debug_/Tab/SubTabs/ThreadsVariablesSubTab.DebuggerVariableCustomDraw.cs @@ -29,6 +29,15 @@ public partial class ThreadsVariablesSubTab else icon = _fieldIcon; } + var variableValueDisplayColour = variable switch + { + { Value: "null" } => CachedColors.KeywordBlue, + { Value: "true" or "false" } => CachedColors.KeywordBlue, + { Type: "string" or "char" } => CachedColors.LightOrangeBrown, + { Type: "byte" or "sbyte" or "short" or "ushort" or "int" or "uint" or "long" or "ulong" or "nint" or "nuint" or "float" or "double" or "decimal" } => CachedColors.NumberGreen, + _ => VariableWhiteColor + }; + var font = _variablesTree.GetThemeFont(ThemeStringNames.Font); var fontSize = _variablesTree.GetThemeFontSize(ThemeStringNames.FontSize); const float padding = 4.0f; @@ -56,6 +65,6 @@ public partial class ThreadsVariablesSubTab currentX += variableTypeDrawnSize + padding; } var variableValueDisplayString = isObjectType ? variable.Type : variable.Value; - _variablesTree.DrawString(font, new Vector2(currentX, textYPos), variableValueDisplayString, HorizontalAlignment.Left, -1, fontSize, VariableWhiteColor); + _variablesTree.DrawString(font, new Vector2(currentX, textYPos), variableValueDisplayString, HorizontalAlignment.Left, -1, fontSize, variableValueDisplayColour); } } \ No newline at end of file