diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index 08591b91..5fc0d4ad 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -730,6 +730,17 @@ bool UIWindow::Contains(const UIWindow* window) const { return false; } +// OFFSET: 0x00A7B3F0 +// FUNCTION: fn_16926 +void UIWindow::ResetStates() { + this->geometry.unknown_0030 = 0; + this->Invalidate(); + + for (auto it = this->m_children.begin(); it != this->m_children.end(); ++it) { + (*it)->ResetStates(); + } +} + // OFFSET: 0x00A7B430 // FUNCTION: fn_16927 void UIWindow::ClearSurface(std::uint32_t color) { diff --git a/Source/UI/Window/UIWindow.h b/Source/UI/Window/UIWindow.h index a3af01e0..a1b1e550 100644 --- a/Source/UI/Window/UIWindow.h +++ b/Source/UI/Window/UIWindow.h @@ -124,6 +124,7 @@ public: UIWindow* Root(); UIWindow* NextFocusable(UIWindow* child); UIWindow* PreviousFocusable(UIWindow* child); + void ResetStates(); void ClearSurface(std::uint32_t color); void SetSize(int width, int height); void DrawBitmap(int x, int y, const BitmapImage* image, bool transparent);