Batch #1102 by ragnarok-clanker: 2 byte-identical, 0 confirmed by peer review. - fn_16953 UIWindow::Root: byte-identical - fn_16983 UIWindow::Invalidate: byte-identical (already on main) Merged automatically: every function is byte-identical to the original.
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#include "UI/Window/UIWindow.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
|
|
// OFFSET: 0x00A81C90
|
|
// FUNCTION: fn_16985
|
|
bool UIWindow::IsDescendantOf(const UIWindow* ancestor) const {
|
|
for (const UIWindow* node = this->parent; node; node = node->parent) {
|
|
if (node == ancestor) {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
// OFFSET: 0x00A8C200
|
|
// FUNCTION: fn_17130
|
|
void UIWindowMgr::ForgetWindowReferences(UIWindow* removed) {
|
|
if (this->inputWindow && (this->inputWindow == removed || this->inputWindow->IsDescendantOf(removed))) {
|
|
this->inputWindow = nullptr;
|
|
}
|
|
|
|
if (this->hoverWindow && (this->hoverWindow == removed || this->hoverWindow->IsDescendantOf(removed))) {
|
|
this->hoverWindow = nullptr;
|
|
}
|
|
|
|
if (this->window_01B8 && (this->window_01B8 == removed || this->window_01B8->IsDescendantOf(removed))) {
|
|
this->window_01B8 = nullptr;
|
|
}
|
|
|
|
if (this->window_0A30 && this->window_0A30 == removed) {
|
|
this->window_0A30 = nullptr;
|
|
}
|
|
|
|
if (this->window_4F1D4 && (this->window_4F1D4 == removed || this->window_4F1D4->IsDescendantOf(removed))) {
|
|
this->window_4F1D4 = nullptr;
|
|
}
|
|
}
|