fix: no docking

This commit is contained in:
Anna 2021-04-17 17:39:31 -04:00
parent 9592f92a1b
commit 1ca1519cc7
1 changed files with 6 additions and 1 deletions

View File

@ -124,7 +124,11 @@ namespace BetterPartyFinder {
var showWindow = this.Visible || addon?.Visible == true;
if (!showWindow || !ImGui.Begin(this.Plugin.Name, ref this._visible)) {
if (!showWindow) {
return;
}
if (!ImGui.Begin(this.Plugin.Name, ref this._visible, ImGuiWindowFlags.NoDocking)) {
if (ImGui.IsWindowCollapsed() && addon is {Visible: true}) {
// wait until addon is initialised to show
try {
@ -136,6 +140,7 @@ namespace BetterPartyFinder {
ImGui.SetWindowPos(ImGuiHelpers.MainViewport.Pos + new Vector2(addon.X, addon.Y - ImGui.GetFrameHeight()));
}
ImGui.End();
return;
}