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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user