fix: add main viewport pos
This commit is contained in:
parent
abfa8eedb8
commit
704e11bb41
|
@ -133,7 +133,7 @@ namespace BetterPartyFinder {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.SetWindowPos(new Vector2(addon.X, addon.Y - ImGui.GetFrameHeight()));
|
ImGui.SetWindowPos(ImGuiHelpers.MainViewport.Pos + new Vector2(addon.X, addon.Y - ImGui.GetFrameHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -141,7 +141,7 @@ namespace BetterPartyFinder {
|
||||||
|
|
||||||
if (addon != null && this.Plugin.Config.WindowSide == WindowSide.Right) {
|
if (addon != null && this.Plugin.Config.WindowSide == WindowSide.Right) {
|
||||||
try {
|
try {
|
||||||
ImGui.SetWindowPos(new Vector2(addon.X + addon.Width, addon.Y));
|
ImGui.SetWindowPos(ImGuiHelpers.MainViewport.Pos + new Vector2(addon.X + addon.Width, addon.Y));
|
||||||
} catch (NullReferenceException) {
|
} catch (NullReferenceException) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
@ -263,7 +263,7 @@ namespace BetterPartyFinder {
|
||||||
_ = addon.Width;
|
_ = addon.Width;
|
||||||
// only continue if width is set, meaning addon is initialised
|
// only continue if width is set, meaning addon is initialised
|
||||||
var currentWidth = ImGui.GetWindowWidth();
|
var currentWidth = ImGui.GetWindowWidth();
|
||||||
ImGui.SetWindowPos(new Vector2(addon.X - currentWidth, addon.Y));
|
ImGui.SetWindowPos(ImGuiHelpers.MainViewport.Pos + new Vector2(addon.X - currentWidth, addon.Y));
|
||||||
} catch (NullReferenceException) {
|
} catch (NullReferenceException) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue