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

Decouple FilterControl.Ruleset from the game-wide ruleset bindable #2471

Conversation

UselessToucan
Copy link
Contributor

@smoogipoo
Copy link
Contributor

I don't think direct and osu! should share the game-wide ruleset bindable in the first place. Agree, @peppy ?

@peppy
Copy link
Sponsor Member

peppy commented May 2, 2018

I think that's the direction we were going in, yeah.

Also I thought this functionality already existed at an OsuScreen level or similar? I know that these buttons were already disabled when in play mode.

@smoogipoo
Copy link
Contributor

The toolbar buttons are, but the osu!direct buttons weren't disabled, and they share the game-wide bindable hence triggering the exception. But I can't imagine why you'd want to disable the direct ones.

@smoogipoo
Copy link
Contributor

Instead of this, I propose we decouple osu!direct from the game-wide ruleset bindable. It should do something like: Ruleset.Value = game?.Ruleset.Value ?? rulesets.GetRuleset(0) rather than a .BindTo().

osu!direct should dependency cache a ruleset bindable for children to use, if anything else other than this filter control needs it.

@smoogipoo smoogipoo added this to the May 2018 milestone May 2, 2018
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

as commented

@UselessToucan
Copy link
Contributor Author

@smoogipoo smoogipoo removed this from the May 2018 milestone May 7, 2018
@UselessToucan UselessToucan changed the title Disable RulesetToggleButton whenever the ruleset can't be changed Decouple FilterControl.Ruleset from the game-wide ruleset bindable May 8, 2018
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

lgtm!

@smoogipoo smoogipoo merged commit 3c68935 into ppy:master May 9, 2018
@UselessToucan UselessToucan deleted the change_ruleset_via_direct_while_on_scorescreen branch May 9, 2018 11:34
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.

Can not set value to "osu.Game.Rulesets.RulesetInfo"
3 participants