rodecomp/Source/Client/Browser/BrowserRegistry.cpp
ragnarok-clanker ba683b3b8d Maintenance: Linkage preludes, part 2 (resubmit of 17276): the 17 units whose explicit-template declarations name game types. Their e
Batch #17281 by ragnarok-clanker: no function's compiled code changes; checked with 17 compiled unit(s), including every includer of Source/Linkage/Source/Client/Browser/BrowserFactory.cpp.h, Source/Linkage/Source/Client/Browser/BrowserRegistry.cpp.h, Source/Linkage/Source/Client/Session/Session.cpp.h, Source/Linkage/Source/Contents/Actors/ActorNameCache.cpp.h, Source/Linkage/Source/Contents/Actors/ActorNameDirectory.cpp.h, Source/Linkage/Source/Contents/Actors/ActorNameRequests.cpp.h, Source/Linkage/Source/Contents/Actors/RenderObject.cpp.h, Source/Linkage/Source/Contents/AdventureGuide/AdventureGuideMgr.cpp.h, Source/Linkage/Source/Contents/Async/AsyncWorkRecycleObjectPoolMgr.cpp.h, Source/Linkage/Source/Contents/Items/ClientItemLists.cpp.h, Source/Linkage/Source/Contents/Messenger/ClientMessenger.cpp.h, Source/Linkage/Source/Contents/Skills/PlayerSkillBundle.cpp.h, Source/Linkage/Source/UI/AdventureGuide/UIAdventureGuide.cpp.h, Source/Linkage/Source/UI/Quest/UIRenewQuestUI.cpp.h, Source/Linkage/Source/UI/Quest/UIRenewQuestWnd.cpp.h, Source/Linkage/Source/UI/Window/UIWindowMgr.cpp.h, Source/Linkage/Source/UI/Window/WindowMgrState.cpp.h.
2026-11-11 20:19:09 +00:00

52 lines
1.4 KiB
C++

#include "Client/Application/ApplicationWindow.h"
#include "Client/Application/Launcher.h"
#include "Client/Browser/WebBrowser.h"
#include "UI/Window/UIWindowMgr.h"
#include <new>
// OFFSET: 0x00A91990
// FUNCTION: fn_17167
CWebBrowser* UIWindowMgr::FindBrowser(HWND window) {
const auto found = this->browsers.find(window);
return found != this->browsers.end() ? found->second : nullptr;
}
// OFFSET: 0x00A8F860
// FUNCTION: fn_17146
void UIWindowMgr::RemoveBrowser(HWND window) {
const auto found = this->browsers.find(window);
if (found != this->browsers.end()) {
CWebBrowser* browser = found->second;
if (browser) {
if (browser == this->specialBrowser) {
this->specialBrowser = nullptr;
}
delete browser;
}
this->browsers.erase(found);
return;
}
if (window == this->specialBrowser->host) {
delete this->specialBrowser;
this->specialBrowser = nullptr;
}
}
// OFFSET: 0x00A8C960
// FUNCTION: fn_17138
CWebBrowser* UIWindowMgr::EnsureSpecialBrowser(int width, int height) {
if (this->specialBrowser) {
return this->specialBrowser;
}
this->specialBrowser = new CWebBrowser();
if (this->specialBrowser && this->specialBrowser->Create(hWnd, g_instance, width, height)) {
this->browsers.insert(std::make_pair(this->specialBrowser->host, this->specialBrowser));
}
return this->specialBrowser;
}