Merge branch 'save-collection-groups' of https://github.com/Tryibion/FlaxEngine into Tryibion-save-collection-groups
# Conflicts: # Source/Editor/CustomEditors/Editors/CollectionEditor.cs
This commit is contained in:
@@ -74,11 +74,11 @@ namespace FlaxEditor.CustomEditors
|
||||
{
|
||||
var element = Group(title, useTransparentHeader);
|
||||
element.Panel.Tag = linkedEditor;
|
||||
element.Panel.MouseButtonRightClicked += OnGroupPanelMouseButtonRightClicked;
|
||||
element.Panel.MouseButtonRightClicked += (panel, location) => OnGroupPanelMouseButtonRightClicked(element, panel, location);
|
||||
return element;
|
||||
}
|
||||
|
||||
private void OnGroupPanelMouseButtonRightClicked(DropPanel groupPanel, Float2 location)
|
||||
private void OnGroupPanelMouseButtonRightClicked(GroupElement element, DropPanel groupPanel, Float2 location)
|
||||
{
|
||||
var linkedEditor = (CustomEditor)groupPanel.Tag;
|
||||
var menu = new ContextMenu();
|
||||
@@ -91,6 +91,7 @@ namespace FlaxEditor.CustomEditors
|
||||
menu.AddButton("Copy", linkedEditor.Copy);
|
||||
var paste = menu.AddButton("Paste", linkedEditor.Paste);
|
||||
paste.Enabled = linkedEditor.CanPaste;
|
||||
element.SetupContextMenu?.Invoke(menu, groupPanel);
|
||||
|
||||
menu.Show(groupPanel, location);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user