Added obsolete text to tooltip (only works, if another property attribute is present)
This commit is contained in:
parent
492b882a51
commit
e4eb4dab47
|
|
@ -24,7 +24,6 @@ namespace Module.Inspector.Editor
|
||||||
|
|
||||||
bool prevEnabled = GUI.enabled;
|
bool prevEnabled = GUI.enabled;
|
||||||
GUI.enabled = accessType == EAccessType.Enabled;
|
GUI.enabled = accessType == EAccessType.Enabled;
|
||||||
// TODO: What to do with [Obsolete]?
|
|
||||||
|
|
||||||
if (result.draw != null)
|
if (result.draw != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -126,12 +126,22 @@ namespace Module.Inspector.Editor.Utilities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(obsoleteText))
|
if (isObsolete)
|
||||||
{
|
{
|
||||||
if (tooltip != null)
|
if (string.IsNullOrEmpty(obsoleteText))
|
||||||
tooltip += $"\n[Obsolete: {obsoleteText}";
|
{
|
||||||
|
if (tooltip != null)
|
||||||
|
tooltip += $"\n[Obsolete]";
|
||||||
|
else
|
||||||
|
tooltip = $"[Obsolete]";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
tooltip = $"Obsolete: {obsoleteText}";
|
{
|
||||||
|
if (tooltip != null)
|
||||||
|
tooltip += $"\n[Obsolete: {obsoleteText}]";
|
||||||
|
else
|
||||||
|
tooltip = $"[Obsolete: {obsoleteText}]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Result(drawer, predrawerModifiers, valueModifiers, accessModifiers, tooltip, isObsolete);
|
return new Result(drawer, predrawerModifiers, valueModifiers, accessModifiers, tooltip, isObsolete);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue