mipmaps
This commit is contained in:
@ -30,6 +30,9 @@ namespace ia::iae
|
||||
BOOL g_debuggerEnabled{false};
|
||||
Rml::ElementDocument *g_document{};
|
||||
|
||||
String g_markup;
|
||||
Rml::SharedPtr<Rml::StyleSheetContainer> g_styleSheetContainer;
|
||||
|
||||
class RmlUIRenderInterface : public Rml::RenderInterface
|
||||
{
|
||||
public:
|
||||
@ -445,6 +448,7 @@ namespace ia::iae
|
||||
|
||||
VOID UI::OnScreenResize(IN INT32 newWidth, IN INT32 newHeight)
|
||||
{
|
||||
//g_context->SetDimensions(Rml::Vector2i{newWidth, newHeight});
|
||||
}
|
||||
|
||||
VOID UI::AddFontFromFile(IN CONST String &path)
|
||||
@ -454,9 +458,10 @@ namespace ia::iae
|
||||
|
||||
VOID UI::SetMarkup(IN CONST String &markup, IN CONST String &styles)
|
||||
{
|
||||
g_document->SetStyleSheetContainer(Rml::Factory::InstanceStyleSheetString(styles.c_str()));
|
||||
g_document->SetInnerRML(
|
||||
BuildString("<body style=\"display: block; width: 100%; height: 100%;\">", markup, "</body>").c_str());
|
||||
g_styleSheetContainer = Rml::Factory::InstanceStyleSheetString(styles.c_str());
|
||||
g_markup = BuildString("<body style=\"display: block; width: 100vw; height: 100vh;\">", markup, "</body>");
|
||||
//g_document->SetStyleSheetContainer(g_styleSheetContainer);
|
||||
//g_document->SetInnerRML(g_markup.c_str());
|
||||
}
|
||||
|
||||
VOID UI::AddClickEvent(IN PCCHAR elementId, IN std::function<VOID()> callback)
|
||||
@ -491,7 +496,7 @@ namespace ia::iae
|
||||
Engine::SetRenderState_ColorOverlay({255, 255, 255, 255});
|
||||
Engine::SetRenderState_TextureOffset({0, 0});
|
||||
Engine::SetRenderState_CameraRelative(false);
|
||||
Engine::SetRenderState_Transform({translation.x, translation.y}, {1.0f, 1.0f}, 0, 0xFF, 0);
|
||||
Engine::SetRenderState_TransformUI({translation.x, translation.y}, {1.0f, 1.0f}, 0);
|
||||
|
||||
Engine::DrawGeometry((Handle) geometry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user