Skip to content

Commit 52f962d

Browse files
committed
Fix SelectObjectWindow info panel being able to overflow past the bottom edge of the screen
1 parent 21dd1f3 commit 52f962d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/TSMapEditor/UI/Windows/SelectObjectWindowInfoPanel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ public void Open(string header, string description, Point2D point)
7373

7474
if (!Detached)
7575
Detach();
76+
77+
if (GetWindowPoint().Y + Height > WindowManager.RenderResolutionY)
78+
{
79+
Y = 0; // Set to 0 so it GetWindowPoint().Y gives us our parent's Y coordinate
80+
Y = WindowManager.RenderResolutionY - GetWindowPoint().Y - Height;
81+
}
7682
}
7783

7884
public void Hide()

0 commit comments

Comments
 (0)