Crafter.Graphics/main.cpp
2025-04-16 00:43:33 +02:00

24 lines
599 B
C++

#include <iostream>
#include <exception>
import Crafter.Graphics;
using namespace Crafter;
int main() {
Window window("test", 128, 128);
UiElement test(
0.5, //anchorX
0.5, //anchorY
2, //bufferWidth
1, //bufferHeight
std::uint32_t(30), //absoluteSizeX
std::uint32_t(30), //absoluteSizeY
0.5, //anchorOffsetX
0.5, //anchorOffsetY
0, //z
false //ignoreScaling
);
window.scale = 1;
test.buffer = {{255, 0, 0 ,255}, {0, 255, 0 ,255}};
window.elements.AddComponent(&test);
window.Start();
}