mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Create IWindowManager to open window from libopenrct2
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "SDLException.h"
|
||||
#include "TextComposition.h"
|
||||
#include "UiContext.h"
|
||||
#include "WindowManager.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -62,6 +63,7 @@ private:
|
||||
constexpr static uint32 TOUCH_DOUBLE_TIMEOUT = 300;
|
||||
|
||||
IPlatformUiContext * const _platformUiContext;
|
||||
IWindowManager * const _windowManager;
|
||||
|
||||
CursorRepository _cursorRepository;
|
||||
|
||||
@@ -89,6 +91,7 @@ private:
|
||||
public:
|
||||
UiContext(IPlatformEnvironment * env)
|
||||
: _platformUiContext(CreatePlatformUiContext()),
|
||||
_windowManager(CreateWindowManager()),
|
||||
_keyboardShortcuts(env)
|
||||
{
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
||||
@@ -566,6 +569,11 @@ public:
|
||||
return _platformUiContext->ShowDirectoryDialog(_window, title);
|
||||
}
|
||||
|
||||
IWindowManager * GetWindowManager() override
|
||||
{
|
||||
return _windowManager;
|
||||
}
|
||||
|
||||
private:
|
||||
void OnResize(sint32 width, sint32 height)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user