diff --git a/Source/UI/Window/InputFocus.cpp b/Source/UI/Window/InputFocus.cpp index 18a4122..790a007 100644 --- a/Source/UI/Window/InputFocus.cpp +++ b/Source/UI/Window/InputFocus.cpp @@ -47,6 +47,28 @@ void InputFocus::First() { this->window = nullptr; } +// OFFSET: 0x00AA9C70 +// FUNCTION: fn_17258 +void InputFocus::Last() { + if (this->window) { + UIWindow* parent = this->window->parent; + + for (auto it = parent->m_children.rbegin(); it != parent->m_children.rend(); ++it) { + UIWindow* child = *it; + if (child->Slot05()) { + this->Set(child); + return; + } + } + + if (this->window) { + this->window->Slot24(0); + } + } + + this->window = nullptr; +} + // OFFSET: 0x00AA9D20 // FUNCTION: fn_17259 void InputFocus::Next() { diff --git a/Source/UI/Window/InputFocus.h b/Source/UI/Window/InputFocus.h index a8fcc87..d22dab6 100644 --- a/Source/UI/Window/InputFocus.h +++ b/Source/UI/Window/InputFocus.h @@ -7,6 +7,7 @@ struct InputFocus { UIWindow*& window; void Set(UIWindow* value); void First(); + void Last(); void Next(); void Advance();