This commit is contained in:
Jorijn van der Graaf 2025-11-24 06:08:35 +01:00
commit 83b45a0dea
9 changed files with 251 additions and 7 deletions

View file

@ -45,13 +45,13 @@ UiElementBuffer::UiElementBuffer(std::uint_fast32_t width, std::uint_fast32_t he
void UiElement::UpdatePosition(WindowFramebuffer& window) {
window.ScaleElement(transform);
for(UiElement* child : children) {
UpdatePosition(window, *child);
}
child->UpdatePosition(window, *this);
}
}
void UiElement::UpdatePosition(WindowFramebuffer& window, UiElement& parent) {
window.ScaleElement(transform, parent.transform);
for(UiElement* child : children) {
UpdatePosition(window, *child);
}
UpdatePosition(window, *child);
}
}