Skip to content

Commit

Permalink
make selecting ruleset open overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
Flutterish committed Apr 18, 2022
1 parent 9ae3b3a commit ac66b6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.RurusettoAddon/RurusettoAddonRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ namespace osu.Game.Rulesets.RurusettoAddon;

public class RurusettoAddonRuleset : Ruleset {
public override string Description => "rūrusetto addon";
public override string ShortName => "rurusettoaddon";
public const string SHORT_NAME = "rurusettoaddon";
public override string ShortName => SHORT_NAME;

public override IRulesetConfigManager CreateConfig ( SettingsStore settings )
=> new RurusettoConfigManager( settings, RulesetInfo );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies ( IReadO
Schedule( () => dep.Get<NotificationOverlay>()?.Post( new SimpleErrorNotification { Text = Localisation.Strings.NotificationWorkIncomplete } ) );
}

dep.Get<IBindable<RulesetInfo>>()?.BindValueChanged( v => {
if ( v.NewValue.ShortName == RurusettoAddonRuleset.SHORT_NAME ) {
Show();
}
} );

Schedule( () => {
AddInternal( API );
} );
Expand Down

0 comments on commit ac66b6b

Please sign in to comment.