Now I gotta fix alignment

This commit is contained in:
2023-04-27 23:31:09 -07:00
parent 54cfc89f38
commit 0040a54001
6 changed files with 177 additions and 13 deletions

View File

@ -14,6 +14,7 @@ namespace Dawn {
protected:
Camera *camera;
UICanvas *canvas;
Texture text;
int32_t test = 0;
@ -28,6 +29,17 @@ namespace Dawn {
auto textbox = VNTextbox::create(this);
textbox->transform.setParent(canvas->transform);
struct Color colors[] = {
COLOR_RED, COLOR_MAGENTA, COLOR_RED,
COLOR_MAGENTA, COLOR_CORNFLOWER_BLUE, COLOR_MAGENTA,
COLOR_RED, COLOR_MAGENTA, COLOR_RED
};
text.setSize(3, 3);
text.buffer(colors);
textbox->border->texture = &text;
textbox->border->alignment = glm::vec4(32, 32, 128, 128);
}
std::vector<Asset*> getRequiredAssets() override {