Adjust custom content item context menu options to be more visible on top
This commit is contained in:
@@ -90,8 +90,12 @@ namespace FlaxEditor.Windows
|
||||
});
|
||||
}
|
||||
|
||||
// Custom options
|
||||
ContextMenuShow?.Invoke(cm, item);
|
||||
proxy?.OnContentWindowContextMenu(cm, item);
|
||||
item.OnContextMenu(cm);
|
||||
|
||||
cm.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(item.Path)));
|
||||
|
||||
if (!_showAllContentInTree && !String.IsNullOrEmpty(Editor.Instance.Windows.ContentWin._itemsSearchBox.Text))
|
||||
{
|
||||
cm.AddButton("Show in Content Panel", () =>
|
||||
@@ -180,13 +184,7 @@ namespace FlaxEditor.Windows
|
||||
cm.AddButton("Rename", () => Rename(item));
|
||||
}
|
||||
|
||||
// Custom options
|
||||
ContextMenuShow?.Invoke(cm, item);
|
||||
proxy?.OnContentWindowContextMenu(cm, item);
|
||||
item.OnContextMenu(cm);
|
||||
|
||||
cm.AddButton("Copy name to Clipboard", () => Clipboard.Text = item.NamePath);
|
||||
|
||||
cm.AddButton("Copy path to Clipboard", () => Clipboard.Text = item.Path);
|
||||
}
|
||||
else
|
||||
@@ -197,7 +195,6 @@ namespace FlaxEditor.Windows
|
||||
b.Enabled = _view.CanPaste();
|
||||
|
||||
cm.AddButton("Refresh", () => Editor.ContentDatabase.RefreshFolder(CurrentViewFolder, true));
|
||||
|
||||
cm.AddButton("Refresh all thumbnails", RefreshViewItemsThumbnails);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +190,8 @@ namespace FlaxEditor.Windows.Search
|
||||
ContextMenuButton b;
|
||||
var cm = new ContextMenu { Tag = contentItem };
|
||||
b = cm.AddButton("Open", () => Editor.Instance.ContentFinding.Open(Item));
|
||||
proxy?.OnContentWindowContextMenu(cm, contentItem);
|
||||
contentItem.OnContextMenu(cm);
|
||||
cm.AddSeparator();
|
||||
cm.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(contentItem.Path)));
|
||||
cm.AddButton("Show in Content window", () => Editor.Instance.Windows.ContentWin.Select(contentItem, true));
|
||||
@@ -213,8 +215,6 @@ namespace FlaxEditor.Windows.Search
|
||||
cm.AddButton("Copy path to Clipboard", () => Clipboard.Text = assetItem.Path);
|
||||
cm.AddSeparator();
|
||||
}
|
||||
proxy?.OnContentWindowContextMenu(cm, contentItem);
|
||||
contentItem.OnContextMenu(cm);
|
||||
cm.Show(this, location);
|
||||
_cm = cm;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user