Use the Member color for the member filter toggles, move InspectorManager

This commit is contained in:
Sinai 2021-05-10 23:09:21 +10:00
parent cef4c2f3fb
commit 18d2518231
4 changed files with 5 additions and 4 deletions

View File

@ -90,7 +90,7 @@ namespace UnityExplorer
}
/// <summary>
/// Assumes the string is a 6-digit RGB Hex color code, which it will parse into a UnityEngine.Color.
/// Assumes the string is a 6-digit RGB Hex color code (with optional leading #) which it will parse into a UnityEngine.Color.
/// Eg, FF0000 -> RGBA(1,0,0,1)
/// </summary>
public static Color ToColor(this string _string)

View File

@ -426,9 +426,10 @@ namespace UnityExplorer.UI.Inspectors
{
var toggleObj = UIFactory.CreateToggle(parent, "Toggle_" + type, out Toggle toggle, out Text toggleText);
UIFactory.SetLayoutElement(toggleObj, minHeight: 25, minWidth: width);
toggleText.text = $"<color={SignatureHighlighter.GetMemberInfoColor(type)}>{type}</color>";
var color = SignatureHighlighter.GetMemberInfoColor(type);
toggleText.text = $"<color={color}>{type}</color>";
toggle.graphic.TryCast<Image>().color = new Color(0.25f, 0.25f, 0.25f);
toggle.graphic.TryCast<Image>().color = color.ToColor() * 0.65f;
MemberFlags flag;
switch (type)

View File

@ -250,7 +250,7 @@
<Compile Include="UI\CacheObject\Views\EvaluateWidget.cs" />
<Compile Include="UI\Inspectors\GameObjectInspector.cs" />
<Compile Include="UI\CacheObject\ICacheObjectController.cs" />
<Compile Include="Core\InspectorManager.cs" />
<Compile Include="UI\Inspectors\InspectorManager.cs" />
<Compile Include="UI\Inspectors\InspectorTab.cs" />
<Compile Include="UI\Inspectors\InspectorBase.cs" />
<Compile Include="UI\IValues\InteractiveColor.cs" />