Skip to content

Commit 477e71c

Browse files
Add GetFullSize() to IngameWindow
Returns the full size of the window, even when minimized.
1 parent 25dca9a commit 477e71c

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

libs/s25main/ingameWindows/IngameWindow.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ Extent IngameWindow::GetIwSize() const
112112
return Extent(GetSize().x - contentOffset.x - contentOffsetEnd.x, iwHeight);
113113
}
114114

115+
Extent IngameWindow::GetFullSize() const
116+
{
117+
return Extent(GetSize().x, contentOffset.y + contentOffsetEnd.y + iwHeight);
118+
}
119+
115120
DrawPoint IngameWindow::GetRightBottomBoundary()
116121
{
117122
return DrawPoint(GetSize() - contentOffsetEnd);

libs/s25main/ingameWindows/IngameWindow.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class IngameWindow : public Window
6868
void SetIwSize(const Extent& newSize);
6969
/// Get the size of the (expanded) content area
7070
Extent GetIwSize() const;
71+
/// Get the full size of the window, even when minimized
72+
Extent GetFullSize() const;
7173
/// Get the current lower right corner of the content area
7274
DrawPoint GetRightBottomBoundary();
7375

0 commit comments

Comments
 (0)