rodecomp/Source/Client/Browser/BrowserFactory.cpp
ragnarok-clanker 780c281aa2 Maintenance: Name window messaging constants: literal window ids (LookupWindow/EnsureWindow/CloseWindow/... -> WindowId), UIWindowMgr
Batch #14937 by ragnarok-clanker: no function's compiled code changes; checked with 251 compiled unit(s), including every includer of Source/Client/Mode/ModeMessage.h, Source/Contents/Actors/ActorEnums.h, Source/Network/Packets/PartyJoinPacket.h, Source/UI/Window/UIEnums.h, Source/UI/Window/WindowId.h.
2026-11-08 13:56:42 +00:00

35 lines
1,018 B
C++

#include "UI/Window/UIEnums.h"
#include "Client/Application/ApplicationWindow.h"
#include "Client/Application/Launcher.h"
#include "Client/Browser/WebBrowser.h"
#include "Contents/MessageTable.h"
#include "Resource/MSGSTRINGID.h"
#include "UI/Window/UIWindowMgr.h"
#include <new>
namespace {
constexpr unsigned maximumBrowserCount = 5;
}
// OFFSET: 0x00A8C840
// FUNCTION: fn_17136
CWebBrowser* UIWindowMgr::CreateBrowser(int width, int height) {
if (this->browsers.size() >= maximumBrowserCount) {
this->SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_FAILED_ADD_TAB)), RGB(255, 0, 0), 0, 0, 0);
return nullptr;
}
CWebBrowser* browser = new CWebBrowser();
if (browser && browser->Create(hWnd, g_instance, width, height)) {
this->browsers.emplace(browser->host, browser);
return browser;
}
return nullptr;
}
// OFFSET: 0x00A8C950
// FUNCTION: fn_17137
void __stdcall SubA8C950(int, int) {}