mirror of
https://github.com/ppy/osu
synced 2024-12-23 07:15:46 +00:00
Remove ManiaColourCode in favor for boolean
This commit is contained in:
parent
d6d81fb8e5
commit
a8b401522b
@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Mania.Configuration
|
||||
|
||||
SetDefault(ManiaRulesetSetting.ScrollTime, 1500.0, DrawableManiaRuleset.MIN_TIME_RANGE, DrawableManiaRuleset.MAX_TIME_RANGE, 5);
|
||||
SetDefault(ManiaRulesetSetting.ScrollDirection, ManiaScrollingDirection.Down);
|
||||
SetDefault(ManiaRulesetSetting.ColourCode, ManiaColourCode.Off);
|
||||
SetDefault(ManiaRulesetSetting.ColourCode, false);
|
||||
}
|
||||
|
||||
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
||||
|
@ -37,10 +37,10 @@ namespace osu.Game.Rulesets.Mania
|
||||
Current = config.GetBindable<double>(ManiaRulesetSetting.ScrollTime),
|
||||
KeyboardStep = 5
|
||||
},
|
||||
new SettingsEnumDropdown<ManiaColourCode>
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Colour-coded notes",
|
||||
Current = config.GetBindable<ManiaColourCode>(ManiaRulesetSetting.ColourCode),
|
||||
Current = config.GetBindable<bool>(ManiaRulesetSetting.ColourCode),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
private OsuColour colours { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private Bindable<ManiaColourCode> configColourCode { get; set; }
|
||||
private Bindable<bool> configColourCode { get; set; }
|
||||
|
||||
[Resolved(canBeNull: true)]
|
||||
private ManiaBeatmap beatmap { get; set; }
|
||||
@ -166,9 +166,9 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
return Precision.AlmostEquals(remainder, 0, LENIENCY_MS) || Precision.AlmostEquals(remainder - divisor, 0, LENIENCY_MS);
|
||||
}
|
||||
|
||||
private void UpdateSnapColour(ManiaColourCode colourCode, int snap)
|
||||
private void UpdateSnapColour(bool colourCode, int snap)
|
||||
{
|
||||
if (colourCode == ManiaColourCode.On)
|
||||
if (colourCode)
|
||||
{
|
||||
Colour = BindableBeatDivisor.GetColourFor(Snap, colours);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
protected new ManiaRulesetConfigManager Config => (ManiaRulesetConfigManager)base.Config;
|
||||
|
||||
[Cached]
|
||||
protected readonly Bindable<ManiaColourCode> configColourCode = new Bindable<ManiaColourCode>();
|
||||
protected readonly Bindable<bool> configColourCode = new Bindable<bool>();
|
||||
|
||||
public ScrollVisualisationMethod ScrollMethod
|
||||
{
|
||||
|
@ -1,11 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.UI
|
||||
{
|
||||
public enum ManiaColourCode
|
||||
{
|
||||
Off,
|
||||
On
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user