mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 03:42:57 +08:00
Use property instead of ctor parameter
This commit is contained in:
parent
a7ac31fa34
commit
d74a5ef9e6
@ -13,8 +13,10 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
public partial class OverlayRulesetSelector : RulesetSelector
|
||||
{
|
||||
// Since this component is used in online overlays and currently web-side doesn't support non-legacy rulesets - let's disable them for now.
|
||||
protected override bool LegacyOnly => true;
|
||||
|
||||
public OverlayRulesetSelector()
|
||||
: base(true)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
@ -17,19 +17,14 @@ namespace osu.Game.Rulesets
|
||||
|
||||
protected override Dropdown<RulesetInfo> CreateDropdown() => null;
|
||||
|
||||
private readonly bool legacyOnly;
|
||||
|
||||
public RulesetSelector(bool legacyOnly = false)
|
||||
{
|
||||
this.legacyOnly = legacyOnly;
|
||||
}
|
||||
protected virtual bool LegacyOnly => false;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
foreach (var ruleset in Rulesets.AvailableRulesets)
|
||||
{
|
||||
if (!ruleset.IsLegacyRuleset() && legacyOnly)
|
||||
if (!ruleset.IsLegacyRuleset() && LegacyOnly)
|
||||
continue;
|
||||
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user