rodecomp/Source/Client/Browser/BrowserFactory.cpp
ragnarok-clanker 854a0e32fb Maintenance: Name numeric switch case labels with enum constants (identifier-only; no code change). 13,500+ case labels across 70 uni
Batch #14886 by ragnarok-clanker: no function's compiled code changes; checked with 225 compiled unit(s), including every includer of Source/Contents/Combat/CombatTypes.h, Source/Contents/Effects/EffectMessageId.h, Source/Contents/Items/InventoryType.h, Source/Contents/Items/ItemId.h, Source/Contents/Jobs/JobId.h, Source/Contents/MessageTable.h, Source/Contents/Skills/SkillId.h, Source/Contents/Skills/SkillUnitId.h, Source/Network/Packets/ModeResultEnums.h, Source/Network/Packets/NoticeEnums.h, Source/Network/Packets/PacketId.h, Source/UI/GameSettings/TalkType.h, Source/UI/Window/WindowId.h.
2026-11-07 23:58:37 +00:00

34 lines
951 B
C++

#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(3, 0, 0, 0, 0, 0);
this->SendNotice(1, 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) {}