1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

Simplify input overlay text colour decode (and fix incorrect default)

This commit is contained in:
Bartłomiej Dach 2024-07-24 14:49:23 +02:00
parent 087dd759be
commit 3c28c116ca
No known key found for this signature in database
3 changed files with 1 additions and 14 deletions

View File

@ -9,7 +9,6 @@ using osu.Game.Audio;
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 @@ namespace osu.Game.Beatmaps.Formats
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)

View File

@ -311,7 +311,7 @@ namespace osu.Game.Skinning
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);

View File

@ -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 @@ namespace osu.Game.Skinning
InputOverlayText,
}
public Colour4? InputOverlayText { get; internal set; }
public static List<Color4> DefaultComboColours { get; } = new List<Color4>
{
new Color4(255, 192, 0, 255),