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.
108 lines
2.8 KiB
C++
108 lines
2.8 KiB
C++
#include "UI/Window/UIEnums.h"
|
|
#include "Contents/Configuration/ServiceOptions.h"
|
|
#include "UI/Layout/SnapMgr.h"
|
|
#include "UI/Window/UIWindow.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
|
|
#include <algorithm>
|
|
|
|
extern template std::_List_node<UIWindow*, void*>* std::list<UIWindow*>::_Emplace<UIWindow* const&>(std::_List_node<UIWindow*, void*>* const, UIWindow* const&);
|
|
|
|
// OFFSET: 0x00AA2C90
|
|
// FUNCTION: fn_17219
|
|
__declspec(noinline) void UIWindowMgr::Schedule(UIWindow* window) {
|
|
if (window == this->newSelectCharWnd) {
|
|
this->newSelectCharWnd = nullptr;
|
|
}
|
|
|
|
if (window == this->selCharForUServerWnd) {
|
|
this->selCharForUServerWnd = nullptr;
|
|
}
|
|
|
|
if (window == this->changeNameWnd) {
|
|
this->changeNameWnd = nullptr;
|
|
}
|
|
|
|
if (window == this->previousMouseWnd) {
|
|
this->previousMouseWnd = nullptr;
|
|
}
|
|
|
|
if (window == this->waitDBSaveWnd) {
|
|
this->waitDBSaveWnd = nullptr;
|
|
}
|
|
|
|
this->retired.push_back(window);
|
|
}
|
|
|
|
// OFFSET: 0x00AA7250
|
|
// FUNCTION: fn_17237
|
|
void UIWindowMgr::Destroy(UIWindow* window) {
|
|
const bool snappingEnabled = g_serviceOptions.Get(141) != 0;
|
|
|
|
if (!window) {
|
|
return;
|
|
}
|
|
|
|
const auto rendered = std::find(this->rendered.begin(), this->rendered.end(), window);
|
|
|
|
if (rendered != this->rendered.end()) {
|
|
if (snappingEnabled && g_serviceOptions.Get(141) != 0) {
|
|
this->snapRectangles.erase(window);
|
|
}
|
|
|
|
g_snapMgr.Remove(*rendered);
|
|
(*rendered)->StoreInfo();
|
|
delete *rendered;
|
|
|
|
this->rendered.erase(rendered);
|
|
return;
|
|
}
|
|
|
|
for (auto entry = this->overlays.begin(); entry != this->overlays.end(); ++entry) {
|
|
if (entry->second != window) {
|
|
continue;
|
|
}
|
|
|
|
entry->second->StoreInfo();
|
|
delete entry->second;
|
|
|
|
this->overlays.erase(entry);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00AA71E0
|
|
// FUNCTION: fn_17235
|
|
void UIWindowMgr::DismissTransient() {
|
|
if (this->transientWnd) {
|
|
this->Schedule(this->transientWnd);
|
|
this->transientWnd = nullptr;
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00A8F840
|
|
// FUNCTION: fn_17145
|
|
void UIWindowMgr::DestroyBackgroundSurface() {
|
|
if (this->backgroundSurface) {
|
|
delete this->backgroundSurface;
|
|
this->backgroundSurface = nullptr;
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00A8FB80
|
|
// FUNCTION: fn_17147
|
|
void UIWindowMgr::SubmitActiveDialog() {
|
|
UIWindow* window = this->choose3Wnd;
|
|
if (window || (window = this->sayDialogWnd) != nullptr || (window = this->sayDialogOverlayWnd) != nullptr || (window = this->comboBoxWnd) != nullptr ||
|
|
(window = this->comboBoxIDWnd) != nullptr || (window = this->chooseWarpWnd) != nullptr || (window = this->makeTargetListWnd) != nullptr ||
|
|
(window = this->hoverWindow) != nullptr) {
|
|
window->SendMsg(nullptr, UM_DOWNPUSH, 0, 0, 0, 0);
|
|
return;
|
|
}
|
|
|
|
for (auto entry = this->rendered.begin(); entry != this->rendered.end(); ++entry) {
|
|
if ((*entry)->IsFrameWnd()) {
|
|
(*entry)->SendMsg(nullptr, UM_DOWNPUSH, 0, 0, 0, 0);
|
|
}
|
|
}
|
|
}
|