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.
30 lines
968 B
C++
30 lines
968 B
C++
#include "UI/Window/UIEnums.h"
|
|
#include "Client/Application/ApplicationWindow.h"
|
|
#include "Client/Application/Launcher.h"
|
|
#include "Client/Browser/WebBrowser.h"
|
|
#include "Contents/Tables/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) {
|
|
CWebBrowser* browser = new CWebBrowser();
|
|
if (browser && browser->Create(hWnd, g_instance, width, height)) {
|
|
this->browsers.insert(std::make_pair(browser->host, browser));
|
|
return browser;
|
|
}
|
|
} else {
|
|
g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0);
|
|
g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast<std::intptr_t>(LookupMessage(MSI_FAILED_ADD_TAB)), RGB(255, 0, 0), 0, 0, 0);
|
|
}
|
|
|
|
return nullptr;
|
|
}
|