Fixed some bugs with AI
This commit is contained in:
@ -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;
|
||||
}
|
@ -20,7 +20,7 @@ namespace Dawn {
|
||||
void drawSelf(UIShader *shader, glm::mat4 selfTransform) override;
|
||||
|
||||
public:
|
||||
Texture *texture;
|
||||
Texture *texture = nullptr;
|
||||
|
||||
UIBorder(UICanvas *canvas);
|
||||
|
||||
|
Reference in New Issue
Block a user