Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Editor/Editors/TriEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ public abstract class TriEditor : Editor
{
private TriEditorCore _core;

private void OnEnable()
protected virtual void OnEnable()
{
_core = new TriEditorCore(this);
}

private void OnDisable()
protected virtual void OnDisable()
{
_core.Dispose();
}
Expand Down
9 changes: 7 additions & 2 deletions Editor/Elements/TriLabelElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ public class TriLabelElement : TriElement
{
private readonly GUIContent _label;

public TriLabelElement(string label)
public TriLabelElement(string label, string tooltip = "")
{
_label = new GUIContent(label);
_label = new GUIContent(label, tooltip);
}

public TriLabelElement(GUIContent label)
{
_label = label;
}

public override float GetHeight(float width)
Expand Down
4 changes: 4 additions & 0 deletions Editor/TriPropertyDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ internal TriPropertyDefinition(
{
CustomTooltip = ValueResolver.ResolveString(this, tooltipAttribute.Tooltip);
}
else if (Attributes.TryGet(out TooltipAttribute unityTooltipAttribute))
{
CustomTooltip = new ConstantValueResolver<string>(unityTooltipAttribute.tooltip);
}
}

public Type OwnerType { get; }
Expand Down