diff --git a/osu.Android.props b/osu.Android.props
index 0881861bdc..71d4e5aacf 100644
--- a/osu.Android.props
+++ b/osu.Android.props
@@ -51,7 +51,7 @@
-
-
+
+
diff --git a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
index 41e726e05c..ff26f4afaa 100644
--- a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
+++ b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatchModHidden.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchModHidden.cs
new file mode 100644
index 0000000000..f15da29993
--- /dev/null
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatchModHidden.cs
@@ -0,0 +1,56 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework;
+using osu.Framework.Allocation;
+using osu.Framework.Testing;
+using osu.Game.Beatmaps;
+using osu.Game.Configuration;
+using osu.Game.Rulesets.Catch.Mods;
+using osu.Game.Rulesets.Catch.Objects;
+using osu.Game.Rulesets.Catch.Objects.Drawables;
+using osu.Game.Rulesets.Catch.UI;
+using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Objects.Types;
+using osu.Game.Tests.Visual;
+using osuTK;
+
+namespace osu.Game.Rulesets.Catch.Tests
+{
+ public class TestSceneCatchModHidden : ModTestScene
+ {
+ [BackgroundDependencyLoader]
+ private void load()
+ {
+ LocalConfig.Set(OsuSetting.IncreaseFirstObjectVisibility, false);
+ }
+
+ [Test]
+ public void TestJuiceStream()
+ {
+ CreateModTest(new ModTestData
+ {
+ Beatmap = new Beatmap
+ {
+ HitObjects = new List
+ {
+ new JuiceStream
+ {
+ StartTime = 1000,
+ Path = new SliderPath(PathType.Linear, new[] { Vector2.Zero, new Vector2(0, -192) }),
+ X = CatchPlayfield.WIDTH / 2
+ }
+ }
+ },
+ Mod = new CatchModHidden(),
+ PassCondition = () => Player.Results.Count > 0
+ && Player.ChildrenOfType().Single().Alpha > 0
+ && Player.ChildrenOfType().Last().Alpha > 0
+ });
+ }
+
+ protected override Ruleset CreatePlayerRuleset() => new CatchRuleset();
+ }
+}
diff --git a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
index cbd3dc5518..7c0b73e8c3 100644
--- a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
+++ b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
@@ -4,7 +4,7 @@
-
+
diff --git a/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj b/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
index 77c871718b..972cbec4a2 100644
--- a/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
+++ b/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
@@ -4,7 +4,7 @@
-
+
diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs
index 4c125ad6ef..bdc8cb31e5 100644
--- a/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs
+++ b/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs
@@ -1,23 +1,16 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using System;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
-using osu.Game.Rulesets.Mania.Objects;
-using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Mania.Mods
{
- public class ManiaModFadeIn : Mod
+ public class ManiaModFadeIn : ManiaModHidden
{
public override string Name => "Fade In";
public override string Acronym => "FI";
public override IconUsage? Icon => OsuIcon.ModHidden;
- public override ModType Type => ModType.DifficultyIncrease;
public override string Description => @"Keys appear out of nowhere!";
- public override double ScoreMultiplier => 1;
- public override bool Ranked => true;
- public override Type[] IncompatibleMods => new[] { typeof(ModFlashlight) };
}
}
diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs
index 9b54b48de3..ba84c21845 100644
--- a/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs
+++ b/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs
@@ -7,6 +7,10 @@ namespace osu.Game.Rulesets.Mania.Scoring
{
internal class ManiaScoreProcessor : ScoreProcessor
{
+ protected override double DefaultAccuracyPortion => 0.8;
+
+ protected override double DefaultComboPortion => 0.2;
+
public override HitWindows CreateHitWindows() => new ManiaHitWindows();
}
}
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneDrawableJudgement.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneDrawableJudgement.cs
index c81edf4e07..f08f994b07 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneDrawableJudgement.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneDrawableJudgement.cs
@@ -2,9 +2,12 @@
// See the LICENCE file in the repository root for full licence text.
using System;
+using System.Collections.Generic;
using System.Linq;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Pooling;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
@@ -16,14 +19,46 @@ namespace osu.Game.Rulesets.Osu.Tests
{
public TestSceneDrawableJudgement()
{
+ var pools = new List>();
+
foreach (HitResult result in Enum.GetValues(typeof(HitResult)).OfType().Skip(1))
{
- AddStep("Show " + result.GetDescription(), () => SetContents(() =>
- new DrawableOsuJudgement(new JudgementResult(new HitObject(), new Judgement()) { Type = result }, null)
+ AddStep("Show " + result.GetDescription(), () =>
+ {
+ int poolIndex = 0;
+
+ SetContents(() =>
{
- Anchor = Anchor.Centre,
- Origin = Anchor.Centre,
- }));
+ DrawablePool pool;
+
+ if (poolIndex >= pools.Count)
+ pools.Add(pool = new DrawablePool(1));
+ else
+ {
+ pool = pools[poolIndex];
+
+ // We need to make sure neither the pool nor the judgement get disposed when new content is set, and they both share the same parent.
+ ((Container)pool.Parent).Clear(false);
+ }
+
+ var container = new Container
+ {
+ RelativeSizeAxes = Axes.Both,
+ Children = new Drawable[]
+ {
+ pool,
+ pool.Get(j => j.Apply(new JudgementResult(new HitObject(), new Judgement()) { Type = result }, null)).With(j =>
+ {
+ j.Anchor = Anchor.Centre;
+ j.Origin = Anchor.Centre;
+ })
+ }
+ };
+
+ poolIndex++;
+ return container;
+ });
+ });
}
}
}
diff --git a/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj b/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
index 2fcfa1deb7..d6a68abaf2 100644
--- a/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
+++ b/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
@@ -4,7 +4,7 @@
-
+
diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs b/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
index 8228161008..ff995e38ce 100644
--- a/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
+++ b/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
@@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Osu.Mods
public BindableNumber CircleSize { get; } = new BindableFloat
{
Precision = 0.1f,
- MinValue = 1,
+ MinValue = 0,
MaxValue = 10,
Default = 5,
Value = 5,
@@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Osu.Mods
public BindableNumber ApproachRate { get; } = new BindableFloat
{
Precision = 0.1f,
- MinValue = 1,
+ MinValue = 0,
MaxValue = 10,
Default = 5,
Value = 5,
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs
index cfe969d1cc..1493ddfcf3 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs
@@ -62,6 +62,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
if (lighting != null)
{
+ lighting.ResetAnimation();
+
if (JudgedObject != null)
{
lightingColour = JudgedObject.AccentColour.GetBoundCopy();
diff --git a/osu.Game.Rulesets.Taiko.Tests/TaikoBeatmapConversionTest.cs b/osu.Game.Rulesets.Taiko.Tests/TaikoBeatmapConversionTest.cs
index f7729138ff..d0c57b20c0 100644
--- a/osu.Game.Rulesets.Taiko.Tests/TaikoBeatmapConversionTest.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/TaikoBeatmapConversionTest.cs
@@ -20,6 +20,8 @@ namespace osu.Game.Rulesets.Taiko.Tests
[TestCase("basic")]
[TestCase("slider-generating-drumroll")]
[TestCase("sample-to-type-conversions")]
+ [TestCase("slider-conversion-v6")]
+ [TestCase("slider-conversion-v14")]
public void Test(string name) => base.Test(name);
protected override IEnumerable CreateConvertValue(HitObject hitObject)
diff --git a/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj b/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
index 28b8476a22..ada7ac5d74 100644
--- a/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
+++ b/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
@@ -4,7 +4,7 @@
-
+
diff --git a/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs
index 78550ed270..2a1aa5d1df 100644
--- a/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs
+++ b/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs
@@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.Linq;
using osu.Game.Audio;
using osu.Game.Beatmaps.ControlPoints;
+using osu.Game.Beatmaps.Formats;
namespace osu.Game.Rulesets.Taiko.Beatmaps
{
@@ -82,37 +83,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
{
case IHasDistance distanceData:
{
- // Number of spans of the object - one for the initial length and for each repeat
- int spans = (obj as IHasRepeats)?.SpanCount() ?? 1;
-
- TimingControlPoint timingPoint = beatmap.ControlPointInfo.TimingPointAt(obj.StartTime);
- DifficultyControlPoint difficultyPoint = beatmap.ControlPointInfo.DifficultyPointAt(obj.StartTime);
-
- double speedAdjustment = difficultyPoint.SpeedMultiplier;
- double speedAdjustedBeatLength = timingPoint.BeatLength / speedAdjustment;
-
- // The true distance, accounting for any repeats. This ends up being the drum roll distance later
- double distance = distanceData.Distance * spans * LEGACY_VELOCITY_MULTIPLIER;
-
- // The velocity of the taiko hit object - calculated as the velocity of a drum roll
- double taikoVelocity = taiko_base_distance * beatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier / speedAdjustedBeatLength;
- // The duration of the taiko hit object
- double taikoDuration = distance / taikoVelocity;
-
- // The velocity of the osu! hit object - calculated as the velocity of a slider
- double osuVelocity = osu_base_scoring_distance * beatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier / speedAdjustedBeatLength;
- // The duration of the osu! hit object
- double osuDuration = distance / osuVelocity;
-
- // osu-stable always uses the speed-adjusted beatlength to determine the velocities, but
- // only uses it for tick rate if beatmap version < 8
- if (beatmap.BeatmapInfo.BeatmapVersion >= 8)
- speedAdjustedBeatLength *= speedAdjustment;
-
- // If the drum roll is to be split into hit circles, assume the ticks are 1/8 spaced within the duration of one beat
- double tickSpacing = Math.Min(speedAdjustedBeatLength / beatmap.BeatmapInfo.BaseDifficulty.SliderTickRate, taikoDuration / spans);
-
- if (!isForCurrentRuleset && tickSpacing > 0 && osuDuration < 2 * speedAdjustedBeatLength)
+ if (shouldConvertSliderToHits(obj, beatmap, distanceData, out var taikoDuration, out var tickSpacing))
{
List> allSamples = obj is IHasPathWithRepeats curveData ? curveData.NodeSamples : new List>(new[] { samples });
@@ -184,6 +155,52 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
}
}
+ private bool shouldConvertSliderToHits(HitObject obj, IBeatmap beatmap, IHasDistance distanceData, out double taikoDuration, out double tickSpacing)
+ {
+ // DO NOT CHANGE OR REFACTOR ANYTHING IN HERE WITHOUT TESTING AGAINST _ALL_ BEATMAPS.
+ // Some of these calculations look redundant, but they are not - extremely small floating point errors are introduced to maintain 1:1 compatibility with stable.
+ // Rounding cannot be used as an alternative since the error deltas have been observed to be between 1e-2 and 1e-6.
+
+ // The true distance, accounting for any repeats. This ends up being the drum roll distance later
+ int spans = (obj as IHasRepeats)?.SpanCount() ?? 1;
+ double distance = distanceData.Distance * spans * LEGACY_VELOCITY_MULTIPLIER;
+
+ TimingControlPoint timingPoint = beatmap.ControlPointInfo.TimingPointAt(obj.StartTime);
+ DifficultyControlPoint difficultyPoint = beatmap.ControlPointInfo.DifficultyPointAt(obj.StartTime);
+
+ double beatLength;
+#pragma warning disable 618
+ if (difficultyPoint is LegacyBeatmapDecoder.LegacyDifficultyControlPoint legacyDifficultyPoint)
+#pragma warning restore 618
+ beatLength = timingPoint.BeatLength * legacyDifficultyPoint.BpmMultiplier;
+ else
+ beatLength = timingPoint.BeatLength / difficultyPoint.SpeedMultiplier;
+
+ double sliderScoringPointDistance = osu_base_scoring_distance * beatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier / beatmap.BeatmapInfo.BaseDifficulty.SliderTickRate;
+
+ // The velocity and duration of the taiko hit object - calculated as the velocity of a drum roll.
+ double taikoVelocity = sliderScoringPointDistance * beatmap.BeatmapInfo.BaseDifficulty.SliderTickRate;
+ taikoDuration = distance / taikoVelocity * beatLength;
+
+ if (isForCurrentRuleset)
+ {
+ tickSpacing = 0;
+ return false;
+ }
+
+ double osuVelocity = taikoVelocity * (1000f / beatLength);
+
+ // osu-stable always uses the speed-adjusted beatlength to determine the osu! velocity, but only uses it for conversion if beatmap version < 8
+ if (beatmap.BeatmapInfo.BeatmapVersion >= 8)
+ beatLength = timingPoint.BeatLength;
+
+ // If the drum roll is to be split into hit circles, assume the ticks are 1/8 spaced within the duration of one beat
+ tickSpacing = Math.Min(beatLength / beatmap.BeatmapInfo.BaseDifficulty.SliderTickRate, taikoDuration / spans);
+
+ return tickSpacing > 0
+ && distance / osuVelocity * 1000 < 2 * beatLength;
+ }
+
protected override Beatmap CreateBeatmap() => new TaikoBeatmap();
}
}
diff --git a/osu.Game.Rulesets.Taiko/Difficulty/Skills/Strain.cs b/osu.Game.Rulesets.Taiko/Difficulty/Skills/Strain.cs
index c6fe273b50..2c1885ae1a 100644
--- a/osu.Game.Rulesets.Taiko/Difficulty/Skills/Strain.cs
+++ b/osu.Game.Rulesets.Taiko/Difficulty/Skills/Strain.cs
@@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
double addition = 1;
// We get an extra addition if we are not a slider or spinner
- if (current.LastObject is Hit && current.BaseObject is Hit && current.DeltaTime < 1000)
+ if (current.LastObject is Hit && current.BaseObject is Hit && current.BaseObject.StartTime - current.LastObject.StartTime < 1000)
{
if (hasColourChange(current))
addition += 0.75;
diff --git a/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v14-expected-conversion.json b/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v14-expected-conversion.json
new file mode 100644
index 0000000000..6a6063cb74
--- /dev/null
+++ b/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v14-expected-conversion.json
@@ -0,0 +1,379 @@
+{
+ "Mappings": [{
+ "StartTime": 2000,
+ "Objects": [{
+ "StartTime": 2000,
+ "EndTime": 2000,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": true
+ },
+ {
+ "StartTime": 2173,
+ "EndTime": 2173,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ }
+ ]
+ },
+ {
+ "StartTime": 4000,
+ "Objects": [{
+ "StartTime": 4000,
+ "EndTime": 4000,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 4173,
+ "EndTime": 4173,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ }
+ ]
+ },
+ {
+ "StartTime": 6000,
+ "Objects": [{
+ "StartTime": 6000,
+ "EndTime": 6000,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 6271,
+ "EndTime": 6271,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 6542,
+ "EndTime": 6542,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ }
+ ]
+ },
+ {
+ "StartTime": 8000,
+ "Objects": [{
+ "StartTime": 8000,
+ "EndTime": 8000,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8026,
+ "EndTime": 8026,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8053,
+ "EndTime": 8053,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8080,
+ "EndTime": 8080,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8107,
+ "EndTime": 8107,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8133,
+ "EndTime": 8133,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8160,
+ "EndTime": 8160,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8187,
+ "EndTime": 8187,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8214,
+ "EndTime": 8214,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8241,
+ "EndTime": 8241,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8267,
+ "EndTime": 8267,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8294,
+ "EndTime": 8294,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8321,
+ "EndTime": 8321,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8348,
+ "EndTime": 8348,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8374,
+ "EndTime": 8374,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8401,
+ "EndTime": 8401,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8428,
+ "EndTime": 8428,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8455,
+ "EndTime": 8455,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8482,
+ "EndTime": 8482,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8508,
+ "EndTime": 8508,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8535,
+ "EndTime": 8535,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8562,
+ "EndTime": 8562,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8589,
+ "EndTime": 8589,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8615,
+ "EndTime": 8615,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8642,
+ "EndTime": 8642,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8669,
+ "EndTime": 8669,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8696,
+ "EndTime": 8696,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8723,
+ "EndTime": 8723,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8749,
+ "EndTime": 8749,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8776,
+ "EndTime": 8776,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8803,
+ "EndTime": 8803,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8830,
+ "EndTime": 8830,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 8857,
+ "EndTime": 8857,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v14.osu b/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v14.osu
new file mode 100644
index 0000000000..4c8fb1fde6
--- /dev/null
+++ b/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v14.osu
@@ -0,0 +1,32 @@
+osu file format v14
+
+[General]
+Mode: 0
+
+[Difficulty]
+HPDrainRate:7
+CircleSize:4
+OverallDifficulty:8
+ApproachRate:9.2
+SliderMultiplier:2.3
+SliderTickRate:1
+
+[TimingPoints]
+0,333.333333333333,4,1,0,50,1,0
+2000,-100,4,2,0,80,0,0
+
+6000,389.61038961039,4,2,1,60,1,0
+
+8000,428.571428571429,4,3,1,65,1,0
+8000,-133.333333333333,4,1,1,45,0,0
+
+[HitObjects]
+// Should convert.
+48,32,2000,6,0,B|168:32,1,120,4|2
+312,68,4000,2,0,B|288:52|256:44|216:52|200:68,1,120,0|8
+
+// Should convert.
+184,224,6000,2,0,L|336:308,2,160,2|2|0,0:0|0:0|0:0,0:0:0:0:
+
+// Should convert.
+328,36,8000,6,0,L|332:16,32,10.7812504112721,0|0,0:0,0:0:0:0:
diff --git a/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v6-expected-conversion.json b/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v6-expected-conversion.json
new file mode 100644
index 0000000000..c3d3c52ebd
--- /dev/null
+++ b/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v6-expected-conversion.json
@@ -0,0 +1,137 @@
+{
+ "Mappings": [{
+ "StartTime": 0,
+ "Objects": [{
+ "StartTime": 0,
+ "EndTime": 0,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": true
+ },
+ {
+ "StartTime": 162,
+ "EndTime": 162,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 325,
+ "EndTime": 325,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": true
+ },
+ {
+ "StartTime": 487,
+ "EndTime": 487,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 650,
+ "EndTime": 650,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": true
+ },
+ {
+ "StartTime": 813,
+ "EndTime": 813,
+ "IsRim": false,
+ "IsCentre": true,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 975,
+ "EndTime": 975,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": true
+ }
+ ]
+ },
+ {
+ "StartTime": 2000,
+ "Objects": [{
+ "StartTime": 2000,
+ "EndTime": 2000,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 2162,
+ "EndTime": 2162,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 2325,
+ "EndTime": 2325,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": true
+ },
+ {
+ "StartTime": 2487,
+ "EndTime": 2487,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 2650,
+ "EndTime": 2650,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ },
+ {
+ "StartTime": 2813,
+ "EndTime": 2813,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": true
+ },
+ {
+ "StartTime": 2975,
+ "EndTime": 2975,
+ "IsRim": true,
+ "IsCentre": false,
+ "IsDrumRoll": false,
+ "IsSwell": false,
+ "IsStrong": false
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v6.osu b/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v6.osu
new file mode 100644
index 0000000000..c1e4c3bbd7
--- /dev/null
+++ b/osu.Game.Rulesets.Taiko/Resources/Testing/Beatmaps/slider-conversion-v6.osu
@@ -0,0 +1,20 @@
+osu file format v6
+
+[General]
+Mode: 0
+
+[Difficulty]
+HPDrainRate:3
+CircleSize:4
+OverallDifficulty:1
+SliderMultiplier:1.2
+SliderTickRate:3
+
+[TimingPoints]
+0,487.884208814441,4,1,0,60,1,0
+2000,-100,4,1,0,65,0,1
+
+[HitObjects]
+// Should convert.
+376,64,0,6,0,B|256:32|136:64,1,240,6|0
+256,120,2000,6,8,C|264:192|336:192,2,120,8|8|6
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs b/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs
index 003d40af56..e29ea87d25 100644
--- a/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs
+++ b/osu.Game.Rulesets.Taiko/Scoring/TaikoScoreProcessor.cs
@@ -7,6 +7,10 @@ namespace osu.Game.Rulesets.Taiko.Scoring
{
internal class TaikoScoreProcessor : ScoreProcessor
{
+ protected override double DefaultAccuracyPortion => 0.75;
+
+ protected override double DefaultComboPortion => 0.25;
+
public override HitWindows CreateHitWindows() => new TaikoHitWindows();
}
}
diff --git a/osu.Game.Tests/Online/TestDummyAPIRequestHandling.cs b/osu.Game.Tests/Online/TestDummyAPIRequestHandling.cs
index 1e77d50115..42948c3731 100644
--- a/osu.Game.Tests/Online/TestDummyAPIRequestHandling.cs
+++ b/osu.Game.Tests/Online/TestDummyAPIRequestHandling.cs
@@ -8,7 +8,6 @@ using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Chat;
using osu.Game.Tests.Visual;
-using osu.Game.Users;
namespace osu.Game.Tests.Online
{
@@ -55,7 +54,7 @@ namespace osu.Game.Tests.Online
AddStep("fire request", () =>
{
gotResponse = false;
- request = new LeaveChannelRequest(new Channel(), new User());
+ request = new LeaveChannelRequest(new Channel());
request.Success += () => gotResponse = true;
API.Queue(request);
});
@@ -74,7 +73,7 @@ namespace osu.Game.Tests.Online
AddStep("fire request", () =>
{
gotResponse = false;
- request = new LeaveChannelRequest(new Channel(), new User());
+ request = new LeaveChannelRequest(new Channel());
request.Success += () => gotResponse = true;
API.Perform(request);
});
@@ -93,7 +92,7 @@ namespace osu.Game.Tests.Online
AddStep("fire request", () =>
{
gotResponse = false;
- request = new LeaveChannelRequest(new Channel(), new User());
+ request = new LeaveChannelRequest(new Channel());
request.Success += () => gotResponse = true;
API.PerformAsync(request);
});
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneAutoplay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneAutoplay.cs
index 0be949650e..4743317fdd 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneAutoplay.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneAutoplay.cs
@@ -11,6 +11,7 @@ using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.Break;
using osu.Game.Screens.Ranking;
+using osuTK.Input;
namespace osu.Game.Tests.Visual.Gameplay
{
@@ -35,6 +36,18 @@ namespace osu.Game.Tests.Visual.Gameplay
AddStep("rewind", () => Player.GameplayClockContainer.Seek(-80000));
AddUntilStep("key counter reset", () => Player.HUDOverlay.KeyCounter.Children.All(kc => kc.CountPresses == 0));
+ double? time = null;
+
+ AddStep("store time", () => time = Player.GameplayClockContainer.GameplayClock.CurrentTime);
+
+ // test seek via keyboard
+ AddStep("seek with right arrow key", () => press(Key.Right));
+ AddAssert("time seeked forward", () => Player.GameplayClockContainer.GameplayClock.CurrentTime > time + 2000);
+
+ AddStep("store time", () => time = Player.GameplayClockContainer.GameplayClock.CurrentTime);
+ AddStep("seek with left arrow key", () => press(Key.Left));
+ AddAssert("time seeked backward", () => Player.GameplayClockContainer.GameplayClock.CurrentTime < time);
+
seekToBreak(0);
seekToBreak(1);
@@ -54,5 +67,11 @@ namespace osu.Game.Tests.Visual.Gameplay
BreakPeriod destBreak() => Beatmap.Value.Beatmap.Breaks.ElementAt(breakIndex);
}
+
+ private void press(Key key)
+ {
+ InputManager.PressKey(key);
+ InputManager.ReleaseKey(key);
+ }
}
}
diff --git a/osu.Game.Tests/Visual/Online/TestSceneRankingsTables.cs b/osu.Game.Tests/Visual/Online/TestSceneRankingsTables.cs
index a3b102dc76..ee109189c7 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneRankingsTables.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneRankingsTables.cs
@@ -15,6 +15,7 @@ using osu.Game.Rulesets.Catch;
using osu.Framework.Allocation;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
+using osu.Game.Overlays.Rankings;
namespace osu.Game.Tests.Visual.Online
{
@@ -105,7 +106,7 @@ namespace osu.Game.Tests.Visual.Online
{
onLoadStarted();
- request = new GetSpotlightRankingsRequest(ruleset, spotlight);
+ request = new GetSpotlightRankingsRequest(ruleset, spotlight, RankingsSortCriteria.All);
((GetSpotlightRankingsRequest)request).Success += rankings => Schedule(() =>
{
var table = new ScoresTable(1, rankings.Users);
diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs
index 073d75692e..a3ea4619cc 100644
--- a/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs
+++ b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs
@@ -80,9 +80,9 @@ namespace osu.Game.Tests.Visual.SongSelect
[Test]
public void TestRecommendedSelection()
{
- loadBeatmaps();
+ loadBeatmaps(carouselAdjust: carousel => carousel.GetRecommendedBeatmap = beatmaps => beatmaps.LastOrDefault());
- AddStep("set recommendation function", () => carousel.GetRecommendedBeatmap = beatmaps => beatmaps.LastOrDefault());
+ AddStep("select last", () => carousel.SelectBeatmap(carousel.BeatmapSets.Last().Beatmaps.Last()));
// check recommended was selected
advanceSelection(direction: 1, diff: false);
@@ -114,7 +114,7 @@ namespace osu.Game.Tests.Visual.SongSelect
{
loadBeatmaps();
- advanceSelection(direction: 1, diff: false);
+ AddStep("select first", () => carousel.SelectBeatmap(carousel.BeatmapSets.First().Beatmaps.First()));
waitForSelection(1, 1);
advanceSelection(direction: 1, diff: true);
@@ -707,9 +707,9 @@ namespace osu.Game.Tests.Visual.SongSelect
checkVisibleItemCount(true, 15);
}
- private void loadBeatmaps(List beatmapSets = null, Func initialCriteria = null)
+ private void loadBeatmaps(List beatmapSets = null, Func initialCriteria = null, Action carouselAdjust = null)
{
- createCarousel();
+ createCarousel(carouselAdjust);
if (beatmapSets == null)
{
@@ -730,17 +730,21 @@ namespace osu.Game.Tests.Visual.SongSelect
AddUntilStep("Wait for load", () => changed);
}
- private void createCarousel(Container target = null)
+ private void createCarousel(Action carouselAdjust = null, Container target = null)
{
AddStep("Create carousel", () =>
{
selectedSets.Clear();
eagerSelectedIDs.Clear();
- (target ?? this).Child = carousel = new TestBeatmapCarousel
+ carousel = new TestBeatmapCarousel
{
RelativeSizeAxes = Axes.Both,
};
+
+ carouselAdjust?.Invoke(carousel);
+
+ (target ?? this).Child = carousel;
});
}
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneCommentRepliesButton.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneCommentRepliesButton.cs
new file mode 100644
index 0000000000..c2ac5179c9
--- /dev/null
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneCommentRepliesButton.cs
@@ -0,0 +1,67 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Game.Overlays.Comments.Buttons;
+using osu.Framework.Graphics;
+using osu.Framework.Allocation;
+using osu.Game.Overlays;
+using osu.Framework.Graphics.Containers;
+using osuTK;
+using NUnit.Framework;
+using System.Linq;
+using osu.Framework.Graphics.Sprites;
+using osu.Framework.Testing;
+
+namespace osu.Game.Tests.Visual.UserInterface
+{
+ public class TestSceneCommentRepliesButton : OsuTestScene
+ {
+ [Cached]
+ private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
+
+ private readonly TestButton button;
+
+ public TestSceneCommentRepliesButton()
+ {
+ Child = new FillFlowContainer
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre,
+ AutoSizeAxes = Axes.Both,
+ Direction = FillDirection.Vertical,
+ Spacing = new Vector2(0, 10),
+ Children = new Drawable[]
+ {
+ button = new TestButton(),
+ new LoadRepliesButton
+ {
+ Action = () => { }
+ },
+ new ShowRepliesButton(1),
+ new ShowRepliesButton(2)
+ }
+ };
+ }
+
+ [Test]
+ public void TestArrowDirection()
+ {
+ AddStep("Set upwards", () => button.SetIconDirection(true));
+ AddAssert("Icon facing upwards", () => button.Icon.Scale.Y == -1);
+ AddStep("Set downwards", () => button.SetIconDirection(false));
+ AddAssert("Icon facing downwards", () => button.Icon.Scale.Y == 1);
+ }
+
+ private class TestButton : CommentRepliesButton
+ {
+ public SpriteIcon Icon => this.ChildrenOfType().First();
+
+ public TestButton()
+ {
+ Text = "sample text";
+ }
+
+ public new void SetIconDirection(bool upwards) => base.SetIconDirection(upwards);
+ }
+ }
+}
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneHueAnimation.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneHueAnimation.cs
new file mode 100644
index 0000000000..9c5888d072
--- /dev/null
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneHueAnimation.cs
@@ -0,0 +1,46 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using NUnit.Framework;
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Textures;
+using osu.Game.Graphics;
+using osu.Game.Graphics.Sprites;
+
+namespace osu.Game.Tests.Visual.UserInterface
+{
+ [TestFixture]
+ public class TestSceneHueAnimation : OsuTestScene
+ {
+ [BackgroundDependencyLoader]
+ private void load(LargeTextureStore textures)
+ {
+ HueAnimation anim2;
+
+ Add(anim2 = new HueAnimation
+ {
+ RelativeSizeAxes = Axes.Both,
+ FillMode = FillMode.Fit,
+ Texture = textures.Get("Intro/Triangles/logo-highlight"),
+ Colour = Colour4.White,
+ });
+
+ HueAnimation anim;
+
+ Add(anim = new HueAnimation
+ {
+ RelativeSizeAxes = Axes.Both,
+ FillMode = FillMode.Fit,
+ Texture = textures.Get("Intro/Triangles/logo-background"),
+ Colour = OsuColour.Gray(0.6f),
+ });
+
+ AddSliderStep("Progress", 0f, 1f, 0f, newValue =>
+ {
+ anim2.AnimationProgress = newValue;
+ anim.AnimationProgress = newValue;
+ });
+ }
+ }
+}
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs
index ce691bff70..6f083f4ab6 100644
--- a/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs
@@ -13,6 +13,8 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Mods;
using osu.Game.Rulesets;
+using osu.Game.Rulesets.Mania;
+using osu.Game.Rulesets.Mania.Mods;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Mods;
@@ -99,6 +101,12 @@ namespace osu.Game.Tests.Visual.UserInterface
public void TestManiaMods()
{
changeRuleset(3);
+
+ var mania = new ManiaRuleset();
+
+ testModsWithSameBaseType(
+ mania.GetAllMods().Single(m => m.GetType() == typeof(ManiaModFadeIn)),
+ mania.GetAllMods().Single(m => m.GetType() == typeof(ManiaModHidden)));
}
[Test]
@@ -197,6 +205,18 @@ namespace osu.Game.Tests.Visual.UserInterface
checkLabelColor(() => Color4.White);
}
+ private void testModsWithSameBaseType(Mod modA, Mod modB)
+ {
+ selectNext(modA);
+ checkSelected(modA);
+ selectNext(modB);
+ checkSelected(modB);
+
+ // Backwards
+ selectPrevious(modA);
+ checkSelected(modA);
+ }
+
private void selectNext(Mod mod) => AddStep($"left click {mod.Name}", () => modSelect.GetModButton(mod)?.SelectNext(1));
private void selectPrevious(Mod mod) => AddStep($"right click {mod.Name}", () => modSelect.GetModButton(mod)?.SelectNext(-1));
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneRankingsSortTabControl.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneRankingsSortTabControl.cs
new file mode 100644
index 0000000000..24bc0dbc97
--- /dev/null
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneRankingsSortTabControl.cs
@@ -0,0 +1,25 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Game.Overlays;
+using osu.Game.Overlays.Rankings;
+
+namespace osu.Game.Tests.Visual.UserInterface
+{
+ public class TestSceneRankingsSortTabControl : OsuTestScene
+ {
+ [Cached]
+ private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Green);
+
+ public TestSceneRankingsSortTabControl()
+ {
+ Child = new RankingsSortTabControl
+ {
+ Anchor = Anchor.Centre,
+ Origin = Anchor.Centre
+ };
+ }
+ }
+}
diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj
index 5ee887cb64..4b0506d818 100644
--- a/osu.Game.Tests/osu.Game.Tests.csproj
+++ b/osu.Game.Tests/osu.Game.Tests.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj b/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
index aa37326a49..f256b8e4e9 100644
--- a/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
+++ b/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
@@ -7,7 +7,7 @@
-
+
WinExe
diff --git a/osu.Game/Beatmaps/BeatmapConverter.cs b/osu.Game/Beatmaps/BeatmapConverter.cs
index 99e0bf4e33..11fee030f8 100644
--- a/osu.Game/Beatmaps/BeatmapConverter.cs
+++ b/osu.Game/Beatmaps/BeatmapConverter.cs
@@ -57,7 +57,7 @@ namespace osu.Game.Beatmaps
beatmap.BeatmapInfo = original.BeatmapInfo;
beatmap.ControlPointInfo = original.ControlPointInfo;
- beatmap.HitObjects = convertHitObjects(original.HitObjects, original);
+ beatmap.HitObjects = convertHitObjects(original.HitObjects, original).OrderBy(s => s.StartTime).ToList();
beatmap.Breaks = original.Breaks;
return beatmap;
diff --git a/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs b/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs
index 3106d1143e..16207c7d2a 100644
--- a/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs
+++ b/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs
@@ -48,16 +48,13 @@ namespace osu.Game.Beatmaps
public Task UpdateAsync(BeatmapSetInfo beatmapSet, CancellationToken cancellationToken)
{
- if (api?.State != APIState.Online)
- return Task.CompletedTask;
-
LogForModel(beatmapSet, "Performing online lookups...");
return Task.WhenAll(beatmapSet.Beatmaps.Select(b => UpdateAsync(beatmapSet, b, cancellationToken)).ToArray());
}
// todo: expose this when we need to do individual difficulty lookups.
protected Task UpdateAsync(BeatmapSetInfo beatmapSet, BeatmapInfo beatmap, CancellationToken cancellationToken)
- => Task.Factory.StartNew(() => lookup(beatmapSet, beatmap), cancellationToken, TaskCreationOptions.HideScheduler, updateScheduler);
+ => Task.Factory.StartNew(() => lookup(beatmapSet, beatmap), cancellationToken, TaskCreationOptions.HideScheduler | TaskCreationOptions.RunContinuationsAsynchronously, updateScheduler);
private void lookup(BeatmapSetInfo set, BeatmapInfo beatmap)
{
diff --git a/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs b/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs
index be5cd78dc8..b30ec0ca2c 100644
--- a/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs
+++ b/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs
@@ -369,7 +369,9 @@ namespace osu.Game.Beatmaps.Formats
addControlPoint(time, controlPoint, true);
}
- addControlPoint(time, new LegacyDifficultyControlPoint
+#pragma warning disable 618
+ addControlPoint(time, new LegacyDifficultyControlPoint(beatLength)
+#pragma warning restore 618
{
SpeedMultiplier = speedMultiplier,
}, timingChange);
diff --git a/osu.Game/Beatmaps/Formats/LegacyDecoder.cs b/osu.Game/Beatmaps/Formats/LegacyDecoder.cs
index a0e83554a3..44ef9bcacc 100644
--- a/osu.Game/Beatmaps/Formats/LegacyDecoder.cs
+++ b/osu.Game/Beatmaps/Formats/LegacyDecoder.cs
@@ -159,11 +159,20 @@ namespace osu.Game.Beatmaps.Formats
Mania,
}
- internal class LegacyDifficultyControlPoint : DifficultyControlPoint
+ [Obsolete("Do not use unless you're a legacy ruleset and 100% sure.")]
+ public class LegacyDifficultyControlPoint : DifficultyControlPoint
{
- public LegacyDifficultyControlPoint()
+ ///
+ /// Legacy BPM multiplier that introduces floating-point errors for rulesets that depend on it.
+ /// DO NOT USE THIS UNLESS 100% SURE.
+ ///
+ public readonly float BpmMultiplier;
+
+ public LegacyDifficultyControlPoint(double beatLength)
{
SpeedMultiplierBindable.Precision = double.Epsilon;
+
+ BpmMultiplier = beatLength < 0 ? Math.Clamp((float)-beatLength, 10, 10000) / 100f : 1;
}
}
diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs
index 9d31bc9bba..268328272c 100644
--- a/osu.Game/Configuration/OsuConfigManager.cs
+++ b/osu.Game/Configuration/OsuConfigManager.cs
@@ -91,6 +91,7 @@ namespace osu.Game.Configuration
Set(OsuSetting.FadePlayfieldWhenHealthLow, true);
Set(OsuSetting.KeyOverlay, false);
Set(OsuSetting.PositionalHitSounds, true);
+ Set(OsuSetting.AlwaysPlayFirstComboBreak, true);
Set(OsuSetting.ScoreMeter, ScoreMeterType.HitErrorBoth);
Set(OsuSetting.FloatingComments, false);
@@ -180,6 +181,7 @@ namespace osu.Game.Configuration
ShowStoryboard,
KeyOverlay,
PositionalHitSounds,
+ AlwaysPlayFirstComboBreak,
ScoreMeter,
FloatingComments,
ShowInterface,
diff --git a/osu.Game/Graphics/Sprites/HueAnimation.cs b/osu.Game/Graphics/Sprites/HueAnimation.cs
new file mode 100644
index 0000000000..8ad68ace05
--- /dev/null
+++ b/osu.Game/Graphics/Sprites/HueAnimation.cs
@@ -0,0 +1,69 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using System;
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.OpenGL.Vertices;
+using osu.Framework.Graphics.Shaders;
+using osu.Framework.Graphics.Sprites;
+using osu.Framework.Graphics.Textures;
+
+namespace osu.Game.Graphics.Sprites
+{
+ public class HueAnimation : Sprite
+ {
+ [BackgroundDependencyLoader]
+ private void load(ShaderManager shaders, TextureStore textures)
+ {
+ TextureShader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, @"HueAnimation");
+ RoundedTextureShader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, @"HueAnimation"); // Masking isn't supported for now
+ }
+
+ private float animationProgress;
+
+ public float AnimationProgress
+ {
+ get => animationProgress;
+ set
+ {
+ if (animationProgress == value) return;
+
+ animationProgress = value;
+ Invalidate(Invalidation.DrawInfo);
+ }
+ }
+
+ public override bool IsPresent => true;
+
+ protected override DrawNode CreateDrawNode() => new HueAnimationDrawNode(this);
+
+ private class HueAnimationDrawNode : SpriteDrawNode
+ {
+ private HueAnimation source => (HueAnimation)Source;
+
+ private float progress;
+
+ public HueAnimationDrawNode(HueAnimation source)
+ : base(source)
+ {
+ }
+
+ public override void ApplyState()
+ {
+ base.ApplyState();
+
+ progress = source.animationProgress;
+ }
+
+ protected override void Blit(Action vertexAction)
+ {
+ Shader.GetUniform("progress").UpdateValue(ref progress);
+
+ base.Blit(vertexAction);
+ }
+
+ protected override bool CanDrawOpaqueInterior => false;
+ }
+ }
+}
diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs
index 618798a6d8..6ae420b162 100644
--- a/osu.Game/Input/Bindings/GlobalActionContainer.cs
+++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs
@@ -35,6 +35,7 @@ namespace osu.Game.Input.Bindings
new KeyBinding(new[] { InputKey.Control, InputKey.T }, GlobalAction.ToggleToolbar),
new KeyBinding(new[] { InputKey.Control, InputKey.O }, GlobalAction.ToggleSettings),
new KeyBinding(new[] { InputKey.Control, InputKey.D }, GlobalAction.ToggleDirect),
+ new KeyBinding(new[] { InputKey.Control, InputKey.N }, GlobalAction.ToggleNotifications),
new KeyBinding(InputKey.Escape, GlobalAction.Back),
new KeyBinding(InputKey.ExtraMouseButton1, GlobalAction.Back),
@@ -56,6 +57,7 @@ namespace osu.Game.Input.Bindings
new KeyBinding(new[] { InputKey.Control, InputKey.Tilde }, GlobalAction.QuickExit),
new KeyBinding(new[] { InputKey.Control, InputKey.Plus }, GlobalAction.IncreaseScrollSpeed),
new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed),
+ new KeyBinding(InputKey.MouseMiddle, GlobalAction.PauseGameplay),
};
public IEnumerable AudioControlKeyBindings => new[]
@@ -157,5 +159,11 @@ namespace osu.Game.Input.Bindings
[Description("Home")]
Home,
+
+ [Description("Toggle notifications")]
+ ToggleNotifications,
+
+ [Description("Pause")]
+ PauseGameplay,
}
}
diff --git a/osu.Game/Online/API/APIRequest.cs b/osu.Game/Online/API/APIRequest.cs
index 0f8acbb7af..2115326cc2 100644
--- a/osu.Game/Online/API/APIRequest.cs
+++ b/osu.Game/Online/API/APIRequest.cs
@@ -5,6 +5,7 @@ using System;
using Newtonsoft.Json;
using osu.Framework.IO.Network;
using osu.Framework.Logging;
+using osu.Game.Users;
namespace osu.Game.Online.API
{
@@ -61,6 +62,11 @@ namespace osu.Game.Online.API
protected APIAccess API;
protected WebRequest WebRequest;
+ ///
+ /// The currently logged in user. Note that this will only be populated during .
+ ///
+ protected User User { get; private set; }
+
///
/// Invoked on successful completion of an API request.
/// This will be scheduled to the API's internal scheduler (run on update thread automatically).
@@ -86,6 +92,7 @@ namespace osu.Game.Online.API
}
API = apiAccess;
+ User = apiAccess.LocalUser.Value;
if (checkAndScheduleFailure())
return;
diff --git a/osu.Game/Online/API/Requests/GetSpotlightRankingsRequest.cs b/osu.Game/Online/API/Requests/GetSpotlightRankingsRequest.cs
index a279db134f..25e6b3f1af 100644
--- a/osu.Game/Online/API/Requests/GetSpotlightRankingsRequest.cs
+++ b/osu.Game/Online/API/Requests/GetSpotlightRankingsRequest.cs
@@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.IO.Network;
+using osu.Game.Overlays.Rankings;
using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests
@@ -9,11 +10,13 @@ namespace osu.Game.Online.API.Requests
public class GetSpotlightRankingsRequest : GetRankingsRequest
{
private readonly int spotlight;
+ private readonly RankingsSortCriteria sort;
- public GetSpotlightRankingsRequest(RulesetInfo ruleset, int spotlight)
+ public GetSpotlightRankingsRequest(RulesetInfo ruleset, int spotlight, RankingsSortCriteria sort)
: base(ruleset, 1)
{
this.spotlight = spotlight;
+ this.sort = sort;
}
protected override WebRequest CreateWebRequest()
@@ -21,6 +24,7 @@ namespace osu.Game.Online.API.Requests
var req = base.CreateWebRequest();
req.AddParameter("spotlight", spotlight.ToString());
+ req.AddParameter("filter", sort.ToString().ToLower());
return req;
}
diff --git a/osu.Game/Online/API/Requests/JoinChannelRequest.cs b/osu.Game/Online/API/Requests/JoinChannelRequest.cs
index f6ed5f22c9..33eab7e355 100644
--- a/osu.Game/Online/API/Requests/JoinChannelRequest.cs
+++ b/osu.Game/Online/API/Requests/JoinChannelRequest.cs
@@ -4,19 +4,16 @@
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.Chat;
-using osu.Game.Users;
namespace osu.Game.Online.API.Requests
{
public class JoinChannelRequest : APIRequest
{
private readonly Channel channel;
- private readonly User user;
- public JoinChannelRequest(Channel channel, User user)
+ public JoinChannelRequest(Channel channel)
{
this.channel = channel;
- this.user = user;
}
protected override WebRequest CreateWebRequest()
@@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
return req;
}
- protected override string Target => $@"chat/channels/{channel.Id}/users/{user.Id}";
+ protected override string Target => $@"chat/channels/{channel.Id}/users/{User.Id}";
}
}
diff --git a/osu.Game/Online/API/Requests/JoinRoomRequest.cs b/osu.Game/Online/API/Requests/JoinRoomRequest.cs
index 36b275236c..b0808afa45 100644
--- a/osu.Game/Online/API/Requests/JoinRoomRequest.cs
+++ b/osu.Game/Online/API/Requests/JoinRoomRequest.cs
@@ -4,19 +4,16 @@
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.Multiplayer;
-using osu.Game.Users;
namespace osu.Game.Online.API.Requests
{
public class JoinRoomRequest : APIRequest
{
private readonly Room room;
- private readonly User user;
- public JoinRoomRequest(Room room, User user)
+ public JoinRoomRequest(Room room)
{
this.room = room;
- this.user = user;
}
protected override WebRequest CreateWebRequest()
@@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
return req;
}
- protected override string Target => $"rooms/{room.RoomID.Value}/users/{user.Id}";
+ protected override string Target => $"rooms/{room.RoomID.Value}/users/{User.Id}";
}
}
diff --git a/osu.Game/Online/API/Requests/LeaveChannelRequest.cs b/osu.Game/Online/API/Requests/LeaveChannelRequest.cs
index f2ae3926bd..7dfc9a0aed 100644
--- a/osu.Game/Online/API/Requests/LeaveChannelRequest.cs
+++ b/osu.Game/Online/API/Requests/LeaveChannelRequest.cs
@@ -4,19 +4,16 @@
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.Chat;
-using osu.Game.Users;
namespace osu.Game.Online.API.Requests
{
public class LeaveChannelRequest : APIRequest
{
private readonly Channel channel;
- private readonly User user;
- public LeaveChannelRequest(Channel channel, User user)
+ public LeaveChannelRequest(Channel channel)
{
this.channel = channel;
- this.user = user;
}
protected override WebRequest CreateWebRequest()
@@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
return req;
}
- protected override string Target => $@"chat/channels/{channel.Id}/users/{user.Id}";
+ protected override string Target => $@"chat/channels/{channel.Id}/users/{User.Id}";
}
}
diff --git a/osu.Game/Online/API/Requests/PartRoomRequest.cs b/osu.Game/Online/API/Requests/PartRoomRequest.cs
index e1550cb2e0..c988cd5c9e 100644
--- a/osu.Game/Online/API/Requests/PartRoomRequest.cs
+++ b/osu.Game/Online/API/Requests/PartRoomRequest.cs
@@ -4,19 +4,16 @@
using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.Multiplayer;
-using osu.Game.Users;
namespace osu.Game.Online.API.Requests
{
public class PartRoomRequest : APIRequest
{
private readonly Room room;
- private readonly User user;
- public PartRoomRequest(Room room, User user)
+ public PartRoomRequest(Room room)
{
this.room = room;
- this.user = user;
}
protected override WebRequest CreateWebRequest()
@@ -26,6 +23,6 @@ namespace osu.Game.Online.API.Requests
return req;
}
- protected override string Target => $"rooms/{room.RoomID.Value}/users/{user.Id}";
+ protected override string Target => $"rooms/{room.RoomID.Value}/users/{User.Id}";
}
}
diff --git a/osu.Game/Online/Chat/ChannelManager.cs b/osu.Game/Online/Chat/ChannelManager.cs
index 3b336fef4f..f7ed57f207 100644
--- a/osu.Game/Online/Chat/ChannelManager.cs
+++ b/osu.Game/Online/Chat/ChannelManager.cs
@@ -381,7 +381,7 @@ namespace osu.Game.Online.Chat
break;
default:
- var req = new JoinChannelRequest(channel, api.LocalUser.Value);
+ var req = new JoinChannelRequest(channel);
req.Success += () => joinChannel(channel, fetchInitialMessages);
req.Failure += ex => LeaveChannel(channel);
api.Queue(req);
@@ -410,7 +410,7 @@ namespace osu.Game.Online.Chat
if (channel.Joined.Value)
{
- api.Queue(new LeaveChannelRequest(channel, api.LocalUser.Value));
+ api.Queue(new LeaveChannelRequest(channel));
channel.Joined.Value = false;
}
}
diff --git a/osu.Game/Online/Leaderboards/Leaderboard.cs b/osu.Game/Online/Leaderboards/Leaderboard.cs
index e2a817aaff..800029ceb9 100644
--- a/osu.Game/Online/Leaderboards/Leaderboard.cs
+++ b/osu.Game/Online/Leaderboards/Leaderboard.cs
@@ -170,36 +170,37 @@ namespace osu.Game.Online.Leaderboards
{
InternalChildren = new Drawable[]
{
- new GridContainer
+ new OsuContextMenuContainer
{
RelativeSizeAxes = Axes.Both,
- RowDimensions = new[]
+ Masking = true,
+ Child = new GridContainer
{
- new Dimension(),
- new Dimension(GridSizeMode.AutoSize),
- },
- Content = new[]
- {
- new Drawable[]
+ RelativeSizeAxes = Axes.Both,
+ RowDimensions = new[]
{
- new OsuContextMenuContainer
+ new Dimension(),
+ new Dimension(GridSizeMode.AutoSize),
+ },
+ Content = new[]
+ {
+ new Drawable[]
{
- RelativeSizeAxes = Axes.Both,
- Child = scrollContainer = new OsuScrollContainer
+ scrollContainer = new OsuScrollContainer
{
RelativeSizeAxes = Axes.Both,
ScrollbarVisible = false,
}
+ },
+ new Drawable[]
+ {
+ content = new Container
+ {
+ AutoSizeAxes = Axes.Y,
+ RelativeSizeAxes = Axes.X,
+ },
}
},
- new Drawable[]
- {
- content = new Container
- {
- AutoSizeAxes = Axes.Y,
- RelativeSizeAxes = Axes.X,
- },
- }
},
},
loading = new LoadingSpinner(),
diff --git a/osu.Game/Online/Leaderboards/LeaderboardScore.cs b/osu.Game/Online/Leaderboards/LeaderboardScore.cs
index 1469f29874..b60d71cfe7 100644
--- a/osu.Game/Online/Leaderboards/LeaderboardScore.cs
+++ b/osu.Game/Online/Leaderboards/LeaderboardScore.cs
@@ -58,6 +58,9 @@ namespace osu.Game.Online.Leaderboards
[Resolved(CanBeNull = true)]
private DialogOverlay dialogOverlay { get; set; }
+ [Resolved(CanBeNull = true)]
+ private SongSelect songSelect { get; set; }
+
public LeaderboardScore(ScoreInfo score, int? rank, bool allowHighlight = true)
{
this.score = score;
@@ -373,6 +376,9 @@ namespace osu.Game.Online.Leaderboards
{
List
protected virtual BackgroundScreen CreateBackground() => null;
+
+ public virtual bool OnBackButton() => false;
}
}
diff --git a/osu.Game/Screens/Play/ComboEffects.cs b/osu.Game/Screens/Play/ComboEffects.cs
index 1c4ac921f0..5bcda50399 100644
--- a/osu.Game/Screens/Play/ComboEffects.cs
+++ b/osu.Game/Screens/Play/ComboEffects.cs
@@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Game.Audio;
+using osu.Game.Configuration;
using osu.Game.Rulesets.Scoring;
using osu.Game.Skinning;
@@ -16,27 +17,34 @@ namespace osu.Game.Screens.Play
private SkinnableSound comboBreakSample;
+ private Bindable alwaysPlay;
+ private bool firstTime = true;
+
public ComboEffects(ScoreProcessor processor)
{
this.processor = processor;
}
[BackgroundDependencyLoader]
- private void load()
+ private void load(OsuConfigManager config)
{
InternalChild = comboBreakSample = new SkinnableSound(new SampleInfo("combobreak"));
+ alwaysPlay = config.GetBindable(OsuSetting.AlwaysPlayFirstComboBreak);
}
protected override void LoadComplete()
{
base.LoadComplete();
- processor.Combo.BindValueChanged(onComboChange, true);
+ processor.Combo.BindValueChanged(onComboChange);
}
private void onComboChange(ValueChangedEvent combo)
{
- if (combo.NewValue == 0 && combo.OldValue > 20)
+ if (combo.NewValue == 0 && (combo.OldValue > 20 || (alwaysPlay.Value && firstTime)))
+ {
comboBreakSample?.Play();
+ firstTime = false;
+ }
}
}
}
diff --git a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
index 684834123b..387c0e587b 100644
--- a/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
+++ b/osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
@@ -251,6 +251,7 @@ namespace osu.Game.Screens.Play.HUD
switch (action)
{
case GlobalAction.Back:
+ case GlobalAction.PauseGameplay: // in the future this behaviour will differ for replays etc.
if (!pendingAnimation)
BeginConfirm();
return true;
@@ -264,6 +265,7 @@ namespace osu.Game.Screens.Play.HUD
switch (action)
{
case GlobalAction.Back:
+ case GlobalAction.PauseGameplay:
AbortConfirm();
break;
}
diff --git a/osu.Game/Screens/Play/SongProgressBar.cs b/osu.Game/Screens/Play/SongProgressBar.cs
index 5052b32335..939b5fad1f 100644
--- a/osu.Game/Screens/Play/SongProgressBar.cs
+++ b/osu.Game/Screens/Play/SongProgressBar.cs
@@ -57,6 +57,8 @@ namespace osu.Game.Screens.Play
set => CurrentNumber.Value = value;
}
+ protected override bool AllowKeyboardInputWhenNotHovered => true;
+
public SongProgressBar(float barHeight, float handleBarHeight, Vector2 handleSize)
{
CurrentNumber.MinValue = 0;
diff --git a/osu.Game/Screens/Ranking/Expanded/Accuracy/RankText.cs b/osu.Game/Screens/Ranking/Expanded/Accuracy/RankText.cs
index 8343716e7e..cc732382f4 100644
--- a/osu.Game/Screens/Ranking/Expanded/Accuracy/RankText.cs
+++ b/osu.Game/Screens/Ranking/Expanded/Accuracy/RankText.cs
@@ -77,11 +77,10 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
Origin = Anchor.Centre,
BlurSigma = new Vector2(35),
BypassAutoSizeAxes = Axes.Both,
- RelativeSizeAxes = Axes.Both,
+ Size = new Vector2(200),
CacheDrawnFrameBuffer = true,
Blending = BlendingParameters.Additive,
Alpha = 0,
- Size = new Vector2(2f), // increase buffer size to allow for scale
Scale = new Vector2(1.8f),
Children = new[]
{
@@ -122,15 +121,18 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
}
flash.Colour = OsuColour.ForRank(rank);
- flash.FadeIn().Then().FadeOut(1200, Easing.OutQuint);
if (rank >= ScoreRank.S)
rankText.ScaleTo(1.05f).ScaleTo(1, 3000, Easing.OutQuint);
if (rank >= ScoreRank.X)
{
- flash.FadeIn().Then().FadeOut(3000);
- superFlash.FadeIn().Then().FadeOut(800, Easing.OutQuint);
+ flash.FadeOutFromOne(3000);
+ superFlash.FadeOutFromOne(800, Easing.OutQuint);
+ }
+ else
+ {
+ flash.FadeOutFromOne(1200, Easing.OutQuint);
}
}
}
diff --git a/osu.Game/Screens/Ranking/ResultsScreen.cs b/osu.Game/Screens/Ranking/ResultsScreen.cs
index 49ce07b708..44458d8c8e 100644
--- a/osu.Game/Screens/Ranking/ResultsScreen.cs
+++ b/osu.Game/Screens/Ranking/ResultsScreen.cs
@@ -194,6 +194,13 @@ namespace osu.Game.Screens.Ranking
}
public override bool OnExiting(IScreen next)
+ {
+ Background.FadeTo(1, 250);
+
+ return base.OnExiting(next);
+ }
+
+ public override bool OnBackButton()
{
if (statisticsPanel.State.Value == Visibility.Visible)
{
@@ -201,9 +208,7 @@ namespace osu.Game.Screens.Ranking
return true;
}
- Background.FadeTo(1, 250);
-
- return base.OnExiting(next);
+ return false;
}
private void addScore(ScoreInfo score)
diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs
index 6f913a3177..5f6f859d66 100644
--- a/osu.Game/Screens/Select/BeatmapCarousel.cs
+++ b/osu.Game/Screens/Select/BeatmapCarousel.cs
@@ -95,7 +95,6 @@ namespace osu.Game.Screens.Select
CarouselRoot newRoot = new CarouselRoot(this);
beatmapSets.Select(createCarouselSet).Where(g => g != null).ForEach(newRoot.AddChild);
- newRoot.Filter(activeCriteria);
// preload drawables as the ctor overhead is quite high currently.
_ = newRoot.Drawables;
@@ -108,6 +107,9 @@ namespace osu.Game.Screens.Select
itemsCache.Invalidate();
scrollPositionCache.Invalidate();
+ // apply any pending filter operation that may have been delayed (see applyActiveCriteria's scheduling behaviour when BeatmapSetsLoaded is false).
+ FlushPendingFilterOperations();
+
// Run on late scheduler want to ensure this runs after all pending UpdateBeatmapSet / RemoveBeatmapSet operations are run.
SchedulerAfterChildren.Add(() =>
{
@@ -321,6 +323,9 @@ namespace osu.Game.Screens.Select
/// True if a selection could be made, else False.
public bool SelectNextRandom()
{
+ if (!AllowSelection)
+ return false;
+
var visibleSets = beatmapSets.Where(s => !s.Filtered.Value).ToList();
if (!visibleSets.Any())
return false;
@@ -427,7 +432,19 @@ namespace osu.Game.Screens.Select
private void applyActiveCriteria(bool debounce, bool alwaysResetScrollPosition = true)
{
- if (root.Children.Any() != true) return;
+ PendingFilter?.Cancel();
+ PendingFilter = null;
+
+ if (debounce)
+ PendingFilter = Scheduler.AddDelayed(perform, 250);
+ else
+ {
+ // if initial load is not yet finished, this will be run inline in loadBeatmapSets to ensure correct order of operation.
+ if (!BeatmapSetsLoaded)
+ PendingFilter = Schedule(perform);
+ else
+ perform();
+ }
void perform()
{
@@ -439,14 +456,6 @@ namespace osu.Game.Screens.Select
if (alwaysResetScrollPosition || !scroll.UserScrolling)
ScrollToSelected();
}
-
- PendingFilter?.Cancel();
- PendingFilter = null;
-
- if (debounce)
- PendingFilter = Scheduler.AddDelayed(perform, 250);
- else
- perform();
}
private float? scrollTarget;
diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs
index e3705b15fa..74a5ee8309 100644
--- a/osu.Game/Screens/Select/SongSelect.cs
+++ b/osu.Game/Screens/Select/SongSelect.cs
@@ -599,12 +599,6 @@ namespace osu.Game.Screens.Select
public override bool OnExiting(IScreen next)
{
- if (ModSelect.State.Value == Visibility.Visible)
- {
- ModSelect.Hide();
- return true;
- }
-
if (base.OnExiting(next))
return true;
@@ -620,6 +614,17 @@ namespace osu.Game.Screens.Select
return false;
}
+ public override bool OnBackButton()
+ {
+ if (ModSelect.State.Value == Visibility.Visible)
+ {
+ ModSelect.Hide();
+ return true;
+ }
+
+ return false;
+ }
+
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
diff --git a/osu.Game/Skinning/SkinnableDrawable.cs b/osu.Game/Skinning/SkinnableDrawable.cs
index 0f0d3da5aa..d9a5036649 100644
--- a/osu.Game/Skinning/SkinnableDrawable.cs
+++ b/osu.Game/Skinning/SkinnableDrawable.cs
@@ -4,6 +4,7 @@
using System;
using osu.Framework.Caching;
using osu.Framework.Graphics;
+using osu.Framework.Graphics.Animations;
using osuTK;
namespace osu.Game.Skinning
@@ -50,6 +51,11 @@ namespace osu.Game.Skinning
RelativeSizeAxes = Axes.Both;
}
+ ///
+ /// Seeks to the 0-th frame if the content of this is an .
+ ///
+ public void ResetAnimation() => (Drawable as IFramedAnimation)?.GotoFrame(0);
+
private readonly Func createDefault;
private readonly Cached scaling = new Cached();
diff --git a/osu.Game/Storyboards/Drawables/DrawableStoryboardVideo.cs b/osu.Game/Storyboards/Drawables/DrawableStoryboardVideo.cs
index a85936edf7..4ea582ca4a 100644
--- a/osu.Game/Storyboards/Drawables/DrawableStoryboardVideo.cs
+++ b/osu.Game/Storyboards/Drawables/DrawableStoryboardVideo.cs
@@ -55,10 +55,11 @@ namespace osu.Game.Storyboards.Drawables
if (video == null) return;
- video.PlaybackPosition = Clock.CurrentTime - Video.StartTime;
-
- using (video.BeginAbsoluteSequence(0))
+ using (video.BeginAbsoluteSequence(Video.StartTime))
+ {
+ Schedule(() => video.PlaybackPosition = Time.Current - Video.StartTime);
video.FadeIn(500);
+ }
}
}
}
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index cba2d62bf5..2f3d08c528 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -24,8 +24,8 @@
-
-
+
+
diff --git a/osu.iOS.props b/osu.iOS.props
index 45e0da36c1..2bb3914c25 100644
--- a/osu.iOS.props
+++ b/osu.iOS.props
@@ -70,8 +70,8 @@
-
-
+
+
@@ -80,7 +80,7 @@
-
+