mirror of https://github.com/ppy/osu
Simplify input overlay text colour decode (and fix incorrect default)
This commit is contained in:
parent
087dd759be
commit
3c28c116ca
|
@ -9,7 +9,6 @@
|
|||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.IO;
|
||||
using osu.Game.Rulesets.Objects.Legacy;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Beatmaps.Formats
|
||||
|
@ -135,15 +134,6 @@ protected void HandleColours<TModel>(TModel output, string line, bool allowAlpha
|
|||
|
||||
tHasCustomColours.CustomColours[pair.Key] = colour;
|
||||
}
|
||||
|
||||
bool isInputOverlayText = pair.Key == @"InputOverlayText";
|
||||
|
||||
if (isInputOverlayText)
|
||||
{
|
||||
if (!(output is SkinConfiguration tSkinConfiguration)) return;
|
||||
|
||||
tSkinConfiguration.InputOverlayText = colour;
|
||||
}
|
||||
}
|
||||
|
||||
protected KeyValuePair<string, string> SplitKeyVal(string line, char separator = ':', bool shouldTrim = true)
|
||||
|
|
|
@ -311,7 +311,7 @@ protected override void ParseConfigurationStream(Stream stream)
|
|||
return SkinUtils.As<TValue>(new Bindable<decimal>(Configuration.LegacyVersion ?? SkinConfiguration.LATEST_VERSION));
|
||||
|
||||
case SkinConfiguration.LegacySetting.InputOverlayText:
|
||||
return SkinUtils.As<TValue>(new Bindable<Colour4>(Configuration.InputOverlayText ?? Colour4.White));
|
||||
return SkinUtils.As<TValue>(new Bindable<Colour4>(Configuration.CustomColours.TryGetValue(@"InputOverlayText", out var colour) ? colour : Colour4.Black));
|
||||
|
||||
default:
|
||||
return genericLookup<SkinConfiguration.LegacySetting, TValue>(legacySetting);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
using osuTK.Graphics;
|
||||
|
||||
|
@ -42,8 +41,6 @@ public enum LegacySetting
|
|||
InputOverlayText,
|
||||
}
|
||||
|
||||
public Colour4? InputOverlayText { get; internal set; }
|
||||
|
||||
public static List<Color4> DefaultComboColours { get; } = new List<Color4>
|
||||
{
|
||||
new Color4(255, 192, 0, 255),
|
||||
|
|
Loading…
Reference in New Issue