Center the context menu that is spawned from clicking the add scripts button on an actor

This commit is contained in:
Chandler Cox
2022-12-22 12:44:34 -06:00
parent 5a50656249
commit d7d7c1e98f

View File

@@ -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));
}
/// <inheritdoc />