Working on time and input

This commit is contained in:
2022-10-27 23:38:04 -07:00
parent 942de96e16
commit 37eaa706b7
16 changed files with 196 additions and 18 deletions

View File

@ -13,7 +13,6 @@ UILabel::UILabel(UICanvas &canvas) : UIComponent(canvas) {
void UILabel::updatePositions() {
UIComponent::updatePositions();
this->updateMesh();
}
@ -59,5 +58,5 @@ void UILabel::drawSelf(UIShader &shader, glm::mat4 selfTransform) {
shader.setUIModel(selfTransform);
shader.setUITexture(&this->font->getTexture());
this->font->draw(this->mesh, 0, -1);
this->font->draw(this->mesh, this->startQuad, this->endQuad);
}

View File

@ -12,7 +12,6 @@ namespace Dawn {
class UILabel : public UIComponent {
private:
Mesh mesh;
struct FontMeasure measure;
bool_t needsRebuffering = true;
Font *font = nullptr;
std::string text = "";
@ -26,6 +25,10 @@ namespace Dawn {
void updateMesh();
public:
struct FontMeasure measure;
int32_t startQuad = 0;
int32_t endQuad = -1;
/** The colour of this label */
struct Color textColor = COLOR_MAGENTA;