mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 10:47:22 +09: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
|
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()
|
public OverlayRulesetSelector()
|
||||||
: base(true)
|
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
}
|
}
|
||||||
|
@ -17,19 +17,14 @@ namespace osu.Game.Rulesets
|
|||||||
|
|
||||||
protected override Dropdown<RulesetInfo> CreateDropdown() => null;
|
protected override Dropdown<RulesetInfo> CreateDropdown() => null;
|
||||||
|
|
||||||
private readonly bool legacyOnly;
|
protected virtual bool LegacyOnly => false;
|
||||||
|
|
||||||
public RulesetSelector(bool legacyOnly = false)
|
|
||||||
{
|
|
||||||
this.legacyOnly = legacyOnly;
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
foreach (var ruleset in Rulesets.AvailableRulesets)
|
foreach (var ruleset in Rulesets.AvailableRulesets)
|
||||||
{
|
{
|
||||||
if (!ruleset.IsLegacyRuleset() && legacyOnly)
|
if (!ruleset.IsLegacyRuleset() && LegacyOnly)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
Loading…
x
Reference in New Issue
Block a user