add ruleset settings

This commit is contained in:
Jorolf
2017-07-11 20:25:24 +02:00
parent 39d20565aa
commit f7c9e449d4
6 changed files with 55 additions and 22 deletions

View File

@ -1,9 +1,13 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Database;
using osu.Game.Graphics;
using osu.Game.Overlays.Settings.Sections.Gameplay;
using osu.Game.Rulesets;
using System.Linq;
namespace osu.Game.Overlays.Settings.Sections
{
@ -20,5 +24,16 @@ namespace osu.Game.Overlays.Settings.Sections
new SongSelectSettings(),
};
}
[BackgroundDependencyLoader]
private void load(RulesetDatabase rulesets)
{
foreach(Ruleset ruleset in rulesets.AllRulesets.Select(info => info.CreateInstance()))
{
SettingsSubsection section = ruleset.CreateSettings();
if (section != null)
Add(section);
}
}
}
}