Merge remote-tracking branch 'origin/master' into 1.6

# Conflicts:
#	Source/Editor/CustomEditors/CustomEditorsUtil.cs
#	Source/Engine/Networking/NetworkReplicator.cpp
#	Source/Engine/Scripting/ManagedCLR/MUtils.cpp
#	Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs
This commit is contained in:
Wojtek Figat
2023-05-24 23:28:38 +02:00
32 changed files with 1278 additions and 212 deletions

View File

@@ -110,6 +110,25 @@ namespace FlaxEditor.GUI.ContextMenu
_isSubMenu = true;
}
/// <summary>
/// Shows the empty menu popup o na screen.
/// </summary>
/// <param name="control">The target control.</param>
/// <param name="area">The target control area to cover.</param>
/// <returns>Created popup.</returns>
public static ContextMenuBase ShowEmptyMenu(Control control, Rectangle area)
{
// Calculate the control size in the window space to handle scaled controls
var upperLeft = control.PointToWindow(area.UpperLeft);
var bottomRight = control.PointToWindow(area.BottomRight);
var size = bottomRight - upperLeft;
var popup = new ContextMenuBase();
popup.Size = size;
popup.Show(control, area.Location + new Float2(0, (size.Y - popup.Height) * 0.5f));
return popup;
}
/// <summary>
/// Show context menu over given control.
/// </summary>