mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-12 23:06:56 +08:00
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:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user