2021-10-05 12:24:41 +02:00
|
|
|
#pragma once
|
2025-01-08 19:15:12 +01:00
|
|
|
#include "Element.h"
|
2024-06-09 12:20:04 +02:00
|
|
|
|
|
|
|
|
namespace Seele {
|
|
|
|
|
namespace UI {
|
2025-01-08 19:15:12 +01:00
|
|
|
struct RenderElement {
|
|
|
|
|
// position relative to target viewport in pixels
|
|
|
|
|
UVector2 position;
|
|
|
|
|
// size relative to target viewport in pixels
|
|
|
|
|
UVector2 size;
|
|
|
|
|
// background color of area
|
|
|
|
|
Vector backgroundColor;
|
|
|
|
|
// text to render
|
|
|
|
|
std::string text;
|
|
|
|
|
// font size in pixels
|
|
|
|
|
uint32 fontSize;
|
|
|
|
|
// font family
|
|
|
|
|
PFontAsset fontFamily;
|
|
|
|
|
};
|
2024-06-09 12:20:04 +02:00
|
|
|
class System {
|
|
|
|
|
public:
|
2025-01-08 19:15:12 +01:00
|
|
|
System(OElement rootElement) : rootElement(std::move(rootElement)) {}
|
|
|
|
|
~System();
|
|
|
|
|
Array<RenderElement> render(UVector2 viewport) {
|
|
|
|
|
}
|
2024-06-09 12:20:04 +02:00
|
|
|
|
|
|
|
|
private:
|
2025-01-08 19:15:12 +01:00
|
|
|
OElement rootElement;
|
2021-10-05 12:24:41 +02:00
|
|
|
};
|
|
|
|
|
DEFINE_REF(System)
|
|
|
|
|
} // namespace UI
|
2025-01-08 19:15:12 +01:00
|
|
|
} // namespace Seele
|