Skip to content

Conversation

@oznogon
Copy link
Contributor

@oznogon oznogon commented Nov 25, 2025

Add a GuiElement::setParent() function to reparent elements by removing them from their former parent element's tree, adding them to the new parent element's tree, and updating its pointer.

For example, this allows for the dynamic reparenting of elements based on the parent element's width or height.

    // If a container already exists for this system, reparent it to the new row instead of recreating widgets.
    if (auto this_container = systems[system_index].container)
        this_container->setParent(systems_row);
    ...

Add a GuiElement::setParent function to reparent elements by removing
them from their former parent element's tree, adding them to the new
parent element's tree, and updating its pointer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant