rodecomp/Source/UI/Window/WindowAncestry.cpp
ragnarok-clanker c932ad6499 Maintenance: Resubmission of 15134 without the 12 struct/type renames (their new names changed mangled symbols in 17 functions). Rena
Batch #15141 by ragnarok-clanker: no function's compiled code changes; checked with 537 compiled unit(s), including every includer of Source/Client/Input/LanguageTC.h, Source/Client/Mode/CGameMode.h, Source/Client/Mode/CLoginMode.h, Source/Client/Replay.h, Source/Client/Session.h, Source/Contents/AchievementMgr.h, Source/Contents/Actors/CharacterRender.h, Source/Contents/Actors/EffectActors.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/Pc.h, Source/Contents/EnchantMgr.h, Source/Contents/GuildInfo.h, Source/Contents/Messenger/MessengerWindows.h, Source/Contents/Schedule/TimeScheduler.h, Source/Contents/Sound/SoundMgr.h, Source/Contents/SpriteLayerDrawing.h, Source/Contents/TableMng.h, Source/Contents/World/SkyBox.h, Source/UI/Chat/UINewChatWnd.h, Source/UI/Text/CreateLineInfo.h, Source/UI/UIGradeEnchantWnd.h, Source/UI/Window/UINewSelectCharWnd.h, Source/UI/Window/UINewSkillListWnd.h, Source/UI/Window/UIPetInfoWnd.h, Source/UI/Window/UIReplayRECControlWnd.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl.
2026-11-09 12:21:09 +00:00

126 lines
3.6 KiB
C++

#include "UI/Window/UIEnums.h"
#include "Client/Replay.h"
#include "Client/ReplayRecordOption.h"
#include "UI/Window/UIWindow.h"
#include "UI/Window/UIWindowMgr.h"
// OFFSET: 0x00A81C90
// FUNCTION: fn_16985
__declspec(noinline) 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
__forceinline 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->previousMouseWnd && (this->previousMouseWnd == removed || this->previousMouseWnd->IsDescendantOf(removed))) {
this->previousMouseWnd = nullptr;
}
if (this->dropDownBoxWnd && this->dropDownBoxWnd == removed) {
this->dropDownBoxWnd = nullptr;
}
if (this->keyboardCommandRootWnd && (this->keyboardCommandRootWnd == removed || this->keyboardCommandRootWnd->IsDescendantOf(removed))) {
this->keyboardCommandRootWnd = nullptr;
}
}
// OFFSET: 0x00AA5E90
// FUNCTION: fn_17226
void UIWindowMgr::DeferDeletion(UIWindow* window) {
if (!window) {
return;
}
this->ForgetWindowReferences(window);
this->deferredDeletion.insert(window);
window->Show(0);
}
// OFFSET: 0x00AA8F30
// FUNCTION: fn_17250
void UIWindowMgr::ClearPreviousMouseWnd() {
this->previousMouseWnd = nullptr;
}
// OFFSET: 0x00AA8110
// FUNCTION: fn_17241
void UIWindowMgr::CloseWindowExcept251(int id) {
if (id != 251) {
this->CloseWindow(id);
}
}
// OFFSET: 0x00AA8A90
// FUNCTION: fn_17246
void UIWindowMgr::RecordWindowPacket(int argument) {
if (Replay::Instance().state == 2 &&
Replay::Instance().header.options.Get(ReplayRecordOption::Item) &&
Replay::Instance().header.options.Get(ReplayRecordOption::BasicInfo) &&
Replay::Instance().header.options.Get(ReplayRecordOption::Status)) {
#pragma pack(push, 1)
struct {
std::uint32_t header;
std::uint16_t length;
std::uint32_t value;
} packet;
#pragma pack(pop)
static_assert(sizeof(packet) == 10);
packet.header = 0x038D08AE;
packet.length = 10;
packet.value = static_cast<std::uint32_t>(argument);
Replay::Instance().Record(10, &packet, 42, 0);
}
}
// OFFSET: 0x00AA8F40
// FUNCTION: fn_17251
void UIWindowMgr::Nullsub370() {
}
// OFFSET: 0x00A7AA30
// FUNCTION: fn_16924
void UIWindow::PropagateMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
if (this != sender && !this->SendMsg(sender, message, argument1, argument2, argument3, argument4)) {
for (UIWindow* child : this->m_children) {
child->PropagateMsg(sender, message, argument1, argument2, argument3, argument4);
}
}
}
// OFFSET: 0x00A81D70
// FUNCTION: fn_16989
void UIWindow::BroadcastMsg4() {
this->SendMsg(nullptr, UM_PAGEDOWNPUSH, 0, 0, 0, 0);
for (std::list<UIWindow*>::iterator it = this->m_children.begin(); it != this->m_children.end(); ++it) {
if (*it) {
(*it)->SendMsg(nullptr, UM_PAGEDOWNPUSH, 0, 0, 0, 0);
}
}
}
// OFFSET: 0x00A81DC0
// FUNCTION: fn_16990
void UIWindow::BroadcastMsg3() {
this->SendMsg(nullptr, UM_PAGEUPPUSH, 0, 0, 0, 0);
for (std::list<UIWindow*>::iterator it = this->m_children.begin(); it != this->m_children.end(); ++it) {
if (*it) {
(*it)->SendMsg(nullptr, UM_PAGEUPPUSH, 0, 0, 0, 0);
}
}
}