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

fix: select character arrow visibility #2616

Merged
merged 4 commits into from
Feb 22, 2025

Conversation

WeylonSantana
Copy link
Contributor

resolves #2604

UpdateDisplay() is called before EnsureEnsureInitialized()

Update display hides the arrows, when the condition is true, EnsureEnsureInitialized loads the json value which is false, so the arrows appear when they shouldn't

Comment on lines 176 to 183

// in case the json load is changing the visibility of the arrows when it shouldn't
// lets ensure the right value
if (CharacterSelectionPreviews != default)
{
_selectCharacterRightButton.IsHidden = CharacterSelectionPreviews.Length <= 1;
_selectCharacterLeftButton.IsHidden = CharacterSelectionPreviews.Length <= 1;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this all to Show() instead, otherwise they will display wrong if someone logs in, the server closes, the configuration is changed, and then they re-log in

@lodicolo lodicolo merged commit a682b84 into AscensionGameDev:main Feb 22, 2025
1 check passed
@lodicolo lodicolo deleted the fix-2604 branch February 22, 2025 19:48
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.

bug: Select char arrows appear when they shouldn't
2 participants