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

Delay back button appearance when performing a quick restart #30863

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

frenzibyte
Copy link
Member

Adding tests for the BackButtonState property seems to be too much work for not much benefit, but I can add one if insisted.

Note that I've created another bindable for this rather than turning AllowBackButton itself into a bindable, this is because we still want to allow the user to exit right after performing a quick restart (since exiting is controlled by AllowBackButton, meanwhile the new bindable only affects the visual state of the button itself).

Preview:

CleanShot.2024-11-24.at.05.38.50.mp4

Comment on lines +1593 to +1596
if (newOsuScreen.AllowBackButton)
((IBindable<Visibility>)BackButton.State).BindTo(newOsuScreen.BackButtonState);
else
BackButton.Hide();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do AllowBackButton and BackButtonState coexist? So now you have to both AllowBackButton and also set a valid BackButtonState? I guess you made up for it by setting BackButtonState to visible but like... why have 2 virtuals for essentially the same thing?

Can we not have just one?

@bdach
Copy link
Collaborator

bdach commented Nov 25, 2024

Maybe even the above is too complex and the back button should just not show on the player loader. Dunno. Will need @peppy's opinion to proceed.

@peppy
Copy link
Member

peppy commented Nov 25, 2024

The original rationale from me was that if loading takes too long, the player needs an out (even if they don't have a keyboard).

I haven't looked into the code here yet but the premise of delaying it for the same delay as the metadata is sound enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants