This commit is contained in:
2022-12-12 10:55:02 -08:00
parent a2ee1e139d
commit 8bbf05dcf0
13 changed files with 165 additions and 13 deletions

View File

@ -26,7 +26,7 @@ void UISprite::drawSelf(UIShader *uiShader, glm::mat4 selfTransform) {
uiShader->setUITexture(nullptr);
uiShader->setUIModel(selfTransform);
uiShader->setUIModel(glm::mat4(1.0f));
uiShader->setUIColor(COLOR_WHITE);
uiShader->setUIColor(this->color);
uiShader->setUITexture(this->texture);
this->mesh.draw(MESH_DRAW_MODE_TRIANGLES, 0, -1);

View File

@ -16,7 +16,8 @@ namespace Dawn {
public:
Mesh mesh;
Texture *texture;
struct Color color = COLOR_WHITE;
Texture *texture = nullptr;
/**
* UI Sprite Constructor, use the UIElement / UIComponent create instead.