mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
feat(ui): support scaling of labels and images
Modify width() and height() methods to multiply by m_scale for both Label and Image. Rename internal dimensions to m_real_width and m_real_height for clarity. Adjust Button foreground position to vertically center when label is scaled.
This commit is contained in:
@@ -36,8 +36,8 @@ protected:
|
||||
private:
|
||||
TextStyle m_text;
|
||||
UIVertexData m_data;
|
||||
float m_width = 0.0f;
|
||||
float m_height = 0.0f;
|
||||
float m_real_width = 0.0f;
|
||||
float m_real_height = 0.0f;
|
||||
float m_offset_x = 0.0f;
|
||||
float m_offset_y = 0.0f;
|
||||
void update_vertices();
|
||||
|
||||
Reference in New Issue
Block a user