Prepping label statistics.

This commit is contained in:
2023-06-15 22:09:24 -07:00
parent d760d6857b
commit e70f71337f
3 changed files with 86 additions and 36 deletions

View File

@ -22,27 +22,27 @@ namespace Dawn {
struct UILabelText {
std::string text;
struct UILabelStyle style;
glm::vec2 position;
glm::vec2 size;
// Part index?
// Quad start?
// quad count?
// position?
// size?
// some kind of custom data e.g. wobble or shake?
int32_t lineStart = 0;
int32_t lineCount = 0;
usagelockid_t lockId = -1;
struct NewTrueTypeFaceTexture *texture = nullptr;
};
struct UILabelLine {
float_t width = 0.0f;
int32_t quadStart = -1;
int32_t quadCount = 0;
std::vector<struct UILabelText*> texts;
};
class UILabel : public UIComponentRenderable {
private:
Mesh mesh;
FontShaderBuffer shaderBuffer;
std::vector<struct UILabelText> texts;
std::vector<struct UILabelText> textsBuffered;
std::vector<struct UILabelLine> lines;
std::map<NewTrueTypeFaceTexture*, int32_t> textureMap;
public: