Refactoring basic text rendering

This commit is contained in:
Dynamitos committed 2025-01-08 19:15:12 +01:00
1 parent eef78e8aa5
commit e487867f96
70 files changed
+608 -1133

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#include "Element.h"
#include "System.h"
using namespace Seele;
using namespace Seele::UI;
Array<RenderElement> Element::render() {
RenderElement result;
result.position = UVector2(0, 0);
result.size = UVector2(style.width, style.height);
result.backgroundColor = style.backgroundColor;
result.fontSize = style.fontSize;
result.fontFamily = style.fontFamily;
return {result};
}
Element::Element(Attributes attr, Array<OElement> children) : attr(attr), children(std::move(children)) {}
Element::~Element() {}