Decompile 7 functions in Source/UI/Window/FrameFocus.cpp, Source/UI/Window/UIWindowMgr.h
Batch #4641 by eAthena: 3 byte-identical, 4 confirmed by peer review. - fn_17191 UIWindowMgr::IsDropDownChild: logic confirmed by peer review - fn_17194 UIWindowMgr::IsHoverParentVisible: byte-identical - fn_17195 UIWindowMgr::IsFriend: logic confirmed by peer review - fn_17196 UIWindowMgr::IsSharedWindowId: logic confirmed by peer review - fn_17198 UIWindowMgr::HasNavigationBlocker: byte-identical - fn_17203 UIWindowMgr::HasPendingDialog: byte-identical - fn_17204 UIWindowMgr::CancelActiveDialog: logic confirmed by peer review Peer-reviewed-by: youko, Lumen, Qwenkler3.8 Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
76d2558ca7
commit
09fc72c090
2 changed files with 98 additions and 3 deletions
|
|
@ -1,8 +1,8 @@
|
|||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
|
||||
#include "UI/Lists/UIDropDownBox.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "Client/Session.h"
|
||||
// STATIC: 0x014576A0
|
||||
// GLOBAL: gl_24367
|
||||
int g_dragWindowId = -1;
|
||||
|
|
@ -71,3 +71,91 @@ void UIWindowMgr::ReleaseCapture() {
|
|||
UIWindow* UIWindowMgr::Capture() const {
|
||||
return this->inputWindow;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A96A40
|
||||
// FUNCTION: fn_17191
|
||||
bool UIWindowMgr::IsDropDownChild(const UIWindow* window) {
|
||||
if (!this->window_0A30 || !this->window_0A30->geometry.visible) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return static_cast<CUIDropDownBox*>(this->window_0A30)->HasChild(window);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A96E60
|
||||
// FUNCTION: fn_17194
|
||||
bool UIWindowMgr::IsHoverParentVisible() {
|
||||
if (this->hoverWindow) {
|
||||
UIWindow* parent = this->hoverWindow->parent;
|
||||
if (parent && parent != this->window_01C8 && parent->geometry.visible) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A96E90
|
||||
// FUNCTION: fn_17195
|
||||
bool UIWindowMgr::IsFriend(const char* name) {
|
||||
return g_session.IsFriendName(name) != 0;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A96EB0
|
||||
// FUNCTION: fn_17196
|
||||
bool UIWindowMgr::IsSharedWindowId(int id) {
|
||||
switch (id) {
|
||||
case 9:
|
||||
case 13:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 20:
|
||||
case 45:
|
||||
case 112:
|
||||
case 113:
|
||||
case 114:
|
||||
case 115:
|
||||
case 116:
|
||||
case 117:
|
||||
case 118:
|
||||
case 119:
|
||||
case 120:
|
||||
case 121:
|
||||
case 122:
|
||||
case 123:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A97070
|
||||
// FUNCTION: fn_17198
|
||||
bool UIWindowMgr::HasNavigationBlocker() {
|
||||
return this->window_4F260 || this->window_4F264 || this->window_4F268 || this->window_4F26C;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A97410
|
||||
// FUNCTION: fn_17203
|
||||
bool UIWindowMgr::HasPendingDialog() {
|
||||
return this->unknown_0284 || this->unknown_02CC || this->unknown_02D0 || this->unknown_02D4 || this->unknown_02D8 || this->unknown_02DC ||
|
||||
this->unknown_02E0 || this->unknown_02E4 || this->unknown_02E8 || this->unknown_02EC || this->unknown_03B4 || this->unknown_01F0 ||
|
||||
this->unknown_01F4;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A97490
|
||||
// FUNCTION: fn_17204
|
||||
void UIWindowMgr::CancelActiveDialog() {
|
||||
UIWindow* window = this->window_03DC;
|
||||
if (window || (window = this->unknown_03B0) != nullptr) {
|
||||
window->SendMsg(nullptr, 20, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto entry = this->rendered.begin(); entry != this->rendered.end(); ++entry) {
|
||||
if ((*entry)->Slot02()) {
|
||||
(*entry)->SendMsg(nullptr, 20, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue