Cleanup and improve syntax highlighting

* Static class members are now displayed in Italics and in a darker color, making them easier to distinguish.
* Cleaned up some issues related to syntax highlighting and refactored it into a global class.
* Methods and properties no longer display their arguments as part of the member name, they are only displayed when "Evaluate" is pressed.
This commit is contained in:
sinaioutlander
2020-09-16 20:03:57 +10:00
parent 5d58993b07
commit db91968519
8 changed files with 142 additions and 69 deletions

View File

@ -70,6 +70,8 @@ namespace Explorer
public override void DrawValue(Rect window, float width)
{
string typeLabel = $"<color={UIStyles.Syntax.Class_Instance}>{ValueTypeName}</color>";
if (m_evaluated)
{
if (m_cachedReturnValue != null)
@ -78,12 +80,12 @@ namespace Explorer
}
else
{
GUILayout.Label($"null (<color=#2df7b2>{ValueTypeName}</color>)", null);
GUILayout.Label($"null ({typeLabel})", null);
}
}
else
{
GUILayout.Label($"<color=grey><i>Not yet evaluated</i></color> (<color=#2df7b2>{ValueTypeName}</color>)", null);
GUILayout.Label($"<color=grey><i>Not yet evaluated</i></color> ({typeLabel})", null);
}
}
}