1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 02:03:01 +08:00

Fix remaining issues

This commit is contained in:
Dean Herbert 2019-02-28 13:31:40 +09:00
parent 3e1f283281
commit 26d53d06a9
241 changed files with 673 additions and 330 deletions

View File

@ -34,13 +34,16 @@ namespace osu.Game.Rulesets.Catch.Tests
case JuiceStream stream: case JuiceStream stream:
foreach (var nested in stream.NestedHitObjects) foreach (var nested in stream.NestedHitObjects)
yield return new ConvertValue((CatchHitObject)nested); yield return new ConvertValue((CatchHitObject)nested);
break; break;
case BananaShower shower: case BananaShower shower:
foreach (var nested in shower.NestedHitObjects) foreach (var nested in shower.NestedHitObjects)
yield return new ConvertValue((CatchHitObject)nested); yield return new ConvertValue((CatchHitObject)nested);
break; break;
default: default:
yield return new ConvertValue((CatchHitObject)hitObject); yield return new ConvertValue((CatchHitObject)hitObject);
break; break;
} }
} }

View File

@ -8,7 +8,8 @@ namespace osu.Game.Rulesets.Catch.Tests
[TestFixture] [TestFixture]
public class TestCaseCatchPlayer : Game.Tests.Visual.TestCasePlayer public class TestCaseCatchPlayer : Game.Tests.Visual.TestCasePlayer
{ {
public TestCaseCatchPlayer() : base(new CatchRuleset()) public TestCaseCatchPlayer()
: base(new CatchRuleset())
{ {
} }
} }

View File

@ -56,6 +56,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
rng.Next(); // osu!stable retrieved a random banana rotation rng.Next(); // osu!stable retrieved a random banana rotation
rng.Next(); // osu!stable retrieved a random banana colour rng.Next(); // osu!stable retrieved a random banana colour
} }
break; break;
case JuiceStream juiceStream: case JuiceStream juiceStream:
foreach (var nested in juiceStream.NestedHitObjects) foreach (var nested in juiceStream.NestedHitObjects)
@ -67,6 +68,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
rng.Next(); // osu!stable retrieved a random droplet rotation rng.Next(); // osu!stable retrieved a random droplet rotation
hitObject.X = MathHelper.Clamp(hitObject.X, 0, 1); hitObject.X = MathHelper.Clamp(hitObject.X, 0, 1);
} }
break; break;
} }
} }

View File

@ -19,8 +19,10 @@ namespace osu.Game.Rulesets.Catch
{ {
[Description("Move left")] [Description("Move left")]
MoveLeft, MoveLeft,
[Description("Move right")] [Description("Move right")]
MoveRight, MoveRight,
[Description("Engage dash")] [Description("Engage dash")]
Dash, Dash,
} }

View File

@ -68,14 +68,17 @@ namespace osu.Game.Rulesets.Catch.Difficulty
// We want to only consider fruits that contribute to the combo. Droplets are addressed as accuracy and spinners are not relevant for "skill" calculations. // We want to only consider fruits that contribute to the combo. Droplets are addressed as accuracy and spinners are not relevant for "skill" calculations.
case Fruit fruit: case Fruit fruit:
yield return new CatchDifficultyHitObject(fruit, lastObject, clockRate, halfCatchWidth); yield return new CatchDifficultyHitObject(fruit, lastObject, clockRate, halfCatchWidth);
lastObject = hitObject; lastObject = hitObject;
break; break;
case JuiceStream _: case JuiceStream _:
foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>().Where(o => !(o is TinyDroplet))) foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>().Where(o => !(o is TinyDroplet)))
{ {
yield return new CatchDifficultyHitObject(nested, lastObject, clockRate, halfCatchWidth); yield return new CatchDifficultyHitObject(nested, lastObject, clockRate, halfCatchWidth);
lastObject = nested; lastObject = nested;
} }
break; break;
} }
} }

View File

@ -33,11 +33,11 @@ namespace osu.Game.Rulesets.Catch.MathUtils
/// <returns>The random value.</returns> /// <returns>The random value.</returns>
public uint NextUInt() public uint NextUInt()
{ {
uint t = _x ^ _x << 11; uint t = _x ^ (_x << 11);
_x = _y; _x = _y;
_y = _z; _y = _z;
_z = _w; _z = _w;
return _w = _w ^ _w >> 19 ^ t ^ t >> 8; return _w = _w ^ (_w >> 19) ^ t ^ (t >> 8);
} }
/// <summary> /// <summary>

View File

@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable.Pieces
} }
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get { return accentColour; }

View File

@ -40,29 +40,29 @@ namespace osu.Game.Rulesets.Mania.Tests
protected override Ruleset CreateRuleset() => new ManiaRuleset(); protected override Ruleset CreateRuleset() => new ManiaRuleset();
} }
public class ManiaConvertMapping : ConvertMapping<ConvertValue>, IEquatable<ManiaConvertMapping> public class ManiaConvertMapping : ConvertMapping<ConvertValue>, IEquatable<ManiaConvertMapping>
{ {
public uint RandomW; public uint RandomW;
public uint RandomX; public uint RandomX;
public uint RandomY; public uint RandomY;
public uint RandomZ; public uint RandomZ;
public ManiaConvertMapping() public ManiaConvertMapping()
{ {
} }
public ManiaConvertMapping(IBeatmapConverter converter) public ManiaConvertMapping(IBeatmapConverter converter)
{ {
var maniaConverter = (ManiaBeatmapConverter)converter; var maniaConverter = (ManiaBeatmapConverter)converter;
RandomW = maniaConverter.Random.W; RandomW = maniaConverter.Random.W;
RandomX = maniaConverter.Random.X; RandomX = maniaConverter.Random.X;
RandomY = maniaConverter.Random.Y; RandomY = maniaConverter.Random.Y;
RandomZ = maniaConverter.Random.Z; RandomZ = maniaConverter.Random.Z;
} }
public bool Equals(ManiaConvertMapping other) => other != null && RandomW == other.RandomW && RandomX == other.RandomX && RandomY == other.RandomY && RandomZ == other.RandomZ; public bool Equals(ManiaConvertMapping other) => other != null && RandomW == other.RandomW && RandomX == other.RandomX && RandomY == other.RandomY && RandomZ == other.RandomZ;
public override bool Equals(ConvertMapping<ConvertValue> other) => base.Equals(other) && Equals(other as ManiaConvertMapping); public override bool Equals(ConvertMapping<ConvertValue> other) => base.Equals(other) && Equals(other as ManiaConvertMapping);
} }
public struct ConvertValue : IEquatable<ConvertValue> public struct ConvertValue : IEquatable<ConvertValue>
{ {

View File

@ -78,6 +78,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
if (maniaOriginal != null) if (maniaOriginal != null)
{ {
yield return maniaOriginal; yield return maniaOriginal;
yield break; yield break;
} }
@ -92,6 +93,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
private readonly List<double> prevNoteTimes = new List<double>(max_notes_for_density); private readonly List<double> prevNoteTimes = new List<double>(max_notes_for_density);
private double density = int.MaxValue; private double density = int.MaxValue;
private void computeDensity(double newNoteTime) private void computeDensity(double newNoteTime)
{ {
if (prevNoteTimes.Count == max_notes_for_density) if (prevNoteTimes.Count == max_notes_for_density)
@ -104,6 +106,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
private double lastTime; private double lastTime;
private Vector2 lastPosition; private Vector2 lastPosition;
private PatternType lastStair = PatternType.Stair; private PatternType lastStair = PatternType.Stair;
private void recordNote(double time, Vector2 position) private void recordNote(double time, Vector2 position)
{ {
lastTime = time; lastTime = time;

View File

@ -65,6 +65,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
if (originalPattern.HitObjects.Count() == 1) if (originalPattern.HitObjects.Count() == 1)
{ {
yield return originalPattern; yield return originalPattern;
yield break; yield break;
} }
@ -135,6 +136,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
{ {
if (convertType.HasFlag(PatternType.LowProbability)) if (convertType.HasFlag(PatternType.LowProbability))
return generateNRandomNotes(HitObject.StartTime, 0.78, 0.3, 0); return generateNRandomNotes(HitObject.StartTime, 0.78, 0.3, 0);
return generateNRandomNotes(HitObject.StartTime, 0.85, 0.36, 0.03); return generateNRandomNotes(HitObject.StartTime, 0.85, 0.36, 0.03);
} }
@ -142,6 +144,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
{ {
if (convertType.HasFlag(PatternType.LowProbability)) if (convertType.HasFlag(PatternType.LowProbability))
return generateNRandomNotes(HitObject.StartTime, 0.43, 0.08, 0); return generateNRandomNotes(HitObject.StartTime, 0.43, 0.08, 0);
return generateNRandomNotes(HitObject.StartTime, 0.56, 0.18, 0); return generateNRandomNotes(HitObject.StartTime, 0.56, 0.18, 0);
} }
@ -149,11 +152,13 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
{ {
if (convertType.HasFlag(PatternType.LowProbability)) if (convertType.HasFlag(PatternType.LowProbability))
return generateNRandomNotes(HitObject.StartTime, 0.3, 0, 0); return generateNRandomNotes(HitObject.StartTime, 0.3, 0, 0);
return generateNRandomNotes(HitObject.StartTime, 0.37, 0.08, 0); return generateNRandomNotes(HitObject.StartTime, 0.37, 0.08, 0);
} }
if (convertType.HasFlag(PatternType.LowProbability)) if (convertType.HasFlag(PatternType.LowProbability))
return generateNRandomNotes(HitObject.StartTime, 0.17, 0, 0); return generateNRandomNotes(HitObject.StartTime, 0.17, 0, 0);
return generateNRandomNotes(HitObject.StartTime, 0.27, 0, 0); return generateNRandomNotes(HitObject.StartTime, 0.27, 0, 0);
} }

View File

@ -116,10 +116,10 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
} }
if (convertType.HasFlag(PatternType.Cycle) && PreviousPattern.HitObjects.Count() == 1 if (convertType.HasFlag(PatternType.Cycle) && PreviousPattern.HitObjects.Count() == 1
// If we convert to 7K + 1, let's not overload the special key // If we convert to 7K + 1, let's not overload the special key
&& (TotalColumns != 8 || lastColumn != 0) && (TotalColumns != 8 || lastColumn != 0)
// Make sure the last column was not the centre column // Make sure the last column was not the centre column
&& (TotalColumns % 2 == 0 || lastColumn != TotalColumns / 2)) && (TotalColumns % 2 == 0 || lastColumn != TotalColumns / 2))
{ {
// Generate a new pattern by cycling backwards (similar to Reverse but for only one hit object) // Generate a new pattern by cycling backwards (similar to Reverse but for only one hit object)
int column = RandomStart + TotalColumns - lastColumn - 1; int column = RandomStart + TotalColumns - lastColumn - 1;
@ -172,6 +172,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
return pattern = generateRandomPatternWithMirrored(0.12, 0.38, 0.12); return pattern = generateRandomPatternWithMirrored(0.12, 0.38, 0.12);
if (ConversionDifficulty > 4) if (ConversionDifficulty > 4)
return pattern = generateRandomPatternWithMirrored(0.12, 0.17, 0); return pattern = generateRandomPatternWithMirrored(0.12, 0.17, 0);
return pattern = generateRandomPatternWithMirrored(0.12, 0, 0); return pattern = generateRandomPatternWithMirrored(0.12, 0, 0);
} }
@ -179,6 +180,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
{ {
if (convertType.HasFlag(PatternType.LowProbability)) if (convertType.HasFlag(PatternType.LowProbability))
return pattern = generateRandomPattern(0.78, 0.42, 0, 0); return pattern = generateRandomPattern(0.78, 0.42, 0, 0);
return pattern = generateRandomPattern(1, 0.62, 0, 0); return pattern = generateRandomPattern(1, 0.62, 0, 0);
} }
@ -186,6 +188,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
{ {
if (convertType.HasFlag(PatternType.LowProbability)) if (convertType.HasFlag(PatternType.LowProbability))
return pattern = generateRandomPattern(0.35, 0.08, 0, 0); return pattern = generateRandomPattern(0.35, 0.08, 0, 0);
return pattern = generateRandomPattern(0.52, 0.15, 0, 0); return pattern = generateRandomPattern(0.52, 0.15, 0, 0);
} }
@ -193,6 +196,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
{ {
if (convertType.HasFlag(PatternType.LowProbability)) if (convertType.HasFlag(PatternType.LowProbability))
return pattern = generateRandomPattern(0.18, 0, 0, 0); return pattern = generateRandomPattern(0.18, 0, 0, 0);
return pattern = generateRandomPattern(0.45, 0, 0, 0); return pattern = generateRandomPattern(0.45, 0, 0, 0);
} }
@ -250,6 +254,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
} }
else else
last = GetRandomColumn(); last = GetRandomColumn();
return last; return last;
} }
} }

