From d7d7c1e98f26eff2d19952cb633c2d62a8047ac5 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 22 Dec 2022 12:44:34 -0600 Subject: [PATCH] Center the context menu that is spawned from clicking the add scripts button on an actor --- Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs index 47147381e..68dca9883 100644 --- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs @@ -72,7 +72,7 @@ namespace FlaxEditor.CustomEditors.Dedicated } cm.ItemClicked += item => AddScript((ScriptType)item.Tag); cm.SortItems(); - cm.Show(this, button.BottomLeft); + cm.Show(this, button.BottomLeft - new Float2((cm.Width - button.Width) / 2, 0)); } ///