Centers the "Set Type" Button context menu for UI Controls in the editor.

This commit is contained in:
Chandler Cox
2023-02-03 19:22:25 -06:00
parent d8a9b699ad
commit a061347f5a

View File

@@ -645,7 +645,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
}
cm.ItemClicked += controlType => SetType((ScriptType)controlType.Tag);
cm.SortItems();
cm.Show(button.Parent, button.BottomLeft);
cm.Show(button.Parent, button.BottomLeft - new Float2((cm.Width - button.Width) / 2, 0));
}
private void SetType(ref ScriptType controlType, UIControl uiControl)