View File

@ -87,6 +87,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
return 4; return 4;
if (val >= 1 - p3) if (val >= 1 - p3)
return 3; return 3;
return val >= 1 - p2 ? 2 : 1; return val >= 1 - p2 ? 2 : 1;
} }

View File

@ -12,51 +12,63 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
internal enum PatternType internal enum PatternType
{ {
None = 0, None = 0,
/// <summary> /// <summary>
/// Keep the same as last row. /// Keep the same as last row.
/// </summary> /// </summary>
ForceStack = 1 << 0, ForceStack = 1 << 0,
/// <summary> /// <summary>
/// Keep different from last row. /// Keep different from last row.
/// </summary> /// </summary>
ForceNotStack = 1 << 1, ForceNotStack = 1 << 1,
/// <summary> /// <summary>
/// Keep as single note at its original position. /// Keep as single note at its original position.
/// </summary> /// </summary>
KeepSingle = 1 << 2, KeepSingle = 1 << 2,
/// <summary> /// <summary>
/// Use a lower random value. /// Use a lower random value.
/// </summary> /// </summary>
LowProbability = 1 << 3, LowProbability = 1 << 3,
/// <summary> /// <summary>
/// Reserved. /// Reserved.
/// </summary> /// </summary>
Alternate = 1 << 4, Alternate = 1 << 4,
/// <summary> /// <summary>
/// Ignore the repeat count. /// Ignore the repeat count.
/// </summary> /// </summary>
ForceSigSlider = 1 << 5, ForceSigSlider = 1 << 5,
/// <summary> /// <summary>
/// Convert slider to circle. /// Convert slider to circle.
/// </summary> /// </summary>
ForceNotSlider = 1 << 6, ForceNotSlider = 1 << 6,
/// <summary> /// <summary>
/// Notes gathered together. /// Notes gathered together.
/// </summary> /// </summary>
Gathered = 1 << 7, Gathered = 1 << 7,
Mirror = 1 << 8, Mirror = 1 << 8,
/// <summary> /// <summary>
/// Change 0 -> 6. /// Change 0 -> 6.
/// </summary> /// </summary>
Reverse = 1 << 9, Reverse = 1 << 9,
/// <summary> /// <summary>
/// 1 -> 5 -> 1 -> 5 like reverse. /// 1 -> 5 -> 1 -> 5 like reverse.
/// </summary> /// </summary>
Cycle = 1 << 10, Cycle = 1 << 10,
/// <summary> /// <summary>
/// Next note will be at column + 1. /// Next note will be at column + 1.
/// </summary> /// </summary>
Stair = 1 << 11, Stair = 1 << 11,
/// <summary> /// <summary>
/// Next note will be at column - 1. /// Next note will be at column - 1.
/// </summary> /// </summary>

View File

@ -114,8 +114,8 @@ namespace osu.Game.Rulesets.Mania.Difficulty
// Lots of arbitrary values from testing. // Lots of arbitrary values from testing.
// Considering to use derivation from perfect accuracy in a probabilistic manner - assume normal distribution // Considering to use derivation from perfect accuracy in a probabilistic manner - assume normal distribution
double accuracyValue = Math.Max(0.0, 0.2 - (Attributes.GreatHitWindow - 34) * 0.006667) double accuracyValue = Math.Max(0.0, 0.2 - (Attributes.GreatHitWindow - 34) * 0.006667)
* strainValue * strainValue
* Math.Pow(Math.Max(0.0, scaledScore - 960000) / 40000, 1.1); * Math.Pow(Math.Max(0.0, scaledScore - 960000) / 40000, 1.1);
// Bonus for many hitcircles - it's harder to keep good accuracy up for longer // Bonus for many hitcircles - it's harder to keep good accuracy up for longer
// accuracyValue *= Math.Min(1.15, Math.Pow(totalHits / 1500.0, 0.3)); // accuracyValue *= Math.Min(1.15, Math.Pow(totalHits / 1500.0, 0.3));

View File

@ -19,6 +19,7 @@ namespace osu.Game.Rulesets.Mania
{ {
[Description("Special 1")] [Description("Special 1")]
Special1 = 1, Special1 = 1,
[Description("Special 2")] [Description("Special 2")]
Special2, Special2,
@ -26,38 +27,55 @@ namespace osu.Game.Rulesets.Mania
// above at a later time, without breaking replays/configs. // above at a later time, without breaking replays/configs.
[Description("Key 1")] [Description("Key 1")]
Key1 = 10, Key1 = 10,
[Description("Key 2")] [Description("Key 2")]
Key2, Key2,
[Description("Key 3")] [Description("Key 3")]
Key3, Key3,
[Description("Key 4")] [Description("Key 4")]
Key4, Key4,
[Description("Key 5")] [Description("Key 5")]
Key5, Key5,
[Description("Key 6")] [Description("Key 6")]
Key6, Key6,
[Description("Key 7")] [Description("Key 7")]
Key7, Key7,
[Description("Key 8")] [Description("Key 8")]
Key8, Key8,
[Description("Key 9")] [Description("Key 9")]
Key9, Key9,
[Description("Key 10")] [Description("Key 10")]
Key10, Key10,
[Description("Key 11")] [Description("Key 11")]
Key11, Key11,
[Description("Key 12")] [Description("Key 12")]
Key12, Key12,
[Description("Key 13")] [Description("Key 13")]
Key13, Key13,
[Description("Key 14")] [Description("Key 14")]
Key14, Key14,
[Description("Key 15")] [Description("Key 15")]
Key15, Key15,
[Description("Key 16")] [Description("Key 16")]
Key16, Key16,
[Description("Key 17")] [Description("Key 17")]
Key17, Key17,
[Description("Key 18")] [Description("Key 18")]
Key18, Key18,
} }

View File

@ -37,11 +37,11 @@ namespace osu.Game.Rulesets.Mania.MathUtils
/// <returns>The random value.</returns> /// <returns>The random value.</returns>
public uint NextUInt() public uint NextUInt()
{ {
uint t = X ^ X << 11; uint t = X ^ (X << 11);
X = Y; X = Y;
Y = Z; Y = Z;
Z = W; Z = W;
return W = W ^ W >> 19 ^ t ^ t >> 8; return W = W ^ (W >> 19) ^ t ^ (t >> 8);
} }
/// <summary> /// <summary>

View File

@ -82,6 +82,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
{ {
if (accentColour == value) if (accentColour == value)
return; return;
accentColour = value; accentColour = value;
updateAccentColour(); updateAccentColour();

View File

@ -35,6 +35,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
} }
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get { return accentColour; }
@ -42,6 +43,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
{ {
if (accentColour == value) if (accentColour == value)
return; return;
accentColour = value; accentColour = value;
updateGlow(); updateGlow();

View File

@ -56,6 +56,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
} }
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get { return accentColour; }
@ -63,6 +64,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
{ {
if (accentColour == value) if (accentColour == value)
return; return;
accentColour = value; accentColour = value;
colouredBox.Colour = AccentColour.Lighten(0.9f); colouredBox.Colour = AccentColour.Lighten(0.9f);

View File

@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Mania.Objects
public double EndTime => StartTime + Duration; public double EndTime => StartTime + Duration;
private double duration; private double duration;
public double Duration public double Duration
{ {
get { return duration; } get { return duration; }

View File

@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Mania.Objects
private static readonly IReadOnlyDictionary<HitResult, (double od0, double od5, double od10)> base_ranges = new Dictionary<HitResult, (double, double, double)> private static readonly IReadOnlyDictionary<HitResult, (double od0, double od5, double od10)> base_ranges = new Dictionary<HitResult, (double, double, double)>
{ {
{ HitResult.Perfect, (44.8, 38.8, 27.8) }, { HitResult.Perfect, (44.8, 38.8, 27.8) },
{ HitResult.Great, (128, 98, 68 ) }, { HitResult.Great, (128, 98, 68) },
{ HitResult.Good, (194, 164, 134) }, { HitResult.Good, (194, 164, 134) },
{ HitResult.Ok, (254, 224, 194) }, { HitResult.Ok, (254, 224, 194) },
{ HitResult.Meh, (302, 272, 242) }, { HitResult.Meh, (302, 272, 242) },

View File

@ -97,6 +97,7 @@ namespace osu.Game.Rulesets.Mania.UI
public override Axes RelativeSizeAxes => Axes.Y; public override Axes RelativeSizeAxes => Axes.Y;
private bool isSpecial; private bool isSpecial;
public bool IsSpecial public bool IsSpecial
{ {
get { return isSpecial; } get { return isSpecial; }
@ -104,6 +105,7 @@ namespace osu.Game.Rulesets.Mania.UI
{ {
if (isSpecial == value) if (isSpecial == value)
return; return;
isSpecial = value; isSpecial = value;
Width = isSpecial ? special_column_width : column_width; Width = isSpecial ? special_column_width : column_width;
@ -111,6 +113,7 @@ namespace osu.Game.Rulesets.Mania.UI
} }
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get { return accentColour; }
@ -118,6 +121,7 @@ namespace osu.Game.Rulesets.Mania.UI
{ {
if (accentColour == value) if (accentColour == value)
return; return;
accentColour = value; accentColour = value;
background.AccentColour = value; background.AccentColour = value;

View File

@ -70,6 +70,7 @@ namespace osu.Game.Rulesets.Mania.UI.Components
{ {
if (accentColour == value) if (accentColour == value)
return; return;
accentColour = value; accentColour = value;
updateColours(); updateColours();

View File

@ -73,6 +73,7 @@ namespace osu.Game.Rulesets.Mania.UI.Components
{ {
if (accentColour == value) if (accentColour == value)
return; return;
accentColour = value; accentColour = value;
updateColours(); updateColours();

View File

@ -87,6 +87,7 @@ namespace osu.Game.Rulesets.Mania.UI.Components
{ {
if (accentColour == value) if (accentColour == value)
return; return;
accentColour = value; accentColour = value;
updateColours(); updateColours();

View File

@ -33,9 +33,11 @@ namespace osu.Game.Rulesets.Osu.Tests
case Slider slider: case Slider slider:
foreach (var nested in slider.NestedHitObjects) foreach (var nested in slider.NestedHitObjects)
yield return createConvertValue(nested); yield return createConvertValue(nested);
break; break;
default: default:
yield return createConvertValue(hitObject); yield return createConvertValue(hitObject);
break; break;
} }

View File

@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Osu.Tests
{ {
private GameplayCursor cursor; private GameplayCursor cursor;
public override IReadOnlyList<Type> RequiredTypes => new [] { typeof(CursorTrail) }; public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(CursorTrail) };
public CursorContainer Cursor => cursor; public CursorContainer Cursor => cursor;

View File

@ -89,7 +89,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{ {
private readonly bool auto; private readonly bool auto;
public TestDrawableHitCircle(HitCircle h, bool auto) : base(h) public TestDrawableHitCircle(HitCircle h, bool auto)
: base(h)
{ {
this.auto = auto; this.auto = auto;
} }

View File

@ -301,6 +301,7 @@ namespace osu.Game.Rulesets.Osu.Tests
} }
private float judgementOffsetDirection = 1; private float judgementOffsetDirection = 1;
private void onNewResult(DrawableHitObject judgedObject, JudgementResult result) private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)
{ {
var osuObject = judgedObject as DrawableOsuHitObject; var osuObject = judgedObject as DrawableOsuHitObject;

View File

@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Osu.Tests
public class TestCaseSpinner : OsuTestCase public class TestCaseSpinner : OsuTestCase
{ {
public override IReadOnlyList<Type> RequiredTypes => new[] public override IReadOnlyList<Type> RequiredTypes => new[]
{ {
typeof(SpinnerDisc), typeof(SpinnerDisc),
typeof(DrawableSpinner), typeof(DrawableSpinner),
typeof(DrawableOsuHitObject) typeof(DrawableOsuHitObject)
@ -67,7 +67,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{ {
private bool auto; private bool auto;
public TestDrawableSpinner(Spinner s, bool auto) : base(s) public TestDrawableSpinner(Spinner s, bool auto)
: base(s)
{ {
this.auto = auto; this.auto = auto;
} }

View File

@ -97,7 +97,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
// Longer maps are worth more // Longer maps are worth more
double lengthBonus = 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) + double lengthBonus = 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) +
(totalHits > 2000 ? Math.Log10(totalHits / 2000.0f) * 0.5f : 0.0f); (totalHits > 2000 ? Math.Log10(totalHits / 2000.0f) * 0.5f : 0.0f);
aimValue *= lengthBonus; aimValue *= lengthBonus;
@ -113,7 +113,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
approachRateFactor += 0.3f * (Attributes.ApproachRate - 10.33f); approachRateFactor += 0.3f * (Attributes.ApproachRate - 10.33f);
else if (Attributes.ApproachRate < 8.0f) else if (Attributes.ApproachRate < 8.0f)
{ {
approachRateFactor += 0.01f * (8.0f - Attributes.ApproachRate); approachRateFactor += 0.01f * (8.0f - Attributes.ApproachRate);
} }
aimValue *= approachRateFactor; aimValue *= approachRateFactor;
@ -126,8 +126,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty
{ {
// Apply object-based bonus for flashlight. // Apply object-based bonus for flashlight.
aimValue *= 1.0f + 0.35f * Math.Min(1.0f, totalHits / 200.0f) + aimValue *= 1.0f + 0.35f * Math.Min(1.0f, totalHits / 200.0f) +
(totalHits > 200 ? 0.3f * Math.Min(1.0f, (totalHits - 200) / 300.0f) + (totalHits > 200
(totalHits > 500 ? (totalHits - 500) / 1200.0f : 0.0f) : 0.0f); ? 0.3f * Math.Min(1.0f, (totalHits - 200) / 300.0f) +
(totalHits > 500 ? (totalHits - 500) / 1200.0f : 0.0f)
: 0.0f);
} }
// Scale the aim value with accuracy _slightly_ // Scale the aim value with accuracy _slightly_
@ -144,7 +146,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
// Longer maps are worth more // Longer maps are worth more
speedValue *= 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) + speedValue *= 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) +
(totalHits > 2000 ? Math.Log10(totalHits / 2000.0f) * 0.5f : 0.0f); (totalHits > 2000 ? Math.Log10(totalHits / 2000.0f) * 0.5f : 0.0f);
// Penalize misses exponentially. This mainly fixes tag4 maps and the likes until a per-hitobject solution is available // Penalize misses exponentially. This mainly fixes tag4 maps and the likes until a per-hitobject solution is available
speedValue *= Math.Pow(0.97f, countMiss); speedValue *= Math.Pow(0.97f, countMiss);

View File

@ -92,6 +92,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
{ {
if (slider.LazyEndPosition != null) if (slider.LazyEndPosition != null)
return; return;
slider.LazyEndPosition = slider.StackedPosition; slider.LazyEndPosition = slider.StackedPosition;
float approxFollowCircleRadius = (float)(slider.Radius * 3); float approxFollowCircleRadius = (float)(slider.Radius * 3);

View File

@ -9,8 +9,10 @@ namespace osu.Game.Rulesets.Osu.Judgements
{ {
[Description(@"")] [Description(@"")]
None, None,
[Description(@"Good")] [Description(@"Good")]
Good, Good,
[Description(@"Amazing")] [Description(@"Amazing")]
Perfect Perfect
} }

View File

@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.Mods
{ {
foreach (var drawable in drawables) foreach (var drawable in drawables)
{ {
var hitObject = (OsuHitObject) drawable.HitObject; var hitObject = (OsuHitObject)drawable.HitObject;
float appearDistance = (float)(hitObject.TimePreempt - hitObject.TimeFadeIn) / 2; float appearDistance = (float)(hitObject.TimePreempt - hitObject.TimeFadeIn) / 2;
@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Mods
.MoveTo(originalPosition, moveDuration, Easing.InOutSine); .MoveTo(originalPosition, moveDuration, Easing.InOutSine);
} }
theta += (float) hitObject.TimeFadeIn / 1000; theta += (float)hitObject.TimeFadeIn / 1000;
} }
} }
} }

View File

@ -20,7 +20,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public override bool DisplayResult => false; public override bool DisplayResult => false;
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick) public DrawableSliderTick(SliderTick sliderTick)
: base(sliderTick)
{ {
Size = new Vector2(16) * sliderTick.Scale; Size = new Vector2(16) * sliderTick.Scale;
Origin = Anchor.Centre; Origin = Anchor.Centre;

View File

@ -42,7 +42,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
private Color4 normalColour; private Color4 normalColour;
private Color4 completeColour; private Color4 completeColour;
public DrawableSpinner(Spinner s) : base(s) public DrawableSpinner(Spinner s)
: base(s)
{ {
Origin = Anchor.Centre; Origin = Anchor.Centre;
Position = s.Position; Position = s.Position;

View File

@ -40,6 +40,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
if (path.AccentColour == value) if (path.AccentColour == value)
return; return;
path.AccentColour = value; path.AccentColour = value;
container.ForceRedraw(); container.ForceRedraw();
@ -56,6 +57,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
if (path.BorderColour == value) if (path.BorderColour == value)
return; return;
path.BorderColour = value; path.BorderColour = value;
container.ForceRedraw(); container.ForceRedraw();
@ -105,6 +107,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
if (borderColour == value) if (borderColour == value)
return; return;
borderColour = value; borderColour = value;
InvalidateTexture(); InvalidateTexture();
@ -120,6 +123,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
if (accentColour == value) if (accentColour == value)
return; return;
accentColour = value; accentColour = value;
InvalidateTexture(); InvalidateTexture();

View File

@ -43,12 +43,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true; public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
private bool tracking; private bool tracking;
public bool Tracking public bool Tracking
{ {
get { return tracking; } get { return tracking; }
set set
{ {
if (value == tracking) return; if (value == tracking) return;
tracking = value; tracking = value;
background.FadeTo(tracking ? tracking_alpha : idle_alpha, 100); background.FadeTo(tracking ? tracking_alpha : idle_alpha, 100);
@ -56,12 +58,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
} }
private bool complete; private bool complete;
public bool Complete public bool Complete
{ {
get { return complete; } get { return complete; }
set set
{ {
if (value == complete) return; if (value == complete) return;
complete = value; complete = value;
updateCompleteTick(); updateCompleteTick();

View File

@ -45,6 +45,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private set private set
{ {
if (value == spm) return; if (value == spm) return;
spm = value; spm = value;
spmText.Text = Math.Truncate(value).ToString(@"#0"); spmText.Text = Math.Truncate(value).ToString(@"#0");
} }

View File

@ -262,6 +262,7 @@ namespace osu.Game.Rulesets.Osu.Objects
{ {
if (nodeIndex < NodeSamples.Count) if (nodeIndex < NodeSamples.Count)
return NodeSamples[nodeIndex]; return NodeSamples[nodeIndex];
return Samples; return Samples;
} }

View File

@ -38,6 +38,7 @@ namespace osu.Game.Rulesets.Osu
protected override bool Handle(UIEvent e) protected override bool Handle(UIEvent e)
{ {
if (!AllowUserPresses) return false; if (!AllowUserPresses) return false;
return base.Handle(e); return base.Handle(e);
} }
} }

View File

@ -121,7 +121,8 @@ namespace osu.Game.Rulesets.Osu
new OsuModAutopilot(), new OsuModAutopilot(),
}; };
case ModType.Fun: case ModType.Fun:
return new Mod[] { return new Mod[]
{
new OsuModTransform(), new OsuModTransform(),
new OsuModWiggle(), new OsuModWiggle(),
new OsuModGrow() new OsuModGrow()

View File

@ -209,7 +209,7 @@ namespace osu.Game.Rulesets.Osu.Replays
// Only "snap" to hitcircles if they are far enough apart. As the time between hitcircles gets shorter the snapping threshold goes up. // Only "snap" to hitcircles if they are far enough apart. As the time between hitcircles gets shorter the snapping threshold goes up.
if (timeDifference > 0 && // Sanity checks if (timeDifference > 0 && // Sanity checks
((lastPosition - targetPos).Length > h.Radius * (1.5 + 100.0 / timeDifference) || // Either the distance is big enough ((lastPosition - targetPos).Length > h.Radius * (1.5 + 100.0 / timeDifference) || // Either the distance is big enough
timeDifference >= 266)) // ... or the beats are slow enough to tap anyway. timeDifference >= 266)) // ... or the beats are slow enough to tap anyway.
{ {
// Perform eased movement // Perform eased movement
for (double time = lastFrame.Time + FrameDelay; time < h.StartTime; time += FrameDelay) for (double time = lastFrame.Time + FrameDelay; time < h.StartTime; time += FrameDelay)

View File

@ -20,6 +20,7 @@ namespace osu.Game.Rulesets.Osu.Replays
/// Constants (for spinners). /// Constants (for spinners).
/// </summary> /// </summary>
protected static readonly Vector2 SPINNER_CENTRE = OsuPlayfield.BASE_SIZE / 2; protected static readonly Vector2 SPINNER_CENTRE = OsuPlayfield.BASE_SIZE / 2;
protected const float SPIN_RADIUS = 50; protected const float SPIN_RADIUS = 50;
/// <summary> /// <summary>
@ -46,6 +47,7 @@ namespace osu.Game.Rulesets.Osu.Replays
#endregion #endregion
#region Utilities #region Utilities
protected double ApplyModsToTime(double v) => v; protected double ApplyModsToTime(double v) => v;
protected double ApplyModsToRate(double v) => v; protected double ApplyModsToRate(double v) => v;

View File

@ -255,10 +255,13 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
{ {
[VertexMember(2, VertexAttribPointerType.Float)] [VertexMember(2, VertexAttribPointerType.Float)]
public Vector2 Position; public Vector2 Position;
[VertexMember(4, VertexAttribPointerType.Float)] [VertexMember(4, VertexAttribPointerType.Float)]
public Color4 Colour; public Color4 Colour;
[VertexMember(2, VertexAttribPointerType.Float)] [VertexMember(2, VertexAttribPointerType.Float)]
public Vector2 TexturePosition; public Vector2 TexturePosition;
[VertexMember(1, VertexAttribPointerType.Float)] [VertexMember(1, VertexAttribPointerType.Float)]
public float Time; public float Time;

View File

@ -213,6 +213,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
public void Expand() public void Expand()
{ {
if (!cursorExpand) return; if (!cursorExpand) return;
expandTarget.ScaleTo(released_scale).ScaleTo(pressed_scale, 100, Easing.OutQuad); expandTarget.ScaleTo(released_scale).ScaleTo(pressed_scale, 100, Easing.OutQuad);
} }

View File

@ -229,6 +229,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
// Ensure alternating centre and rim hits // Ensure alternating centre and rim hits
if (lastWasCentre == isCentre) if (lastWasCentre == isCentre)
return false; return false;
lastWasCentre = isCentre; lastWasCentre = isCentre;
UpdateResult(true); UpdateResult(true);

View File

@ -49,6 +49,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
protected void ProxyContent() protected void ProxyContent()
{ {
if (isProxied) return; if (isProxied) return;
isProxied = true; isProxied = true;
nonProxiedContent.Remove(Content); nonProxiedContent.Remove(Content);
@ -62,6 +63,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
protected void UnproxyContent() protected void UnproxyContent()
{ {
if (!isProxied) return; if (!isProxied) return;
isProxied = false; isProxied = false;
proxiedContent.Remove(Content); proxiedContent.Remove(Content);

View File

@ -11,6 +11,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
public class TaikoPiece : BeatSyncedContainer, IHasAccentColour public class TaikoPiece : BeatSyncedContainer, IHasAccentColour
{ {
private Color4 accentColour; private Color4 accentColour;
/// <summary> /// <summary>
/// The colour of the inner circle and outer glows. /// The colour of the inner circle and outer glows.
/// </summary> /// </summary>
@ -21,16 +22,14 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
} }
private bool kiaiMode; private bool kiaiMode;
/// <summary> /// <summary>
/// Whether Kiai mode effects are enabled for this circle piece. /// Whether Kiai mode effects are enabled for this circle piece.
/// </summary> /// </summary>
public virtual bool KiaiMode public virtual bool KiaiMode
{ {
get { return kiaiMode; } get { return kiaiMode; }
set set { kiaiMode = value; }
{
kiaiMode = value;
}
} }
public TaikoPiece() public TaikoPiece()

View File

@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
private const float tick_size = 0.35f; private const float tick_size = 0.35f;
private bool filled; private bool filled;
public bool Filled public bool Filled
{ {
get { return filled; } get { return filled; }

View File

@ -19,7 +19,10 @@ namespace osu.Game.Rulesets.Taiko.Objects
/// </summary> /// </summary>
public int RequiredHits = 10; public int RequiredHits = 10;
public override bool IsStrong { set => throw new NotSupportedException($"{nameof(Swell)} cannot be a strong hitobject."); } public override bool IsStrong
{
set => throw new NotSupportedException($"{nameof(Swell)} cannot be a strong hitobject.");
}
protected override void CreateNestedHitObjects() protected override void CreateNestedHitObjects()
{ {

View File

@ -19,10 +19,13 @@ namespace osu.Game.Rulesets.Taiko
{ {
[Description("Left (rim)")] [Description("Left (rim)")]
LeftRim, LeftRim,
[Description("Left (centre)")] [Description("Left (centre)")]
LeftCentre, LeftCentre,
[Description("Right (centre)")] [Description("Right (centre)")]
RightCentre, RightCentre,
[Description("Right (rim)")] [Description("Right (rim)")]
RightRim RightRim
} }

View File

@ -141,6 +141,7 @@ namespace osu.Game.Tests.Visual
} }
private SortedList<TimingControlPoint> timingPoints => Beatmap.Value.Beatmap.ControlPointInfo.TimingPoints; private SortedList<TimingControlPoint> timingPoints => Beatmap.Value.Beatmap.ControlPointInfo.TimingPoints;
private TimingControlPoint getNextTimingPoint(TimingControlPoint current) private TimingControlPoint getNextTimingPoint(TimingControlPoint current)
{ {
if (timingPoints[timingPoints.Count - 1] == current) if (timingPoints[timingPoints.Count - 1] == current)

View File

@ -150,6 +150,7 @@ namespace osu.Game.Tests.Visual
var currentlySelected = carousel.Items.Find(s => s.Item is CarouselBeatmap && s.Item.State.Value == CarouselItemState.Selected); var currentlySelected = carousel.Items.Find(s => s.Item is CarouselBeatmap && s.Item.State.Value == CarouselItemState.Selected);
if (currentlySelected == null) if (currentlySelected == null)
return true; return true;
return currentlySelected.Item.Visible; return currentlySelected.Item.Visible;
} }
@ -162,11 +163,11 @@ namespace osu.Game.Tests.Visual
private void checkNonmatchingFilter() private void checkNonmatchingFilter()
{ {
AddStep("Toggle non-matching filter", () => AddStep("Toggle non-matching filter", () =>
{ {
carousel.Filter(new FilterCriteria { SearchText = "Dingo" }, false); carousel.Filter(new FilterCriteria { SearchText = "Dingo" }, false);
carousel.Filter(new FilterCriteria(), false); carousel.Filter(new FilterCriteria(), false);
eagerSelectedIDs.Add(carousel.SelectedBeatmapSet.ID); eagerSelectedIDs.Add(carousel.SelectedBeatmapSet.ID);
} }
); );
} }
@ -522,6 +523,7 @@ namespace osu.Game.Tests.Visual
} }
}); });
} }
return toReturn; return toReturn;
} }

View File

@ -56,7 +56,7 @@ namespace osu.Game.Tests.Visual
var chatManager = new ChannelManager(); var chatManager = new ChannelManager();
BindableList<Channel> availableChannels = (BindableList<Channel>)chatManager.AvailableChannels; BindableList<Channel> availableChannels = (BindableList<Channel>)chatManager.AvailableChannels;
availableChannels.Add(new Channel { Name = "#english"}); availableChannels.Add(new Channel { Name = "#english" });
availableChannels.Add(new Channel { Name = "#japanese" }); availableChannels.Add(new Channel { Name = "#japanese" });
Dependencies.Cache(chatManager); Dependencies.Cache(chatManager);

View File

@ -61,10 +61,10 @@ namespace osu.Game.Tests.Visual
// Move box along a square trajectory // Move box along a square trajectory
container.Loop(c => c container.Loop(c => c
.MoveTo(new Vector2(0, 100), duration).Then() .MoveTo(new Vector2(0, 100), duration).Then()
.MoveTo(new Vector2(100, 100), duration).Then() .MoveTo(new Vector2(100, 100), duration).Then()
.MoveTo(new Vector2(100, 0), duration).Then() .MoveTo(new Vector2(100, 0), duration).Then()
.MoveTo(Vector2.Zero, duration) .MoveTo(Vector2.Zero, duration)
); );
} }

View File

@ -33,7 +33,7 @@ namespace osu.Game.Tests.Visual
{ {
TimingPoints = TimingPoints =
{ {
new TimingControlPoint { Time = 0, BeatLength = 200}, new TimingControlPoint { Time = 0, BeatLength = 200 },
new TimingControlPoint { Time = 100, BeatLength = 400 }, new TimingControlPoint { Time = 100, BeatLength = 400 },
new TimingControlPoint { Time = 175, BeatLength = 800 }, new TimingControlPoint { Time = 175, BeatLength = 800 },
new TimingControlPoint { Time = 350, BeatLength = 200 }, new TimingControlPoint { Time = 350, BeatLength = 200 },

View File

@ -265,6 +265,7 @@ namespace osu.Game.Tests.Visual
pauseOverlay.OnRetry = lastAction; pauseOverlay.OnRetry = lastAction;
lastAction = null; lastAction = null;
} }
return triggered; return triggered;
}); });
AddAssert("Overlay is closed", () => pauseOverlay.State == Visibility.Hidden); AddAssert("Overlay is closed", () => pauseOverlay.State == Visibility.Hidden);

View File

@ -20,7 +20,8 @@ namespace osu.Game.Tests.Visual
[Description("PlaySongSelect leaderboard")] [Description("PlaySongSelect leaderboard")]
public class TestCaseLeaderboard : OsuTestCase public class TestCaseLeaderboard : OsuTestCase
{ {
public override IReadOnlyList<Type> RequiredTypes => new[] { public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(Placeholder), typeof(Placeholder),
typeof(MessagePlaceholder), typeof(MessagePlaceholder),
typeof(RetrievalFailurePlaceholder), typeof(RetrievalFailurePlaceholder),

View File

@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Size = new Vector2(200,100) Size = new Vector2(200, 100)
}; };
Beatmap.Value = new TestWorkingBeatmap(new Beatmap(), Clock); Beatmap.Value = new TestWorkingBeatmap(new Beatmap(), Clock);

View File

@ -84,7 +84,7 @@ namespace osu.Game.Tests.Visual
public TestScreen PushNext() public TestScreen PushNext()
{ {
TestScreen screen = CreateNextScreen(); TestScreen screen = CreateNextScreen();
this.Push(screen); this.Push(screen);
return screen; return screen;
} }

View File

@ -50,7 +50,10 @@ namespace osu.Game.Tests.Visual
}); });
AddStep("Restart", restart); AddStep("Restart", restart);
AddToggleStep("Passing", passing => { if (storyboard != null) storyboard.Passing = passing; }); AddToggleStep("Passing", passing =>
{
if (storyboard != null) storyboard.Passing = passing;
});
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -50,12 +50,14 @@ namespace osu.Game.Audio
{ {
if (!string.IsNullOrEmpty(Suffix)) if (!string.IsNullOrEmpty(Suffix))
yield return $"{Namespace}/{Bank}-{Name}{Suffix}"; yield return $"{Namespace}/{Bank}-{Name}{Suffix}";
yield return $"{Namespace}/{Bank}-{Name}"; yield return $"{Namespace}/{Bank}-{Name}";
} }
// check non-namespace as a fallback even when we have a namespace // check non-namespace as a fallback even when we have a namespace
if (!string.IsNullOrEmpty(Suffix)) if (!string.IsNullOrEmpty(Suffix))
yield return $"{Bank}-{Name}{Suffix}"; yield return $"{Bank}-{Name}{Suffix}";
yield return $"{Bank}-{Name}"; yield return $"{Bank}-{Name}";
} }
} }

View File

@ -16,6 +16,7 @@ namespace osu.Game.Beatmaps
where T : HitObject where T : HitObject
{ {
private event Action<HitObject, IEnumerable<HitObject>> ObjectConverted; private event Action<HitObject, IEnumerable<HitObject>> ObjectConverted;
event Action<HitObject, IEnumerable<HitObject>> IBeatmapConverter.ObjectConverted event Action<HitObject, IEnumerable<HitObject>> IBeatmapConverter.ObjectConverted
{ {
add => ObjectConverted += value; add => ObjectConverted += value;

View File

@ -48,6 +48,7 @@ namespace osu.Game.Beatmaps
return mid + (max - mid) * (difficulty - 5) / 5; return mid + (max - mid) * (difficulty - 5) / 5;
if (difficulty < 5) if (difficulty < 5)
return mid - (mid - min) * (5 - difficulty) / 5; return mid - (mid - min) * (5 - difficulty) / 5;
return mid; return mid;
} }

View File

@ -48,6 +48,7 @@ namespace osu.Game.Beatmaps
[JsonProperty(@"tags")] [JsonProperty(@"tags")]
public string Tags { get; set; } public string Tags { get; set; }
public int PreviewTime { get; set; } public int PreviewTime { get; set; }
public string AudioFile { get; set; } public string AudioFile { get; set; }
public string BackgroundFile { get; set; } public string BackgroundFile { get; set; }
@ -72,15 +73,15 @@ namespace osu.Game.Beatmaps
return false; return false;
return Title == other.Title return Title == other.Title
&& TitleUnicode == other.TitleUnicode && TitleUnicode == other.TitleUnicode
&& Artist == other.Artist && Artist == other.Artist
&& ArtistUnicode == other.ArtistUnicode && ArtistUnicode == other.ArtistUnicode
&& AuthorString == other.AuthorString && AuthorString == other.AuthorString
&& Source == other.Source && Source == other.Source
&& Tags == other.Tags && Tags == other.Tags
&& PreviewTime == other.PreviewTime && PreviewTime == other.PreviewTime
&& AudioFile == other.AudioFile && AudioFile == other.AudioFile
&& BackgroundFile == other.BackgroundFile; && BackgroundFile == other.BackgroundFile;
} }
} }
} }

View File

@ -34,6 +34,7 @@ namespace osu.Game.Beatmaps
Refresh(ref beatmap, Beatmaps); Refresh(ref beatmap, Beatmaps);
if (beatmap.Hidden) return false; if (beatmap.Hidden) return false;
beatmap.Hidden = true; beatmap.Hidden = true;
} }
@ -53,6 +54,7 @@ namespace osu.Game.Beatmaps
Refresh(ref beatmap, Beatmaps); Refresh(ref beatmap, Beatmaps);
if (!beatmap.Hidden) return false; if (!beatmap.Hidden) return false;
beatmap.Hidden = false; beatmap.Hidden = false;
} }

View File

@ -13,8 +13,8 @@ namespace osu.Game.Beatmaps.Drawables
public BeatmapBackgroundSprite(WorkingBeatmap working) public BeatmapBackgroundSprite(WorkingBeatmap working)
{ {
if (working == null) if (working == null)
throw new ArgumentNullException(nameof(working)); throw new ArgumentNullException(nameof(working));
this.working = working; this.working = working;
} }

View File

@ -23,6 +23,7 @@ namespace osu.Game.Beatmaps.Drawables
{ {
if (status == value) if (status == value)
return; return;
status = value; status = value;
Alpha = value == BeatmapSetOnlineStatus.None ? 0 : 1; Alpha = value == BeatmapSetOnlineStatus.None ? 0 : 1;

View File

@ -53,6 +53,7 @@ namespace osu.Game.Beatmaps.Drawables
if (rating < 3.75) return DifficultyRating.Hard; if (rating < 3.75) return DifficultyRating.Hard;
if (rating < 5.25) return DifficultyRating.Insane; if (rating < 5.25) return DifficultyRating.Insane;
if (rating < 6.75) return DifficultyRating.Expert; if (rating < 6.75) return DifficultyRating.Expert;
return DifficultyRating.ExpertPlus; return DifficultyRating.ExpertPlus;
} }

View File

@ -25,7 +25,8 @@ namespace osu.Game.Beatmaps.Drawables
protected override Drawable CreateDrawable(BeatmapInfo model) protected override Drawable CreateDrawable(BeatmapInfo model)
{ {
return new DelayedLoadUnloadWrapper(() => { return new DelayedLoadUnloadWrapper(() =>
{
Drawable drawable; Drawable drawable;
var localBeatmap = beatmaps.GetWorkingBeatmap(model); var localBeatmap = beatmaps.GetWorkingBeatmap(model);

View File

@ -13,12 +13,14 @@ namespace osu.Game.Beatmaps.Drawables
private Drawable displayedCover; private Drawable displayedCover;
private BeatmapSetInfo beatmapSet; private BeatmapSetInfo beatmapSet;
public BeatmapSetInfo BeatmapSet public BeatmapSetInfo BeatmapSet
{ {
get { return beatmapSet; } get { return beatmapSet; }
set set
{ {
if (value == beatmapSet) return; if (value == beatmapSet) return;
beatmapSet = value; beatmapSet = value;
if (IsLoaded) if (IsLoaded)
@ -27,12 +29,14 @@ namespace osu.Game.Beatmaps.Drawables
} }
private BeatmapSetCoverType coverType = BeatmapSetCoverType.Cover; private BeatmapSetCoverType coverType = BeatmapSetCoverType.Cover;
public BeatmapSetCoverType CoverType public BeatmapSetCoverType CoverType
{ {
get { return coverType; } get { return coverType; }
set set
{ {
if (value == coverType) return; if (value == coverType) return;
coverType = value; coverType = value;
if (IsLoaded) if (IsLoaded)

View File

@ -72,6 +72,7 @@ namespace osu.Game.Beatmaps.Formats
var index = line.AsSpan().IndexOf("//".AsSpan()); var index = line.AsSpan().IndexOf("//".AsSpan());
if (index > 0) if (index > 0)
return line.Substring(0, index); return line.Substring(0, index);
return line; return line;
} }
@ -115,6 +116,7 @@ namespace osu.Game.Beatmaps.Formats
else else
{ {
if (!(output is IHasCustomColours tHasCustomColours)) return; if (!(output is IHasCustomColours tHasCustomColours)) return;
tHasCustomColours.CustomColours[pair.Key] = colour; tHasCustomColours.CustomColours[pair.Key] = colour;
} }
} }

View File

@ -5,10 +5,11 @@ using System.ComponentModel;
namespace osu.Game.Configuration namespace osu.Game.Configuration
{ {
public enum RandomSelectAlgorithm public enum RandomSelectAlgorithm
{ {
[Description("Never repeat")] [Description("Never repeat")]
RandomPermutation, RandomPermutation,
[Description("Random")] [Description("Random")]
Random Random
} }

View File

@ -8,8 +8,10 @@ namespace osu.Game.Configuration
public enum RankingType public enum RankingType
{ {
Local, Local,
[Description("Global")] [Description("Global")]
Top, Top,
[Description("Selected Mods")] [Description("Selected Mods")]
SelectedMod, SelectedMod,
Friends, Friends,

View File

@ -9,6 +9,7 @@ namespace osu.Game.Configuration
{ {
Off, Off,
Everything, Everything,
[Description("Excluding overlays")] [Description("Excluding overlays")]
ExcludeOverlays, ExcludeOverlays,
Gameplay, Gameplay,

View File

@ -9,6 +9,7 @@ namespace osu.Game.Configuration
{ {
[Description("JPG (web-friendly)")] [Description("JPG (web-friendly)")]
Jpg = 1, Jpg = 1,
[Description("PNG (lossless)")] [Description("PNG (lossless)")]
Png = 2 Png = 2
} }

View File

@ -9,8 +9,10 @@ namespace osu.Game.Configuration
{ {
[Description("Sequential")] [Description("Sequential")]
Sequential, Sequential,
[Description("Overlapping")] [Description("Overlapping")]
Overlapping, Overlapping,
[Description("Constant")] [Description("Constant")]
Constant Constant
} }

View File

@ -539,6 +539,7 @@ namespace osu.Game.Database
return new LegacyDirectoryArchiveReader(path); return new LegacyDirectoryArchiveReader(path);
if (File.Exists(path)) if (File.Exists(path))
return new LegacyFileArchiveReader(path); return new LegacyFileArchiveReader(path);
throw new InvalidFormatException($"{path} is not a valid archive"); throw new InvalidFormatException($"{path} is not a valid archive");
} }
} }

View File

@ -31,6 +31,7 @@ namespace osu.Game.Database
protected void Dispose(bool disposing) protected void Dispose(bool disposing)
{ {
if (isDisposed) return; if (isDisposed) return;
isDisposed = true; isDisposed = true;
try try

View File

@ -71,6 +71,7 @@ namespace osu.Game.Database
Refresh(ref item); Refresh(ref item);
if (item.DeletePending) return false; if (item.DeletePending) return false;
item.DeletePending = true; item.DeletePending = true;
} }
@ -89,6 +90,7 @@ namespace osu.Game.Database
Refresh(ref item, ConsumableItems); Refresh(ref item, ConsumableItems);
if (!item.DeletePending) return false; if (!item.DeletePending) return false;
item.DeletePending = false; item.DeletePending = false;
} }

View File

@ -110,10 +110,10 @@ namespace osu.Game.Graphics.Backgrounds
if (CreateNewTriangles) if (CreateNewTriangles)
addTriangles(false); addTriangles(false);
float adjustedAlpha = HideAlphaDiscrepancies ? float adjustedAlpha = HideAlphaDiscrepancies
// Cubically scale alpha to make it drop off more sharply. // Cubically scale alpha to make it drop off more sharply.
(float)Math.Pow(DrawColourInfo.Colour.AverageColour.Linear.A, 3) : ? (float)Math.Pow(DrawColourInfo.Colour.AverageColour.Linear.A, 3)
1; : 1;
float elapsedSeconds = (float)Time.Elapsed / 1000; float elapsedSeconds = (float)Time.Elapsed / 1000;
// Since position is relative, the velocity needs to scale inversely with DrawHeight. // Since position is relative, the velocity needs to scale inversely with DrawHeight.
@ -181,6 +181,7 @@ namespace osu.Game.Graphics.Backgrounds
protected override DrawNode CreateDrawNode() => new TrianglesDrawNode(); protected override DrawNode CreateDrawNode() => new TrianglesDrawNode();
private readonly TrianglesDrawNodeSharedData sharedData = new TrianglesDrawNodeSharedData(); private readonly TrianglesDrawNodeSharedData sharedData = new TrianglesDrawNodeSharedData();
protected override void ApplyDrawNode(DrawNode node) protected override void ApplyDrawNode(DrawNode node)
{ {
base.ApplyDrawNode(node); base.ApplyDrawNode(node);

View File

@ -96,6 +96,7 @@ namespace osu.Game.Graphics.Containers
} }
else else
State = Visibility.Hidden; State = Visibility.Hidden;
break; break;
case Visibility.Hidden: case Visibility.Hidden:
if (PlaySamplesOnStateChange) samplePopOut?.Play(); if (PlaySamplesOnStateChange) samplePopOut?.Play();

View File

@ -12,7 +12,8 @@ namespace osu.Game.Graphics.Containers
{ {
public class OsuTextFlowContainer : TextFlowContainer public class OsuTextFlowContainer : TextFlowContainer
{ {
public OsuTextFlowContainer(Action<SpriteText> defaultCreationParameters = null) : base(defaultCreationParameters) public OsuTextFlowContainer(Action<SpriteText> defaultCreationParameters = null)
: base(defaultCreationParameters)
{ {
} }

View File

@ -110,6 +110,7 @@ namespace osu.Game.Graphics.Containers
private float headerHeight, footerHeight; private float headerHeight, footerHeight;
private readonly MarginPadding originalSectionsMargin; private readonly MarginPadding originalSectionsMargin;
private void updateSectionsMargin() private void updateSectionsMargin()
{ {
if (!Children.Any()) return; if (!Children.Any()) return;
@ -142,6 +143,7 @@ namespace osu.Game.Graphics.Containers
public void ScrollToTop() => scrollContainer.ScrollTo(0); public void ScrollToTop() => scrollContainer.ScrollTo(0);
private float lastKnownScroll; private float lastKnownScroll;
protected override void UpdateAfterChildren() protected override void UpdateAfterChildren()
{ {
base.UpdateAfterChildren(); base.UpdateAfterChildren();

View File

@ -85,6 +85,7 @@ namespace osu.Game.Graphics.Cursor
dragRotationState = DragRotationState.DragStarted; dragRotationState = DragRotationState.DragStarted;
positionMouseDown = e.MousePosition; positionMouseDown = e.MousePosition;
} }
return base.OnMouseDown(e); return base.OnMouseDown(e);
} }
@ -102,6 +103,7 @@ namespace osu.Game.Graphics.Cursor
activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf); activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf);
dragRotationState = DragRotationState.NotDragging; dragRotationState = DragRotationState.NotDragging;
} }
return base.OnMouseUp(e); return base.OnMouseUp(e);
} }

View File

@ -43,6 +43,7 @@ namespace osu.Game.Graphics.Cursor
} }
private IProvideCursor currentTarget; private IProvideCursor currentTarget;
protected override void Update() protected override void Update()
{ {
base.Update(); base.Update();

View File

@ -17,7 +17,8 @@ namespace osu.Game.Graphics.Cursor
{ {
protected override ITooltip CreateTooltip() => new OsuTooltip(); protected override ITooltip CreateTooltip() => new OsuTooltip();
public OsuTooltipContainer(CursorContainer cursor) : base(cursor) public OsuTooltipContainer(CursorContainer cursor)
: base(cursor)
{ {
} }

View File

@ -21,6 +21,7 @@ namespace osu.Game.Graphics
{ {
if (date == value) if (date == value)
return; return;
date = value.ToLocalTime(); date = value.ToLocalTime();
if (LoadState >= LoadState.Ready) if (LoadState >= LoadState.Ready)

View File

@ -65,6 +65,7 @@ namespace osu.Game.Graphics
} }
private FontAwesome loadedIcon; private FontAwesome loadedIcon;
private void updateTexture() private void updateTexture()
{ {
var loadableIcon = icon; var loadableIcon = icon;
@ -104,6 +105,7 @@ namespace osu.Game.Graphics
} }
private bool shadow; private bool shadow;
public bool Shadow public bool Shadow
{ {
get { return shadow; } get { return shadow; }
@ -119,10 +121,7 @@ namespace osu.Game.Graphics
public FontAwesome Icon public FontAwesome Icon
{ {
get get { return icon; }
{
return icon;
}
set set
{ {

View File

@ -26,10 +26,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public float Length public float Length
{ {
get get { return length; }
{
return length;
}
set set
{ {
length = MathHelper.Clamp(value, 0, 1); length = MathHelper.Clamp(value, 0, 1);
@ -39,35 +36,21 @@ namespace osu.Game.Graphics.UserInterface
public Color4 BackgroundColour public Color4 BackgroundColour
{ {
get get => background.Colour;
{ set => background.Colour = value;
return background.Colour;
}
set
{
background.Colour = value;
}
} }
public Color4 AccentColour public Color4 AccentColour
{ {
get get => bar.Colour;
{ set => bar.Colour = value;
return bar.Colour;
}
set
{
bar.Colour = value;
}
} }
private BarDirection direction = BarDirection.LeftToRight; private BarDirection direction = BarDirection.LeftToRight;
public BarDirection Direction public BarDirection Direction
{ {
get get { return direction; }
{
return direction;
}
set set
{ {
direction = value; direction = value;

View File

@ -17,6 +17,7 @@ namespace osu.Game.Graphics.UserInterface
public float? MaxValue { get; set; } public float? MaxValue { get; set; }
private BarDirection direction = BarDirection.BottomToTop; private BarDirection direction = BarDirection.BottomToTop;
public new BarDirection Direction public new BarDirection Direction
{ {
get get
@ -69,6 +70,7 @@ namespace osu.Game.Graphics.UserInterface
}); });
} }
} }
//I'm using ToList() here because Where() returns an Enumerable which can change it's elements afterwards //I'm using ToList() here because Where() returns an Enumerable which can change it's elements afterwards
RemoveRange(Children.Where((bar, index) => index >= value.Count()).ToList()); RemoveRange(Children.Where((bar, index) => index >= value.Count()).ToList());
} }

View File

@ -61,6 +61,7 @@ namespace osu.Game.Graphics.UserInterface
set set
{ {
if (value == state) return; if (value == state) return;
state = value; state = value;
const float transition_duration = 500; const float transition_duration = 500;
@ -80,7 +81,8 @@ namespace osu.Game.Graphics.UserInterface
} }
} }
public BreadcrumbTabItem(T value) : base(value) public BreadcrumbTabItem(T value)
: base(value)
{ {
Text.Font = Text.Font.With(size: 18); Text.Font = Text.Font.With(size: 18);
Text.Margin = new MarginPadding { Vertical = 8 }; Text.Margin = new MarginPadding { Vertical = 8 };

View File

@ -154,12 +154,10 @@ namespace osu.Game.Graphics.UserInterface
} }
private Color4 buttonColour; private Color4 buttonColour;
public Color4 ButtonColour public Color4 ButtonColour
{ {
get get { return buttonColour; }
{
return buttonColour;
}
set set
{ {
buttonColour = value; buttonColour = value;
@ -169,12 +167,10 @@ namespace osu.Game.Graphics.UserInterface
} }
private Color4 backgroundColour = OsuColour.Gray(34); private Color4 backgroundColour = OsuColour.Gray(34);
public Color4 BackgroundColour public Color4 BackgroundColour
{ {
get get { return backgroundColour; }
{
return backgroundColour;
}
set set
{ {
backgroundColour = value; backgroundColour = value;
@ -183,12 +179,10 @@ namespace osu.Game.Graphics.UserInterface
} }
private string text; private string text;
public string Text public string Text
{ {
get get { return text; }
{
return text;
}
set set
{ {
text = value; text = value;

View File

@ -51,7 +51,7 @@ namespace osu.Game.Graphics.UserInterface
protected override bool OnClick(ClickEvent e) protected override bool OnClick(ClickEvent e)
{ {
if(Link != null) if (Link != null)
host.OpenUrlExternally(Link); host.OpenUrlExternally(Link);
return true; return true;
} }

View File

@ -17,7 +17,8 @@ namespace osu.Game.Graphics.UserInterface
{ {
private SampleChannel sampleClick; private SampleChannel sampleClick;
public HoverClickSounds(HoverSampleSet sampleSet = HoverSampleSet.Normal) : base(sampleSet) public HoverClickSounds(HoverSampleSet sampleSet = HoverSampleSet.Normal)
: base(sampleSet)
{ {
} }

View File

@ -45,8 +45,10 @@ namespace osu.Game.Graphics.UserInterface
{ {
[Description("")] [Description("")]
Loud, Loud,
[Description("-soft")] [Description("-soft")]
Normal, Normal,
[Description("-softer")] [Description("-softer")]
Soft Soft
} }

View File

@ -112,6 +112,7 @@ namespace osu.Game.Graphics.UserInterface
protected float GetYPosition(float value) protected float GetYPosition(float value)
{ {
if (ActualMaxValue == ActualMinValue) return 0; if (ActualMaxValue == ActualMinValue) return 0;
return (ActualMaxValue - value) / (ActualMaxValue - ActualMinValue); return (ActualMaxValue - value) / (ActualMaxValue - ActualMinValue);
} }
} }

View File

@ -72,6 +72,7 @@ namespace osu.Game.Graphics.UserInterface
} }
private bool glowing; private bool glowing;
public bool Glowing public bool Glowing
{ {
get { return glowing; } get { return glowing; }
@ -94,10 +95,7 @@ namespace osu.Game.Graphics.UserInterface
public bool Expanded public bool Expanded
{ {
set set { this.ResizeTo(new Vector2(value ? EXPANDED_SIZE : COLLAPSED_SIZE, 12), 500, Easing.OutQuint); }
{
this.ResizeTo(new Vector2(value ? EXPANDED_SIZE : COLLAPSED_SIZE, 12), 500, Easing.OutQuint);
}
} }
private readonly Bindable<bool> current = new Bindable<bool>(); private readonly Bindable<bool> current = new Bindable<bool>();
@ -116,6 +114,7 @@ namespace osu.Game.Graphics.UserInterface
} }
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get { return accentColour; }
@ -128,6 +127,7 @@ namespace osu.Game.Graphics.UserInterface
} }
private Color4 glowingAccentColour; private Color4 glowingAccentColour;
public Color4 GlowingAccentColour public Color4 GlowingAccentColour
{ {
get { return glowingAccentColour; } get { return glowingAccentColour; }
@ -140,6 +140,7 @@ namespace osu.Game.Graphics.UserInterface
} }
private Color4 glowColour; private Color4 glowColour;
public Color4 GlowColour public Color4 GlowColour
{ {
get { return glowColour; } get { return glowColour; }

View File

@ -17,6 +17,7 @@ namespace osu.Game.Graphics.UserInterface
public class OsuDropdown<T> : Dropdown<T>, IHasAccentColour public class OsuDropdown<T> : Dropdown<T>, IHasAccentColour
{ {
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get { return accentColour; }
@ -49,6 +50,7 @@ namespace osu.Game.Graphics.UserInterface
protected override DropdownMenu CreateMenu() => new OsuDropdownMenu(); protected override DropdownMenu CreateMenu() => new OsuDropdownMenu();
#region OsuDropdownMenu #region OsuDropdownMenu
protected class OsuDropdownMenu : DropdownMenu, IHasAccentColour protected class OsuDropdownMenu : DropdownMenu, IHasAccentColour
{ {
public override bool HandleNonPositionalInput => State == MenuState.Open; public override bool HandleNonPositionalInput => State == MenuState.Open;
@ -83,6 +85,7 @@ namespace osu.Game.Graphics.UserInterface
} }
private Color4 accentColour; private Color4 accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour; } get { return accentColour; }
@ -97,12 +100,14 @@ namespace osu.Game.Graphics.UserInterface
protected override DrawableMenuItem CreateDrawableMenuItem(MenuItem item) => new DrawableOsuDropdownMenuItem(item) { AccentColour = accentColour }; protected override DrawableMenuItem CreateDrawableMenuItem(MenuItem item) => new DrawableOsuDropdownMenuItem(item) { AccentColour = accentColour };
#region DrawableOsuDropdownMenuItem #region DrawableOsuDropdownMenuItem
public class DrawableOsuDropdownMenuItem : DrawableDropdownMenuItem, IHasAccentColour public class DrawableOsuDropdownMenuItem : DrawableDropdownMenuItem, IHasAccentColour
{ {
// IsHovered is used // IsHovered is used
public override bool HandlePositionalInput => true; public override bool HandlePositionalInput => true;
private Color4? accentColour; private Color4? accentColour;
public Color4 AccentColour public Color4 AccentColour
{ {
get { return accentColour ?? nonAccentSelectedColour; } get { return accentColour ?? nonAccentSelectedColour; }
@ -194,13 +199,16 @@ namespace osu.Game.Graphics.UserInterface
} }
} }
} }
#endregion #endregion
} }
#endregion #endregion
public class OsuDropdownHeader : DropdownHeader, IHasAccentColour public class OsuDropdownHeader : DropdownHeader, IHasAccentColour
{ {
protected readonly SpriteText Text; protected readonly SpriteText Text;
protected override string Label protected override string Label
{ {
get { return Text.Text; } get { return Text.Text; }
@ -210,6 +218,7 @@ namespace osu.Game.Graphics.UserInterface
protected readonly SpriteIcon Icon; protected readonly SpriteIcon Icon;
private Color4 accentColour; private Color4 accentColour;
public virtual Color4 AccentColour public virtual Color4 AccentColour
{ {
get { return accentColour; } get { return accentColour; }

Some files were not shown because too many files have changed in this diff Show More