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

Add the ability to switch tournaments to the SetupScreen #11118

Merged
merged 16 commits into from
Jan 11, 2021

Conversation

MiraiSubject
Copy link
Contributor

This adds an extra entry to the setup screen that allows the user to switch the tournaments in the client instead of using the tournament.ini.

Currently requires a restart to apply the changes.

image

@peppy
Copy link
Member

peppy commented Dec 7, 2020

If it requires a restart, please trigger the restart.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

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

Generally this will probably require UX considerations as to what happens if you choose another tournament. Getting booted from the game outright probably won't be the best option.

osu.Game.Tournament/IO/TournamentStorage.cs Show resolved Hide resolved
osu.Game.Tournament/IO/TournamentStorage.cs Outdated Show resolved Hide resolved
osu.Game.Tournament/IO/TournamentStorage.cs Outdated Show resolved Hide resolved
osu.Game.Tournament/Screens/SetupScreen.cs Outdated Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/S and removed size/M labels Dec 7, 2020
@MiraiSubject
Copy link
Contributor Author

Generally this will probably require UX considerations as to what happens if you choose another tournament. Getting booted from the game outright probably won't be the best option.

Yeah I agree. I'll be looking into something that will at worst reload the scenes to refresh the videos. Reading the bracket on switch seems a bit more complicated than I had anticipated.

For now I have addressed the review comments

@pull-request-size pull-request-size bot added size/M and removed size/S labels Dec 7, 2020
@peppy
Copy link
Member

peppy commented Dec 8, 2020

At very least this should have a temporary exit procedure (even if it doesn't automatically restart the game). You can probably check how SquirrelUpdateManager does things and copy where applicable.

@MiraiSubject
Copy link
Contributor Author

I got the panel so far changed so it now also contains a close button and it uses GracefullyExit() that's being used in the UpdateManager. I moved that to OsuGameBase so the tournament game can also use it.

As for restarting, I'm not quite sure how to go about that.

I tried adding the BindValueChanged of the Current bindable to the component creation and add the button once it changes. But I realised it already counts as a change when it gets populated initially. A solution would be to check if the old value is the same as the new value and then hide accordingly, but there might be a better way that I'm not aware of.

image

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 10, 2021
@pull-request-size pull-request-size bot added size/M and removed size/L labels Jan 11, 2021
peppy
peppy previously approved these changes Jan 11, 2021
Copy link
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

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

Should do for now.

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