From a061347f5aa2ad20f16dfd5c04d27a84cabd14c2 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Fri, 3 Feb 2023 19:22:25 -0600 Subject: [PATCH] Centers the "Set Type" Button context menu for UI Controls in the editor. --- Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs b/Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs index 1977e0e59..93967c444 100644 --- a/Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/UIControlEditor.cs @@ -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)