Fixed alignment on UI Label

This commit is contained in:
2023-07-10 10:29:59 -07:00
parent 114a5b434e
commit 835d5e5892
2 changed files with 29 additions and 6 deletions

View File

@ -36,11 +36,18 @@ namespace Dawn {
int32_t quadCount = 0;
};
enum UILabelVerticalAlign {
UI_LABEL_VERTICAL_ALIGN_TOP,
UI_LABEL_VERTICAL_ALIGN_MIDDLE,
UI_LABEL_VERTICAL_ALIGN_BOTTOM
};
class UILabel : public UIComponentRenderable {
private:
Mesh mesh;
FontShaderBuffer shaderBuffer;
std::map<TrueTypeFaceTexture*, int32_t> textureMap;
bool_t ignoreAlignmentUpdate = false;
public:
int32_t quadStart = 0;
@ -55,6 +62,9 @@ namespace Dawn {
StateEvent<> eventTextChanged;
// @optional
StateProperty<float_t> lineHeight;
UILabel(SceneItem *item);
void onStart() override;