summaryrefslogtreecommitdiff
path: root/Runtime/GUI/UITextMesh.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-11-05 12:14:59 +0800
committerchai <chaifix@163.com>2021-11-05 12:14:59 +0800
commit6d5787d8da9ad1685864668dd4c3d6aa73a563db (patch)
treef4d28a553b13b369a580c482e187bcc4b42f39de /Runtime/GUI/UITextMesh.h
parentbe9870f5c1ba4f6ae8cd9764f1a8ed56ee81ddd5 (diff)
TextMeshGenerator
Diffstat (limited to 'Runtime/GUI/UITextMesh.h')
-rw-r--r--Runtime/GUI/UITextMesh.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/Runtime/GUI/UITextMesh.h b/Runtime/GUI/UITextMesh.h
index c298cb0..505b390 100644
--- a/Runtime/GUI/UITextMesh.h
+++ b/Runtime/GUI/UITextMesh.h
@@ -34,15 +34,34 @@ namespace TextHelper
class UITextMesh
{
public:
- UITextMesh(const UnicodeString& str, Font* font, int pixelSize, int lineHeight, Color32 color32 = Color32::white, ETextAnchor anchor = TextAnchor_UpperLeft, ETextAlignment alignment = TextAlignment_Left, bool wordwrap = false, float preferred = 0)/*throw TextMeshException*/;
+ void Draw() const;
- ~UITextMesh();
+ GET(const Font*, Font, m_Font);
+ GET(int, PixelSize, m_PixelSize);
+ GET(int, LineHeight, m_LineHeight);
+ GET(Color32, Color, m_Color);
+ GET(ETextAlignment, Alignment, m_Alignment);
+ GET(ETextAnchor, Anchor, m_Anchor);
+ GET(bool, Wordwrap, m_Wordwrap);
+ GET(float, Preferred, m_Preferred);
+ GET(const UnicodeString&, Content, m_Content);
- void Draw();
+private:
+ friend class TextMeshGenerator;
-private:
- unsigned long long m_NotUniqueHash;
- Font* m_Font;
- std::unordered_map<int/*IndexOfAtlas*/, VertexBuffer*> m_VBOs;
+ UITextMesh(const UnicodeString& str, Font* font, int pixelSize, int lineHeight, Color32 color32 = Color32::white, ETextAnchor anchor = TextAnchor_UpperLeft, ETextAlignment alignment = TextAlignment_Left, bool wordwrap = false, float preferred = 0)/*throw TextMeshException*/;
+ ~UITextMesh();
+
+ std::unordered_map<int, VertexBuffer*> m_VBOs;
+
+ Font* m_Font;
+ UnicodeString m_Content;
+ int m_PixelSize;
+ int m_LineHeight;
+ Color32 m_Color;
+ ETextAlignment m_Alignment;
+ ETextAnchor m_Anchor;
+ bool m_Wordwrap;
+ float m_Preferred;
}; \ No newline at end of file