diff --git a/Source/UI/Window/UIControl.cpp b/Source/UI/Window/UIControl.cpp index 0ac1a067..c6e6d69c 100644 --- a/Source/UI/Window/UIControl.cpp +++ b/Source/UI/Window/UIControl.cpp @@ -1227,3 +1227,15 @@ void CUITextViewer::SetScrollStep(int value) { void CUITextViewer::SetScrollBarSize(int width, int height) { this->scrollBar->SetSize(width, height); } + +// OFFSET: 0x009F0EA0 +// FUNCTION: fn_14682 +UIWindow* CUIControl::FindChildById(int id) { + for (UIWindow* child : this->m_children) { + if (child->geometry.id == id) { + return child; + } + } + + return nullptr; +} diff --git a/Source/UI/Window/UIControl.h b/Source/UI/Window/UIControl.h index a8c0e117..6742145f 100644 --- a/Source/UI/Window/UIControl.h +++ b/Source/UI/Window/UIControl.h @@ -76,6 +76,7 @@ public: virtual void Slot53(int value); bool IsPointInside(int x, int y); + UIWindow* FindChildById(int id); /* 007C */ unsigned char hitEnabled; };