You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dalamud's drawable elements don't take ImGui.GetMainViewport().WorkPos into account, resulting in the elements staying in the same place on screen while the game's window is being dragged around.
See these two images: The first is the initial position of the unit frame. The second image shows the position of the unit frame after I have dragged the game's window slightly to the right.
Simply adding the Vector2 returned by ImGui.GetMainViewport().WorkPos to the rendering coordinates of the ImGui draw commands fixes this.
What is the expected behavior?
The elements should stay in-place relative to the window position, rather than the screen.
What actually happened?
All delvui elements are stuck in "monitor screen space", rather than the game's own window.
Suggested solution
Use ImGui.GetMainViewport().WorkPos's result as a coordinate offset to anything that you draw with ImGui.
If you want to have all elements forced on the game window so that they can't break out if multi-monitor support is enabled, use ImGui.SetNextWindowViewport(ImGui.GetMainViewport().ID) for windows.
Logs
No response
FFXIV Update
I have confirmed that I have the latest version of XIVLauncher and DelvUI.
The text was updated successfully, but these errors were encountered:
What are you trying to do?
Dalamud's drawable elements don't take
ImGui.GetMainViewport().WorkPos
into account, resulting in the elements staying in the same place on screen while the game's window is being dragged around.See these two images: The first is the initial position of the unit frame. The second image shows the position of the unit frame after I have dragged the game's window slightly to the right.
Simply adding the Vector2 returned by
ImGui.GetMainViewport().WorkPos
to the rendering coordinates of the ImGui draw commands fixes this.What is the expected behavior?
The elements should stay in-place relative to the window position, rather than the screen.
What actually happened?
All delvui elements are stuck in "monitor screen space", rather than the game's own window.
Suggested solution
Use
ImGui.GetMainViewport().WorkPos
's result as a coordinate offset to anything that you draw with ImGui.If you want to have all elements forced on the game window so that they can't break out if multi-monitor support is enabled, use
ImGui.SetNextWindowViewport(ImGui.GetMainViewport().ID)
for windows.Logs
No response
FFXIV Update
The text was updated successfully, but these errors were encountered: