Minor cleanup
This commit is contained in:
@@ -308,9 +308,9 @@ namespace FlaxEditor.GUI.Timeline.Tracks
|
|||||||
b.ButtonClicked += OnAddAnimEvent;
|
b.ButtonClicked += OnAddAnimEvent;
|
||||||
}
|
}
|
||||||
if (!addEvent.ContextMenu.Items.Any())
|
if (!addEvent.ContextMenu.Items.Any())
|
||||||
addEvent.ContextMenu.AddButton("No Anim Events Found.").CloseMenuOnClick = false;
|
addEvent.ContextMenu.AddButton("No Anim Events found").CloseMenuOnClick = false;
|
||||||
if (!addContinuousEvent.ContextMenu.Items.Any())
|
if (!addContinuousEvent.ContextMenu.Items.Any())
|
||||||
addContinuousEvent.ContextMenu.AddButton("No Continuous Anim Events Found.").CloseMenuOnClick = false;
|
addContinuousEvent.ContextMenu.AddButton("No Continuous Anim Events found").CloseMenuOnClick = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace FlaxEditor.Windows.Assets
|
|||||||
private readonly Undo _undo;
|
private readonly Undo _undo;
|
||||||
private object _object;
|
private object _object;
|
||||||
private bool _isRegisteredForScriptsReload;
|
private bool _isRegisteredForScriptsReload;
|
||||||
|
private Label _typeText;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the instance of the Json asset object that is being edited.
|
/// Gets the instance of the Json asset object that is being edited.
|
||||||
@@ -137,16 +138,20 @@ namespace FlaxEditor.Windows.Assets
|
|||||||
}
|
}
|
||||||
_presenter.Select(_object);
|
_presenter.Select(_object);
|
||||||
|
|
||||||
var typeText = new Label
|
if (_typeText != null)
|
||||||
|
_typeText.Dispose();
|
||||||
|
var typeText = new ClickableLabel
|
||||||
{
|
{
|
||||||
Text = $"{Asset.DataTypeName}",
|
Text = $"{Asset.DataTypeName}",
|
||||||
TooltipText = "The Asset Type.",
|
TooltipText = "Asset data type (full name)",
|
||||||
AnchorPreset = AnchorPresets.TopRight,
|
AnchorPreset = AnchorPresets.TopRight,
|
||||||
AutoWidth = true,
|
AutoWidth = true,
|
||||||
Parent = this,
|
Parent = this,
|
||||||
};
|
};
|
||||||
typeText.LocalX += -(typeText.Width + 4);
|
typeText.LocalX += -(typeText.Width + 4);
|
||||||
typeText.LocalY += (_toolstrip.Height - typeText.Height) * 0.5f;
|
typeText.LocalY += (_toolstrip.Height - typeText.Height) * 0.5f;
|
||||||
|
typeText.RightClick = () => Clipboard.Text = Asset.DataTypeName;
|
||||||
|
_typeText = typeText;
|
||||||
|
|
||||||
_undo.Clear();
|
_undo.Clear();
|
||||||
ClearEditedFlag();
|
ClearEditedFlag();
|
||||||
@@ -187,6 +192,7 @@ namespace FlaxEditor.Windows.Assets
|
|||||||
_isRegisteredForScriptsReload = false;
|
_isRegisteredForScriptsReload = false;
|
||||||
ScriptsBuilder.ScriptsReloadBegin -= OnScriptsReloadBegin;
|
ScriptsBuilder.ScriptsReloadBegin -= OnScriptsReloadBegin;
|
||||||
}
|
}
|
||||||
|
_typeText = null;
|
||||||
|
|
||||||
base.OnDestroy();
|
base.OnDestroy();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user