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