mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-07-09 22:18:18 +00:00
56 lines
1.2 KiB
C++
56 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#pragma push_macro("byte")
|
|
#pragma push_macro("GetNextSibling")
|
|
#pragma push_macro("GetFirstChild")
|
|
#undef byte
|
|
#undef GetNextSibling
|
|
#undef GetFirstChild
|
|
|
|
#include <RmlUi/Core/Core.h>
|
|
#include <RmlUi/Core/Context.h>
|
|
#include <RmlUi/Core/ElementDocument.h>
|
|
#include "RmlUi_Renderer_D3D11.h"
|
|
#include "RmlUi_SystemInterface_Win64.h"
|
|
#include "RmlUi_FileInterface.h"
|
|
|
|
// NOTE: pop_macro at end of file
|
|
|
|
class RmlManager
|
|
{
|
|
public:
|
|
static RmlManager& Get();
|
|
|
|
bool Init(int viewport_width, int viewport_height);
|
|
void Shutdown();
|
|
|
|
void Update();
|
|
void Render();
|
|
|
|
Rml::Context* GetContext() const { return m_context; }
|
|
RenderInterface_D3D11* GetRenderInterface() const { return m_renderer.get(); }
|
|
|
|
void OnResize(int width, int height);
|
|
void UpdateDpRatio();
|
|
|
|
void OnLanguageChanged();
|
|
|
|
private:
|
|
RmlManager();
|
|
~RmlManager();
|
|
RmlManager(const RmlManager&) = delete;
|
|
RmlManager& operator=(const RmlManager&) = delete;
|
|
|
|
bool m_initialised;
|
|
|
|
std::unique_ptr<RenderInterface_D3D11> m_renderer;
|
|
std::unique_ptr<SystemInterface_Win64> m_system_interface;
|
|
std::unique_ptr<FileInterface_Game> m_file_interface;
|
|
|
|
Rml::Context* m_context;
|
|
};
|
|
|
|
#pragma pop_macro("GetFirstChild")
|
|
#pragma pop_macro("GetNextSibling")
|
|
#pragma pop_macro("byte")
|