mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat(ui): add Rect widget with fill, color, and parent-relative sizing
This commit is contained in:
@@ -9,6 +9,19 @@ void ColumnLayout::update(float dt) {
|
||||
layout();
|
||||
}
|
||||
|
||||
float ColumnLayout::width() const {
|
||||
if (m_parent) {
|
||||
return m_parent->width();
|
||||
}
|
||||
return m_window_width;
|
||||
}
|
||||
float ColumnLayout::height() const {
|
||||
if (m_parent) {
|
||||
return m_parent->height();
|
||||
}
|
||||
return m_window_height;
|
||||
}
|
||||
|
||||
void ColumnLayout::set_spacing(int spacing) { m_spacing = spacing; }
|
||||
|
||||
void ColumnLayout::layout() {
|
||||
|
||||
Reference in New Issue
Block a user