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)

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