diff --git a/Assets/Scripts/Core/Tools/DebugOverlayDrawer.cs b/Assets/Scripts/Core/Tools/DebugOverlayDrawer.cs index 6891606..5ea38ea 100644 --- a/Assets/Scripts/Core/Tools/DebugOverlayDrawer.cs +++ b/Assets/Scripts/Core/Tools/DebugOverlayDrawer.cs @@ -29,7 +29,8 @@ namespace Reset.Core.Tools{ public string pageNamePrefix = "Debug Page: "; private static float defaultLabelAlpha; - + private static float defaultValueAlpha; + // Private variables [ShowInInspector] public KeyValuePair> currentPage; @@ -55,7 +56,8 @@ namespace Reset.Core.Tools{ Debug.Log(valueTemplate.Instantiate().resolvedStyle.backgroundColor); - defaultLabelAlpha = valueTemplate.Instantiate().style.backgroundColor.value.a; + defaultLabelAlpha = valueTemplate.Instantiate().Query("LabelBackground").First().resolvedStyle.backgroundColor.a; + defaultValueAlpha = valueTemplate.Instantiate().Query("ValueBackground").First().resolvedStyle.backgroundColor.a; } public static DebugOverlayDrawer Instance; @@ -139,8 +141,8 @@ namespace Reset.Core.Tools{ VisualElement labelBG = Instance.values[$"{pageName}/{sourceName}"].parent.parent.Query("LabelBackground").First(); VisualElement valueBG = Instance.values[$"{pageName}/{sourceName}"].parent.parent.Query("ValueBackground").First(); - labelBG.style.backgroundColor = (newColor * .7f).Alpha(labelBG.resolvedStyle.backgroundColor.a); - valueBG.style.backgroundColor = (newColor * .6f).Alpha(valueBG.resolvedStyle.backgroundColor.a); + labelBG.style.backgroundColor = ((newColor / 1.2f + Color.gray * .3f)* .7f).Alpha(defaultLabelAlpha); + valueBG.style.backgroundColor = ((newColor / 1.5f + Color.gray * .4f) * .6f) .Alpha(defaultValueAlpha); } // Back a page