Files
GabsPuNs-Project_Zenith_Main/Minecraft.Client/RmlManager.h
GabsPuNs d3af93969a Implement UnhandledExceptionFilter and revert "set intro scene background to white"
Also use g_iScreenWidth and g_iScreenHeight in RMLManager
2026-06-20 15:35:42 -04:00

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();
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")