diff --git a/Source/UI/MiniPartyUsableArea.cpp b/Source/UI/MiniPartyUsableArea.cpp new file mode 100644 index 0000000..82d9552 --- /dev/null +++ b/Source/UI/MiniPartyUsableArea.cpp @@ -0,0 +1,18 @@ +#include "UI/MiniPartyGrid.h" +#include "UI/Window/UIWindow.h" +#include "UI/Window/UIWindowMgr.h" + +// OFFSET: 0x00A918B0 +// FUNCTION: fn_17166 +void UIWindowMgr::GetMiniPartyUsableArea(RECT* area) { + const int height = this->unknown_0480; + int top = static_cast(height * 0.3f); + if (UIWindow* window = g_windowMgr.LookupWindow(307)) { + top = window->geometry.height; + } + + area->right = this->unknown_047C; + area->top = top; + area->left = 0; + area->bottom = height - g_miniPartyCellHeight * 3; +} diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index e73ce1e..57274e6 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -422,6 +422,7 @@ public: void Shutdown(); void SetScreenSize(int width, int height); UIWindow* LookupWindow(int id); + void GetMiniPartyUsableArea(RECT* area); void Schedule(UIWindow* window); void Destroy(UIWindow* window); void ForgetWindowReferences(UIWindow* removed); diff --git a/data/compile.json b/data/compile.json index de54914..d86737a 100644 --- a/data/compile.json +++ b/data/compile.json @@ -600,6 +600,7 @@ "Source/UI/MiniPartyGrid.cpp": 2, "Source/UI/MiniPartyManager.cpp": 2, "Source/UI/MiniPartyPlacement.cpp": 2, + "Source/UI/MiniPartyUsableArea.cpp": 2, "Source/UI/Party/UIAdvenPartyBoardWnd.cpp": 2, "Source/UI/Party/UIApplyForPartyWnd.cpp": 2, "Source/UI/Party/UIPartyInfoWnd.cpp": 2,