Fixed some bugs with AI

This commit is contained in:
2022-11-26 14:31:06 -08:00
parent c1ac69a146
commit c1d6885970
25 changed files with 245 additions and 119 deletions

View File

@ -10,15 +10,6 @@ using namespace Dawn;
UIBorder::UIBorder(UICanvas *canvas) : UIComponent(canvas) {
this->mesh.createBuffers(QUAD_VERTICE_COUNT * 9, QUAD_INDICE_COUNT * 9);
this->texture = new Texture();
this->texture->setSize(3, 3);
struct Color pixels[9] = {
COLOR_WHITE, COLOR_RED, COLOR_BLUE,
COLOR_GREEN, COLOR_MAGENTA, COLOR_BLACK,
COLOR_CORNFLOWER_BLUE, COLOR_WHITE, COLOR_MAGENTA
};
this->texture->buffer(pixels);
this->updatePositions();
}
@ -134,5 +125,4 @@ glm::vec2 UIBorder::getBorderSize() {
}
UIBorder::~UIBorder() {
delete this->texture;
}

View File

@ -20,7 +20,7 @@ namespace Dawn {
void drawSelf(UIShader *shader, glm::mat4 selfTransform) override;
public:
Texture *texture;
Texture *texture = nullptr;
UIBorder(UICanvas *canvas);