diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index d450aef..48add66 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -114,6 +115,17 @@ UIWindow::~UIWindow() { this->m_context->windowMgr.ForgetWindowReferences(this); } +// OFFSET: 0x00A79F80 +// FUNCTION: fn_16918 +bool RunWindowAction(bool primary, bool secondary, int value, int limit, std::function primaryAction, std::function secondaryAction) { + if (!primary && !secondary) { + return false; + } + + (primary && (!secondary || value <= limit) ? primaryAction : secondaryAction)(); + return true; +} + // INLINED UIWindow* UIWindow::Parent() const { return this->parent;