Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent leftovers MenuButtons when rebuilding menu #845

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

DashingCat
Copy link
Contributor

@DashingCat DashingCat commented Nov 3, 2024

Defer RebuildMainAndTitle() right before Update(), so CreateButtons() is only called once per frame.

When CreateButtons() is called more than once per frame, it creates orphaned buttons (not linked to the OuiMainMenu) which are not cleaned up properly, causing selection issues in the main menu.

The method RebuildMainAndTitle() is now private to prevent direct usage.

Closes issues #430 (and #766 which is a duplicate)

@maddie480 maddie480 added the needs fixing This PR needs to be changed before being reviewed again label Feb 2, 2025
@maddie480
Copy link
Member

needs resolving conflicts (and I apparently can't do it myself)

@DashingCat DashingCat force-pushed the 430-prevent-leftovers-menubuttons branch from 3e3b39f to 795180c Compare February 2, 2025 13:13
@DashingCat
Copy link
Contributor Author

Thanks for the heads up, conflicts resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs fixing This PR needs to be changed before being reviewed again
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants