Working on time and input
This commit is contained in:
@ -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);
|
||||
}
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user