slight optimization
This commit is contained in:
parent
83b45a0dea
commit
4793d6f26a
6 changed files with 39 additions and 25 deletions
|
|
@ -40,18 +40,4 @@ UiElementMouse::UiElementMouse(std::int_fast32_t anchorX, std::int_fast32_t anch
|
|||
|
||||
UiElementBuffer::UiElementBuffer(std::uint_fast32_t width, std::uint_fast32_t height) : width(width), height(height) {
|
||||
|
||||
}
|
||||
|
||||
void UiElement::UpdatePosition(WindowFramebuffer& window) {
|
||||
window.ScaleElement(transform);
|
||||
for(UiElement* child : children) {
|
||||
child->UpdatePosition(window, *this);
|
||||
}
|
||||
}
|
||||
|
||||
void UiElement::UpdatePosition(WindowFramebuffer& window, UiElement& parent) {
|
||||
window.ScaleElement(transform, parent.transform);
|
||||
for(UiElement* child : children) {
|
||||
UpdatePosition(window, *child);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue