Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
parent
35d2a8cb36
commit
a47d20f8be
890 changed files with 11796 additions and 16664 deletions
27
Source/Client/Browser/BrowserFactory.cpp
Normal file
27
Source/Client/Browser/BrowserFactory.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "Client/Browser/BrowserRegistry.h"
|
||||
#include "Client/Browser/WebBrowser.h"
|
||||
#include "Contents/MessageTable.h"
|
||||
#include "Client/Browser/BrowserFactory.h"
|
||||
#include "UI/Chat/ChatNotifications.h"
|
||||
|
||||
#include <new>
|
||||
|
||||
// OFFSET: 0x00A8C840
|
||||
// FUNCTION: fn_17136
|
||||
CWebBrowser* BrowserFactory::Create(int width, int height) {
|
||||
if (this->registry.browsers.size() >= 5) {
|
||||
this->notifications.Refresh();
|
||||
const char* message = LookupMessage(1578, this->languagePrefix, this->serviceType, this->language);
|
||||
this->notifications.Text(message, 255, nullptr, 0, false);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto* browser = new CWebBrowser(this->context);
|
||||
if (browser->Create(width, height)) {
|
||||
this->registry.browsers.emplace(browser->host, browser);
|
||||
return browser;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue