From bfe675ce503772d32b19cadff947a1cb6c166c7a Mon Sep 17 00:00:00 2001
From: LA <1245661240@qq.com>
Date: Sun, 6 Jul 2025 16:56:21 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0=EF=BC=8CEz?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A4=A7=E4=BC=98=E5=8C=96=EF=BC=8C=E5=A2=9E?=
=?UTF-8?q?=E5=BC=BA=E5=85=BC=E5=AE=B9=E5=AE=98=E6=96=B9=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
osu.Android.props | 2 +-
osu.Desktop.slnf | 60 +-
osu.Desktop/osu.Desktop.csproj | 13 +-
.../Edit/CatchHitObjectComposer.cs | 36 +
.../Mods/CatchModDifficultyAdjust.cs | 2 +-
.../TestSceneLegacyReplayPlayback.cs | 187 ++-
.../TestSceneReplayStability.cs | 51 +-
.../ManiaRulesetConfigManager.cs | 31 +-
.../LAsEZMania/EzManiaEnums.cs | 21 +
.../LAsEZMania/EzManiaHitModeConvertor.cs | 1 +
.../LAsEZMania/ManiaKeyCounterDisplay.cs | 3 +-
osu.Game.Rulesets.Mania/ManiaRuleset.cs | 11 +-
.../ManiaSettingsSubsection.cs | 68 +-
.../Mods/LAsMods/ManiaModJudgmentStyle.cs | 2 +-
.../YuLiangSSSMods/ManiaModNewJudgement.cs | 2 +-
.../Scoring/ManiaHitWindows.cs | 12 +-
.../Skinning/Ez2/Ez2ColumnBackground.cs | 45 +-
.../Skinning/Ez2/Ez2KeyArea.cs | 7 -
.../Ez2KeyAreaPlus.cs} | 7 +-
.../Skinning/Ez2/ManiaEz2SkinTransformer.cs | 9 +-
.../Skinning/Ez2HUD/Ez2SongProgress.cs | 2 +-
.../Skinning/Ez2HUD/EzComComboCounter.cs | 8 +-
.../Skinning/Ez2HUD/EzComComboSprite.cs | 8 +-
.../Skinning/Ez2HUD/EzComHitTiming.cs | 2 +-
.../Skinning/Ez2HUD/EzComKeyCounterDisplay.cs | 1 -
.../Skinning/EzStylePro/EzColumnBackground.cs | 168 ++
.../Skinning/EzStylePro/EzHitExplosion.cs | 57 +-
.../Skinning/EzStylePro/EzHitTarget.cs | 42 +-
.../Skinning/EzStylePro/EzHoldNoteHead.cs | 21 +-
.../EzStylePro/EzHoldNoteHittingLayer.cs | 98 +-
.../Skinning/EzStylePro/EzHoldNoteMiddle.cs | 32 +-
.../{EzStageKeys.cs => EzKeyArea.cs} | 121 +-
.../Skinning/EzStylePro/EzNote.cs | 5 +-
.../Skinning/EzStylePro/EzStageBottom.cs | 37 +-
.../ManiaEzStyleProSkinTransformer.cs | 13 +-
.../Legacy/HitTargetInsetContainer.cs | 15 +-
.../Skinning/SbI/ManiaSbISkinTransformer.cs | 3 +-
osu.Game.Rulesets.Mania/UI/ColumnFlow.cs | 41 +-
.../Components/HitPositionPaddedContainer.cs | 6 +-
.../UI/DrawableManiaRuleset.cs | 26 +-
.../Mods/TestSceneOsuModFlashlight.cs | 12 +-
.../Mods/TestSceneOsuModRelax.cs | 46 +-
.../TestSceneLegacyReplayPlayback.cs | 1 -
.../TestSceneOsuHitObjectSamples.cs | 21 +-
.../TestSceneReplayStability.cs | 55 +-
.../TestSceneSliderLateHitJudgement.cs | 40 +-
.../Mods/OsuModDifficultyAdjust.cs | 2 +-
.../Scoring/OsuHitWindows.cs | 6 +-
.../Judgements/TestSceneHitJudgements.cs | 2 +-
.../TestSceneLegacyReplayPlayback.cs | 3 +-
.../TestSceneReplayStability.cs | 43 +-
.../TestSceneTaikoHitObjectSamples.cs | 21 +-
.../Mods/TaikoModDifficultyAdjust.cs | 10 +-
.../Scoring/TaikoHitWindows.cs | 6 +-
.../Gameplay/TestSceneHitObjectSamples.cs | 3 -
osu.Game.Tests/Mods/ModUtilsTest.cs | 13 +-
.../Background/TestSceneUserDimBackgrounds.cs | 12 +-
.../Visual/Editing/TestSceneEditorSaving.cs | 4 +-
.../Editing/TestSceneOpenEditorTimestamp.cs | 10 +-
.../TestSceneGameplaySamplePlayback.cs | 5 +-
.../Visual/Gameplay/TestSceneReplayPlayer.cs | 50 +
.../TestSceneBeatmapEditorNavigation.cs | 20 +-
.../TestSceneButtonSystemNavigation.cs | 6 +-
.../TestSceneChangeAndUseGameplayBindings.cs | 8 +-
.../TestSceneMouseWheelVolumeAdjust.cs | 7 +-
.../Navigation/TestScenePerformFromScreen.cs | 16 +-
.../Navigation/TestScenePresentBeatmap.cs | 16 +-
.../Navigation/TestScenePresentScore.cs | 17 +-
.../Navigation/TestSceneScreenNavigation.cs | 256 ++-
.../TestSceneSkinEditorNavigation.cs | 15 +-
.../SongSelect/TestSceneBeatmapLeaderboard.cs | 548 -------
.../TestSceneBeatmapRecommendations.cs | 3 +-
.../SongSelect/TestScenePlaySongSelect.cs | 1445 -----------------
.../BeatmapCarouselFilterGroupingTest.cs | 4 +-
.../TestSceneBeatmapLeaderboardWedge.cs | 224 ++-
osu.Game/Beatmaps/Formats/LegacyDecoder.cs | 2 +
osu.Game/Configuration/BackgroundSource.cs | 2 +-
osu.Game/Configuration/OsuConfigManager.cs | 31 +-
osu.Game/Database/ModelManager.cs | 2 +
osu.Game/Database/RealmAccess.cs | 44 +-
osu.Game/Database/RealmObjectExtensions.cs | 2 +
osu.Game/Graphics/Carousel/Carousel.cs | 6 +-
.../Graphics/Containers/ExpandingContainer.cs | 25 +-
.../Graphics/UserInterface/ShearedButton.cs | 2 +-
osu.Game/Localisation/EditorStrings.cs | 5 +
osu.Game/Localisation/MenuTipStrings.cs | 5 +
osu.Game/Localisation/ResultsScreenStrings.cs | 5 +
.../BeatmapAttributeTextStrings.cs | 5 -
.../SkinnableComponentStrings.cs | 30 -
osu.Game/OsuGame.cs | 10 +-
osu.Game/OsuGameBase.cs | 4 +-
osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 44 +-
.../Overlays/FirstRunSetup/ScreenUIScale.cs | 23 +-
osu.Game/Overlays/Mods/ModSelectOverlay.cs | 2 +-
.../Sections/Gameplay/GeneralSettings.cs | 8 +
.../Settings/Sections/Input/TabletSettings.cs | 16 +-
.../Overlays/Settings/Sections/SkinSection.cs | 15 +-
.../SkinEditor/ExternalEditOverlay.cs | 284 ++++
osu.Game/Overlays/SkinEditor/SkinEditor.cs | 18 +
.../Overlays/SkinEditor/SkinEditorOverlay.cs | 36 +-
.../SkinEditor/SkinEditorSceneLibrary.cs | 5 +-
osu.Game/Rulesets/Mods/Mod.cs | 2 +-
osu.Game/Rulesets/Mods/ModClassic.cs | 2 +-
osu.Game/Rulesets/Mods/ModDifficultyAdjust.cs | 41 +-
osu.Game/Rulesets/Mods/ModFlashlight.cs | 2 +-
osu.Game/Rulesets/Scoring/IHitWindows.cs | 8 -
osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs | 18 +-
.../Backgrounds/BackgroundScreenDefault.cs | 14 +-
.../Compose/Components/BeatDivisorControl.cs | 7 +-
osu.Game/Screens/Edit/ExternalEditScreen.cs | 3 +-
.../{EzColumnColorTab.cs => EzColumnTab.cs} | 91 +-
osu.Game/Screens/EzSkinEditorOverlay.cs | 7 +-
osu.Game/Screens/EzSkinSettingsManager.cs | 68 +-
osu.Game/Screens/EzSkinSettingsTab.cs | 75 +-
osu.Game/Screens/Footer/ScreenFooter.cs | 19 +-
.../LAsEzExtensions/EzColumnTypeManager.cs | 2 +-
.../LAsEzExtensions/EzEditorSidebar.cs | 8 +-
.../LAsEzExtensions/EzLocalTextureFactory.cs | 266 +--
.../LAsEzExtensions/VideoBackgroundScreen.cs | 6 +-
osu.Game/Screens/Menu/MainMenu.cs | 102 +-
osu.Game/Screens/Menu/MenuTipDisplay.cs | 3 +-
.../Screens/Play/HUD/ArgonAccuracyCounter.cs | 2 +-
.../Screens/Play/HUD/ArgonComboCounter.cs | 2 +-
.../Play/HUD/ArgonPerformancePointsCounter.cs | 2 +-
.../Screens/Play/HUD/ArgonScoreCounter.cs | 2 +-
.../Screens/Play/HUD/ArgonSongProgress.cs | 2 +-
osu.Game/Screens/Play/HUD/ArgonWedgePiece.cs | 2 +-
.../Screens/Play/HUD/DefaultSongProgress.cs | 2 +-
osu.Game/Screens/Play/PlayerLoader.cs | 21 +-
osu.Game/Screens/Play/ReplayPlayer.cs | 22 +-
.../Statistics/PerformanceStatistic.cs | 5 +
.../Screens/Select/Details/AdvancedStats.cs | 2 +-
osu.Game/Screens/Select/PlaySongSelect.cs | 166 --
osu.Game/Screens/SelectV2/BeatmapCarousel.cs | 37 +-
.../SelectV2/BeatmapCarouselFilterGrouping.cs | 3 +-
.../SelectV2/BeatmapLeaderboardScore.cs | 57 +-
.../BeatmapLeaderboardScore_Tooltip.cs | 58 +-
.../SelectV2/BeatmapLeaderboardWedge.cs | 8 +
osu.Game/Screens/SelectV2/FilterControl.cs | 6 +-
osu.Game/Screens/SelectV2/PanelGroup.cs | 4 +-
osu.Game/Screens/SelectV2/SoloSongSelect.cs | 6 +-
osu.Game/Screens/SelectV2/SongSelect.cs | 92 +-
.../Components/BeatmapAttributeText.cs | 2 +-
osu.Game/Skinning/Components/BoxElement.cs | 2 +-
.../Components/EzComHitResultScore.cs | 2 +-
.../Skinning/Components/EzComScoreCounter.cs | 4 +-
.../Skinning/Components/EzSelectorEnumList.cs | 141 +-
.../Skinning/Components/EzSelectorTextures.cs | 2 +-
osu.Game/Skinning/Components/TextElement.cs | 2 +-
osu.Game/Skinning/EzStyleProSkin.cs | 2 +
.../Skinning/FontAdjustableSkinComponent.cs | 4 +-
.../Skinning/LegacyDefaultComboCounter.cs | 8 +-
osu.Game/Skinning/LegacySkin.cs | 13 +-
osu.Game/Skinning/Skin.cs | 54 +-
osu.Game/Skinning/SkinImporter.cs | 47 +
osu.Game/Skinning/SkinInfo.cs | 2 +-
osu.Game/Skinning/SkinManager.cs | 4 +
osu.Game/Skinning/SkinnableSprite.cs | 5 +-
.../Drawables/DrawableStoryboard.cs | 26 +-
.../Tests/Visual/EditorSavingTestScene.cs | 11 +-
.../Tests/Visual/ReplayStabilityTestScene.cs | 5 +
osu.Game/osu.Game.csproj | 4 +-
osu.iOS.props | 2 +-
osu.sln | 24 +
164 files changed, 2610 insertions(+), 3858 deletions(-)
create mode 100644 osu.Game.Rulesets.Mania/LAsEZMania/EzManiaEnums.cs
rename osu.Game.Rulesets.Mania/Skinning/{EzStylePro/Ez2KeyAreaPro.cs => Ez2/Ez2KeyAreaPlus.cs} (98%)
create mode 100644 osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzColumnBackground.cs
rename osu.Game.Rulesets.Mania/Skinning/EzStylePro/{EzStageKeys.cs => EzKeyArea.cs} (60%)
delete mode 100644 osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapLeaderboard.cs
delete mode 100644 osu.Game.Tests/Visual/SongSelect/TestScenePlaySongSelect.cs
create mode 100644 osu.Game/Overlays/SkinEditor/ExternalEditOverlay.cs
rename osu.Game/Screens/{EzColumnColorTab.cs => EzColumnTab.cs} (79%)
delete mode 100644 osu.Game/Screens/Select/PlaySongSelect.cs
diff --git a/osu.Android.props b/osu.Android.props
index aa7b343f38..de3fe31ee6 100644
--- a/osu.Android.props
+++ b/osu.Android.props
@@ -10,7 +10,7 @@
true
-
+
+
+ F:\MUG OSU\Ez2Lazer_Publish\$(Configuration)
+ bin\$(Configuration)\
+
diff --git a/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs b/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
index dfe9dc9dd8..370eb37d16 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
+using System.Text.RegularExpressions;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@@ -219,5 +220,40 @@ namespace osu.Game.Rulesets.Catch.Edit
distanceSnapGrid.StartTime = sourceHitObject.GetEndTime();
distanceSnapGrid.StartX = sourceHitObject.EffectiveX;
}
+
+ #region Clipboard handling
+
+ public override string ConvertSelectionToString()
+ => string.Join(',', EditorBeatmap.SelectedHitObjects.Cast().OrderBy(h => h.StartTime).Select(h => (h.IndexInCurrentCombo + 1).ToString()));
+
+ // 1,2,3,4 ...
+ private static readonly Regex selection_regex = new Regex(@"^\d+(,\d+)*$", RegexOptions.Compiled);
+
+ public override void SelectFromTimestamp(double timestamp, string objectDescription)
+ {
+ if (!selection_regex.IsMatch(objectDescription))
+ return;
+
+ List remainingHitObjects = EditorBeatmap.HitObjects.Cast().Where(h => h.StartTime >= timestamp).ToList();
+ string[] splitDescription = objectDescription.Split(',');
+
+ for (int i = 0; i < splitDescription.Length; i++)
+ {
+ if (!int.TryParse(splitDescription[i], out int combo) || combo < 1)
+ continue;
+
+ CatchHitObject? current = remainingHitObjects.FirstOrDefault(h => h.IndexInCurrentCombo + 1 == combo);
+
+ if (current == null)
+ continue;
+
+ EditorBeatmap.SelectedHitObjects.Add(current);
+
+ if (i < splitDescription.Length - 1)
+ remainingHitObjects = remainingHitObjects.Where(h => h != current && h.StartTime >= current.StartTime).ToList();
+ }
+ }
+
+ #endregion
}
}
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs b/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
index c300afa79f..e4a910700c 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
@@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Catch.Mods
{
get
{
- if (UserAdjustedSettingsCount != 1)
+ if (!IsExactlyOneSettingChanged(CircleSize, ApproachRate, OverallDifficulty, DrainRate))
return string.Empty;
if (!CircleSize.IsDefault) return format("CS", CircleSize);
diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneLegacyReplayPlayback.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneLegacyReplayPlayback.cs
index 2a7f2dc7ea..2c17cd8015 100644
--- a/osu.Game.Rulesets.Mania.Tests/TestSceneLegacyReplayPlayback.cs
+++ b/osu.Game.Rulesets.Mania.Tests/TestSceneLegacyReplayPlayback.cs
@@ -19,7 +19,6 @@ using osuTK;
namespace osu.Game.Rulesets.Mania.Tests
{
- [Ignore("These tests are expected to fail until an acceptable solution for various replay playback issues concerning rounding of replay frame times & hit windows is found.")]
public partial class TestSceneLegacyReplayPlayback : LegacyReplayPlaybackTestScene
{
protected override Ruleset CreateRuleset() => new ManiaRuleset();
@@ -72,13 +71,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 5f, -137d, HitResult.Miss },
new object[] { 5f, -138d, HitResult.Miss },
new object[] { 5f, 111d, HitResult.Ok },
- new object[] { 5f, 112d, HitResult.Miss },
- new object[] { 5f, 113d, HitResult.Miss },
- new object[] { 5f, 114d, HitResult.Miss },
- new object[] { 5f, 135d, HitResult.Miss },
- new object[] { 5f, 136d, HitResult.Miss },
- new object[] { 5f, 137d, HitResult.Miss },
- new object[] { 5f, 138d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 5f, 112d, HitResult.Miss },
+ // new object[] { 5f, 113d, HitResult.Miss },
+ // new object[] { 5f, 114d, HitResult.Miss },
+ // new object[] { 5f, 135d, HitResult.Miss },
+ // new object[] { 5f, 136d, HitResult.Miss },
+ // new object[] { 5f, 137d, HitResult.Miss },
+ // new object[] { 5f, 138d, HitResult.Miss },
// OD = 9.3 test cases.
// PERFECT hit window is [ -14ms, 14ms]
@@ -99,13 +99,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 9.3f, 70d, HitResult.Ok },
new object[] { 9.3f, 71d, HitResult.Ok },
new object[] { 9.3f, 98d, HitResult.Ok },
- new object[] { 9.3f, 99d, HitResult.Miss },
- new object[] { 9.3f, 100d, HitResult.Miss },
- new object[] { 9.3f, 101d, HitResult.Miss },
- new object[] { 9.3f, 122d, HitResult.Miss },
- new object[] { 9.3f, 123d, HitResult.Miss },
- new object[] { 9.3f, 124d, HitResult.Miss },
- new object[] { 9.3f, 125d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 9.3f, 99d, HitResult.Miss },
+ // new object[] { 9.3f, 100d, HitResult.Miss },
+ // new object[] { 9.3f, 101d, HitResult.Miss },
+ // new object[] { 9.3f, 122d, HitResult.Miss },
+ // new object[] { 9.3f, 123d, HitResult.Miss },
+ // new object[] { 9.3f, 124d, HitResult.Miss },
+ // new object[] { 9.3f, 125d, HitResult.Miss },
new object[] { 9.3f, -98d, HitResult.Ok },
new object[] { 9.3f, -99d, HitResult.Ok },
new object[] { 9.3f, -100d, HitResult.Meh },
@@ -145,13 +146,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 5f, -137d, HitResult.Miss },
new object[] { 5f, -138d, HitResult.Miss },
new object[] { 5f, 111d, HitResult.Ok },
- new object[] { 5f, 112d, HitResult.Miss },
- new object[] { 5f, 113d, HitResult.Miss },
- new object[] { 5f, 114d, HitResult.Miss },
- new object[] { 5f, 135d, HitResult.Miss },
- new object[] { 5f, 136d, HitResult.Miss },
- new object[] { 5f, 137d, HitResult.Miss },
- new object[] { 5f, 138d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 5f, 112d, HitResult.Miss },
+ // new object[] { 5f, 113d, HitResult.Miss },
+ // new object[] { 5f, 114d, HitResult.Miss },
+ // new object[] { 5f, 135d, HitResult.Miss },
+ // new object[] { 5f, 136d, HitResult.Miss },
+ // new object[] { 5f, 137d, HitResult.Miss },
+ // new object[] { 5f, 138d, HitResult.Miss },
// OD = 9.3 test cases.
// PERFECT hit window is [ -16ms, 16ms]
@@ -172,13 +174,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 9.3f, 70d, HitResult.Ok },
new object[] { 9.3f, 71d, HitResult.Ok },
new object[] { 9.3f, 98d, HitResult.Ok },
- new object[] { 9.3f, 99d, HitResult.Miss },
- new object[] { 9.3f, 100d, HitResult.Miss },
- new object[] { 9.3f, 101d, HitResult.Miss },
- new object[] { 9.3f, 122d, HitResult.Miss },
- new object[] { 9.3f, 123d, HitResult.Miss },
- new object[] { 9.3f, 124d, HitResult.Miss },
- new object[] { 9.3f, 125d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 9.3f, 99d, HitResult.Miss },
+ // new object[] { 9.3f, 100d, HitResult.Miss },
+ // new object[] { 9.3f, 101d, HitResult.Miss },
+ // new object[] { 9.3f, 122d, HitResult.Miss },
+ // new object[] { 9.3f, 123d, HitResult.Miss },
+ // new object[] { 9.3f, 124d, HitResult.Miss },
+ // new object[] { 9.3f, 125d, HitResult.Miss },
new object[] { 9.3f, -98d, HitResult.Ok },
new object[] { 9.3f, -99d, HitResult.Ok },
new object[] { 9.3f, -100d, HitResult.Meh },
@@ -207,13 +210,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 3.1f, 88d, HitResult.Ok },
new object[] { 3.1f, 89d, HitResult.Ok },
new object[] { 3.1f, 116d, HitResult.Ok },
- new object[] { 3.1f, 117d, HitResult.Miss },
- new object[] { 3.1f, 118d, HitResult.Miss },
- new object[] { 3.1f, 119d, HitResult.Miss },
- new object[] { 3.1f, 140d, HitResult.Miss },
- new object[] { 3.1f, 141d, HitResult.Miss },
- new object[] { 3.1f, 142d, HitResult.Miss },
- new object[] { 3.1f, 143d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 3.1f, 117d, HitResult.Miss },
+ // new object[] { 3.1f, 118d, HitResult.Miss },
+ // new object[] { 3.1f, 119d, HitResult.Miss },
+ // new object[] { 3.1f, 140d, HitResult.Miss },
+ // new object[] { 3.1f, 141d, HitResult.Miss },
+ // new object[] { 3.1f, 142d, HitResult.Miss },
+ // new object[] { 3.1f, 143d, HitResult.Miss },
new object[] { 3.1f, -116d, HitResult.Ok },
new object[] { 3.1f, -117d, HitResult.Ok },
new object[] { 3.1f, -118d, HitResult.Meh },
@@ -253,13 +257,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 5f, -122d, HitResult.Miss },
new object[] { 5f, -123d, HitResult.Miss },
new object[] { 5f, 96d, HitResult.Ok },
- new object[] { 5f, 97d, HitResult.Miss },
- new object[] { 5f, 98d, HitResult.Miss },
- new object[] { 5f, 99d, HitResult.Miss },
- new object[] { 5f, 120d, HitResult.Miss },
- new object[] { 5f, 121d, HitResult.Miss },
- new object[] { 5f, 122d, HitResult.Miss },
- new object[] { 5f, 123d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 5f, 97d, HitResult.Miss },
+ // new object[] { 5f, 98d, HitResult.Miss },
+ // new object[] { 5f, 99d, HitResult.Miss },
+ // new object[] { 5f, 120d, HitResult.Miss },
+ // new object[] { 5f, 121d, HitResult.Miss },
+ // new object[] { 5f, 122d, HitResult.Miss },
+ // new object[] { 5f, 123d, HitResult.Miss },
// OD = 3.1 test cases.
// PERFECT hit window is [ -16ms, 16ms]
@@ -280,13 +285,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 3.1f, 78d, HitResult.Ok },
new object[] { 3.1f, 79d, HitResult.Ok },
new object[] { 3.1f, 96d, HitResult.Ok },
- new object[] { 3.1f, 97d, HitResult.Miss },
- new object[] { 3.1f, 98d, HitResult.Miss },
- new object[] { 3.1f, 99d, HitResult.Miss },
- new object[] { 3.1f, 120d, HitResult.Miss },
- new object[] { 3.1f, 121d, HitResult.Miss },
- new object[] { 3.1f, 122d, HitResult.Miss },
- new object[] { 3.1f, 123d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 3.1f, 97d, HitResult.Miss },
+ // new object[] { 3.1f, 98d, HitResult.Miss },
+ // new object[] { 3.1f, 99d, HitResult.Miss },
+ // new object[] { 3.1f, 120d, HitResult.Miss },
+ // new object[] { 3.1f, 121d, HitResult.Miss },
+ // new object[] { 3.1f, 122d, HitResult.Miss },
+ // new object[] { 3.1f, 123d, HitResult.Miss },
new object[] { 3.1f, -96d, HitResult.Ok },
new object[] { 3.1f, -97d, HitResult.Ok },
new object[] { 3.1f, -98d, HitResult.Meh },
@@ -327,13 +333,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 5f, -98d, HitResult.Miss },
new object[] { 5f, -99d, HitResult.Miss },
new object[] { 5f, 79d, HitResult.Ok },
- new object[] { 5f, 80d, HitResult.Miss },
- new object[] { 5f, 81d, HitResult.Miss },
- new object[] { 5f, 82d, HitResult.Miss },
- new object[] { 5f, 96d, HitResult.Miss },
- new object[] { 5f, 97d, HitResult.Miss },
- new object[] { 5f, 98d, HitResult.Miss },
- new object[] { 5f, 99d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 5f, 80d, HitResult.Miss },
+ // new object[] { 5f, 81d, HitResult.Miss },
+ // new object[] { 5f, 82d, HitResult.Miss },
+ // new object[] { 5f, 96d, HitResult.Miss },
+ // new object[] { 5f, 97d, HitResult.Miss },
+ // new object[] { 5f, 98d, HitResult.Miss },
+ // new object[] { 5f, 99d, HitResult.Miss },
// OD = 9.3 test cases.
// This leads to "effective" OD of 13.02.
@@ -356,13 +363,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 9.3f, 50d, HitResult.Ok },
new object[] { 9.3f, 51d, HitResult.Ok },
new object[] { 9.3f, 69d, HitResult.Ok },
- new object[] { 9.3f, 70d, HitResult.Miss },
- new object[] { 9.3f, 71d, HitResult.Miss },
- new object[] { 9.3f, 72d, HitResult.Miss },
- new object[] { 9.3f, 86d, HitResult.Miss },
- new object[] { 9.3f, 87d, HitResult.Miss },
- new object[] { 9.3f, 88d, HitResult.Miss },
- new object[] { 9.3f, 89d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 9.3f, 70d, HitResult.Miss },
+ // new object[] { 9.3f, 71d, HitResult.Miss },
+ // new object[] { 9.3f, 72d, HitResult.Miss },
+ // new object[] { 9.3f, 86d, HitResult.Miss },
+ // new object[] { 9.3f, 87d, HitResult.Miss },
+ // new object[] { 9.3f, 88d, HitResult.Miss },
+ // new object[] { 9.3f, 89d, HitResult.Miss },
new object[] { 9.3f, -69d, HitResult.Ok },
new object[] { 9.3f, -70d, HitResult.Ok },
new object[] { 9.3f, -71d, HitResult.Meh },
@@ -402,13 +410,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 5f, -191d, HitResult.Miss },
new object[] { 5f, -192d, HitResult.Miss },
new object[] { 5f, 155d, HitResult.Ok },
- new object[] { 5f, 156d, HitResult.Miss },
- new object[] { 5f, 157d, HitResult.Miss },
- new object[] { 5f, 158d, HitResult.Miss },
- new object[] { 5f, 189d, HitResult.Miss },
- new object[] { 5f, 190d, HitResult.Miss },
- new object[] { 5f, 191d, HitResult.Miss },
- new object[] { 5f, 192d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 5f, 156d, HitResult.Miss },
+ // new object[] { 5f, 157d, HitResult.Miss },
+ // new object[] { 5f, 158d, HitResult.Miss },
+ // new object[] { 5f, 189d, HitResult.Miss },
+ // new object[] { 5f, 190d, HitResult.Miss },
+ // new object[] { 5f, 191d, HitResult.Miss },
+ // new object[] { 5f, 192d, HitResult.Miss },
};
private static readonly object[][] score_v1_non_convert_double_time_test_cases =
@@ -440,13 +449,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 5f, -205d, HitResult.Miss },
new object[] { 5f, -206d, HitResult.Miss },
new object[] { 5f, 167d, HitResult.Ok },
- new object[] { 5f, 168d, HitResult.Miss },
- new object[] { 5f, 169d, HitResult.Miss },
- new object[] { 5f, 170d, HitResult.Miss },
- new object[] { 5f, 203d, HitResult.Miss },
- new object[] { 5f, 204d, HitResult.Miss },
- new object[] { 5f, 205d, HitResult.Miss },
- new object[] { 5f, 206d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 5f, 168d, HitResult.Miss },
+ // new object[] { 5f, 169d, HitResult.Miss },
+ // new object[] { 5f, 170d, HitResult.Miss },
+ // new object[] { 5f, 203d, HitResult.Miss },
+ // new object[] { 5f, 204d, HitResult.Miss },
+ // new object[] { 5f, 205d, HitResult.Miss },
+ // new object[] { 5f, 206d, HitResult.Miss },
};
private static readonly object[][] score_v1_non_convert_half_time_test_cases =
@@ -478,13 +488,14 @@ namespace osu.Game.Rulesets.Mania.Tests
new object[] { 5f, -103d, HitResult.Miss },
new object[] { 5f, -104d, HitResult.Miss },
new object[] { 5f, 83d, HitResult.Ok },
- new object[] { 5f, 84d, HitResult.Miss },
- new object[] { 5f, 85d, HitResult.Miss },
- new object[] { 5f, 86d, HitResult.Miss },
- new object[] { 5f, 101d, HitResult.Miss },
- new object[] { 5f, 102d, HitResult.Miss },
- new object[] { 5f, 103d, HitResult.Miss },
- new object[] { 5f, 104d, HitResult.Miss },
+ // coverage of broken "can't hit meh late" behaviour, which is intentionally not being reproduced
+ // new object[] { 5f, 84d, HitResult.Miss },
+ // new object[] { 5f, 85d, HitResult.Miss },
+ // new object[] { 5f, 86d, HitResult.Miss },
+ // new object[] { 5f, 101d, HitResult.Miss },
+ // new object[] { 5f, 102d, HitResult.Miss },
+ // new object[] { 5f, 103d, HitResult.Miss },
+ // new object[] { 5f, 104d, HitResult.Miss },
};
private const double note_time = 300;
@@ -517,6 +528,7 @@ namespace osu.Game.Rulesets.Mania.Tests
RunTest($@"SV2 single note @ OD{overallDifficulty}", beatmap, $@"SV2 {hitOffset}ms @ OD{overallDifficulty} = {expectedResult}", score, [expectedResult]);
}
+ [Ignore("Tests expected to fail until stable's detailed treatment of hit windows in mania is reproduced.")]
[TestCaseSource(nameof(score_v1_non_convert_test_cases))]
public void TestHitWindowTreatmentWithScoreV1NonConvert(float overallDifficulty, double hitOffset, HitResult expectedResult)
{
@@ -544,6 +556,7 @@ namespace osu.Game.Rulesets.Mania.Tests
RunTest($@"SV1 single note @ OD{overallDifficulty}", beatmap, $@"SV1 {hitOffset}ms @ OD{overallDifficulty} = {expectedResult}", score, [expectedResult]);
}
+ [Ignore("Tests expected to fail until stable's detailed treatment of hit windows in mania is reproduced.")]
[TestCaseSource(nameof(score_v1_convert_test_cases))]
public void TestHitWindowTreatmentWithScoreV1Convert(float overallDifficulty, double hitOffset, HitResult expectedResult)
{
@@ -572,6 +585,7 @@ namespace osu.Game.Rulesets.Mania.Tests
RunTest($@"SV1 convert single note @ OD{overallDifficulty}", beatmap, $@"SV1 convert {hitOffset}ms @ OD{overallDifficulty} = {expectedResult}", score, [expectedResult]);
}
+ [Ignore("Tests expected to fail until stable's detailed treatment of hit windows in mania is reproduced.")]
[TestCaseSource(nameof(score_v1_non_convert_hard_rock_test_cases))]
public void TestHitWindowTreatmentWithScoreV1AndHardRockNonConvert(float overallDifficulty, double hitOffset, HitResult expectedResult)
{
@@ -600,6 +614,7 @@ namespace osu.Game.Rulesets.Mania.Tests
RunTest($@"SV1+HR single note @ OD{overallDifficulty}", beatmap, $@"SV1+HR {hitOffset}ms @ OD{overallDifficulty} = {expectedResult}", score, [expectedResult]);
}
+ [Ignore("Tests expected to fail until stable's detailed treatment of hit windows in mania is reproduced.")]
[TestCaseSource(nameof(score_v1_non_convert_easy_test_cases))]
public void TestHitWindowTreatmentWithScoreV1AndEasyNonConvert(float overallDifficulty, double hitOffset, HitResult expectedResult)
{
@@ -628,6 +643,7 @@ namespace osu.Game.Rulesets.Mania.Tests
RunTest($@"SV1+EZ single note @ OD{overallDifficulty}", beatmap, $@"SV1+EZ {hitOffset}ms @ OD{overallDifficulty} = {expectedResult}", score, [expectedResult]);
}
+ [Ignore("Tests expected to fail until stable's detailed treatment of hit windows in mania is reproduced.")]
[TestCaseSource(nameof(score_v1_non_convert_double_time_test_cases))]
public void TestHitWindowTreatmentWithScoreV1AndDoubleTimeNonConvert(float overallDifficulty, double hitOffset, HitResult expectedResult)
{
@@ -656,6 +672,7 @@ namespace osu.Game.Rulesets.Mania.Tests
RunTest($@"SV1+DT single note @ OD{overallDifficulty}", beatmap, $@"SV1+DT {hitOffset}ms @ OD{overallDifficulty} = {expectedResult}", score, [expectedResult]);
}
+ [Ignore("Tests expected to fail until stable's detailed treatment of hit windows in mania is reproduced.")]
[TestCaseSource(nameof(score_v1_non_convert_half_time_test_cases))]
public void TestHitWindowTreatmentWithScoreV1AndHalfTimeNonConvert(float overallDifficulty, double hitOffset, HitResult expectedResult)
{
diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneReplayStability.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneReplayStability.cs
index 64496d7628..a8160d3373 100644
--- a/osu.Game.Rulesets.Mania.Tests/TestSceneReplayStability.cs
+++ b/osu.Game.Rulesets.Mania.Tests/TestSceneReplayStability.cs
@@ -12,7 +12,6 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Mania.Tests
{
- [Ignore("These tests are expected to fail until an acceptable solution for various replay playback issues concerning rounding of replay frame times & hit windows is found.")]
public partial class TestSceneReplayStability : ReplayStabilityTestScene
{
private static readonly object[][] test_cases =
@@ -22,87 +21,79 @@ namespace osu.Game.Rulesets.Mania.Tests
// while round brackets `()` represent *open* or *exclusive* bounds.
// OD = 5 test cases.
- // PERFECT hit window is [ -19.4ms, 19.4ms]
- // GREAT hit window is [ -49.0ms, 49.0ms]
- // GOOD hit window is [ -82.0ms, 82.0ms]
- // OK hit window is [-112.0ms, 112.0ms]
- // MEH hit window is [-136.0ms, 136.0ms]
- // MISS hit window is [-173.0ms, 173.0ms]
+ // PERFECT hit window is [ -19.5ms, 19.5ms]
+ // GREAT hit window is [ -49.5ms, 49.5ms]
+ // GOOD hit window is [ -82.5ms, 82.5ms]
+ // OK hit window is [-112.5ms, 112.5ms]
+ // MEH hit window is [-136.5ms, 136.5ms]
+ // MISS hit window is [-173.5ms, 173.5ms]
new object[] { 5f, -19d, HitResult.Perfect },
new object[] { 5f, -19.2d, HitResult.Perfect },
- new object[] { 5f, -19.38d, HitResult.Perfect },
- // new object[] { 5f, -19.4d, HitResult.Perfect }, <- in theory this should work, in practice it does not (fails even before encode & rounding due to floating point precision issues)
- new object[] { 5f, -19.44d, HitResult.Great },
new object[] { 5f, -19.7d, HitResult.Great },
new object[] { 5f, -20d, HitResult.Great },
new object[] { 5f, -48d, HitResult.Great },
new object[] { 5f, -48.4d, HitResult.Great },
new object[] { 5f, -48.7d, HitResult.Great },
new object[] { 5f, -49d, HitResult.Great },
- new object[] { 5f, -49.2d, HitResult.Good },
+ new object[] { 5f, -49.2d, HitResult.Great },
new object[] { 5f, -49.7d, HitResult.Good },
new object[] { 5f, -50d, HitResult.Good },
new object[] { 5f, -81d, HitResult.Good },
new object[] { 5f, -81.2d, HitResult.Good },
new object[] { 5f, -81.7d, HitResult.Good },
new object[] { 5f, -82d, HitResult.Good },
- new object[] { 5f, -82.2d, HitResult.Ok },
+ new object[] { 5f, -82.2d, HitResult.Good },
new object[] { 5f, -82.7d, HitResult.Ok },
new object[] { 5f, -83d, HitResult.Ok },
new object[] { 5f, -111d, HitResult.Ok },
new object[] { 5f, -111.2d, HitResult.Ok },
new object[] { 5f, -111.7d, HitResult.Ok },
new object[] { 5f, -112d, HitResult.Ok },
- new object[] { 5f, -112.2d, HitResult.Meh },
+ new object[] { 5f, -112.2d, HitResult.Ok },
new object[] { 5f, -112.7d, HitResult.Meh },
new object[] { 5f, -113d, HitResult.Meh },
new object[] { 5f, -135d, HitResult.Meh },
new object[] { 5f, -135.2d, HitResult.Meh },
new object[] { 5f, -135.8d, HitResult.Meh },
new object[] { 5f, -136d, HitResult.Meh },
- new object[] { 5f, -136.2d, HitResult.Miss },
+ new object[] { 5f, -136.2d, HitResult.Meh },
new object[] { 5f, -136.7d, HitResult.Miss },
new object[] { 5f, -137d, HitResult.Miss },
// OD = 9.3 test cases.
- // PERFECT hit window is [ -14.67ms, 14.67ms]
- // GREAT hit window is [ -36.10ms, 36.10ms]
- // GOOD hit window is [ -69.10ms, 69.10ms]
- // OK hit window is [ -99.10ms, 99.10ms]
- // MEH hit window is [-123.10ms, 123.10ms]
- // MISS hit window is [-160.10ms, 160.10ms]
+ // PERFECT hit window is [ -14.5ms, 14.5ms]
+ // GREAT hit window is [ -36.5ms, 36.5ms]
+ // GOOD hit window is [ -69.5ms, 69.5ms]
+ // OK hit window is [ -99.5ms, 99.5ms]
+ // MEH hit window is [-123.5ms, 123.5ms]
+ // MISS hit window is [-160.5ms, 160.5ms]
new object[] { 9.3f, 14d, HitResult.Perfect },
new object[] { 9.3f, 14.2d, HitResult.Perfect },
- new object[] { 9.3f, 14.6d, HitResult.Perfect },
- // new object[] { 9.3f, 14.67d, HitResult.Perfect }, <- in theory this should work, in practice it does not (fails even before encode & rounding due to floating point precision issues)
new object[] { 9.3f, 14.7d, HitResult.Great },
new object[] { 9.3f, 15d, HitResult.Great },
new object[] { 9.3f, 35d, HitResult.Great },
new object[] { 9.3f, 35.3d, HitResult.Great },
new object[] { 9.3f, 35.8d, HitResult.Great },
- new object[] { 9.3f, 36.05d, HitResult.Great },
- new object[] { 9.3f, 36.3d, HitResult.Good },
+ new object[] { 9.3f, 36.3d, HitResult.Great },
new object[] { 9.3f, 36.7d, HitResult.Good },
new object[] { 9.3f, 37d, HitResult.Good },
new object[] { 9.3f, 68d, HitResult.Good },
new object[] { 9.3f, 68.4d, HitResult.Good },
new object[] { 9.3f, 68.9d, HitResult.Good },
- new object[] { 9.3f, 69.07d, HitResult.Good },
- new object[] { 9.3f, 69.25d, HitResult.Ok },
+ new object[] { 9.3f, 69.25d, HitResult.Good },
new object[] { 9.3f, 69.85d, HitResult.Ok },
new object[] { 9.3f, 70d, HitResult.Ok },
new object[] { 9.3f, 98d, HitResult.Ok },
new object[] { 9.3f, 98.3d, HitResult.Ok },
new object[] { 9.3f, 98.6d, HitResult.Ok },
new object[] { 9.3f, 99d, HitResult.Ok },
- new object[] { 9.3f, 99.3d, HitResult.Meh },
+ new object[] { 9.3f, 99.3d, HitResult.Ok },
new object[] { 9.3f, 99.7d, HitResult.Meh },
new object[] { 9.3f, 100d, HitResult.Meh },
new object[] { 9.3f, 122d, HitResult.Meh },
new object[] { 9.3f, 122.34d, HitResult.Meh },
new object[] { 9.3f, 122.57d, HitResult.Meh },
- new object[] { 9.3f, 123.04d, HitResult.Meh },
- new object[] { 9.3f, 123.45d, HitResult.Miss },
+ new object[] { 9.3f, 123.45d, HitResult.Meh },
new object[] { 9.3f, 123.95d, HitResult.Miss },
new object[] { 9.3f, 124d, HitResult.Miss },
};
@@ -110,7 +101,7 @@ namespace osu.Game.Rulesets.Mania.Tests
[TestCaseSource(nameof(test_cases))]
public void TestHitWindowStability(float overallDifficulty, double hitOffset, HitResult expectedResult)
{
- const double note_time = 100;
+ const double note_time = 300;
var beatmap = new ManiaBeatmap(new StageDefinition(1))
{
diff --git a/osu.Game.Rulesets.Mania/Configuration/ManiaRulesetConfigManager.cs b/osu.Game.Rulesets.Mania/Configuration/ManiaRulesetConfigManager.cs
index 108e24db6c..30a70e910f 100644
--- a/osu.Game.Rulesets.Mania/Configuration/ManiaRulesetConfigManager.cs
+++ b/osu.Game.Rulesets.Mania/Configuration/ManiaRulesetConfigManager.cs
@@ -1,12 +1,11 @@
// 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 System.ComponentModel;
using osu.Framework.Configuration.Tracking;
using osu.Game.Configuration;
using osu.Game.Localisation;
using osu.Game.Rulesets.Configuration;
+using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.UI;
namespace osu.Game.Rulesets.Mania.Configuration
@@ -24,16 +23,14 @@ namespace osu.Game.Rulesets.Mania.Configuration
{
base.InitialiseDefaults();
- SetDefault(ManiaRulesetSetting.ColumnWidth, 46, 9, 90, 1.0);
- SetDefault(ManiaRulesetSetting.SpecialFactor, 1, 0.1, 4, 0.1);
// SetDefault(ManiaRulesetSetting.HitMode, MUGHitMode.EZ2AC);
- SetDefault(ManiaRulesetSetting.ScrollSpeed, 200, 1.0, 401.0, current_scroll_speed_precision);
SetDefault(ManiaRulesetSetting.ScrollBaseSpeed, 500, 100, 1000, 1.0);
SetDefault(ManiaRulesetSetting.ScrollTimePerSpeed, 5, 1.0, 40, 1.0);
SetDefault(ManiaRulesetSetting.ScrollStyle, EzManiaScrollingStyle.ScrollTimeStyleFixed);
SetDefault(ManiaRulesetSetting.ScrollPerKeyMode, false);
SetDefault(ManiaRulesetSetting.PerspectiveAngle, 90.0f, 30.0f, 90.0f);
+ SetDefault(ManiaRulesetSetting.ScrollSpeed, 200, 1.0, 401.0, current_scroll_speed_precision);
SetDefault(ManiaRulesetSetting.ScrollDirection, ManiaScrollingDirection.Down);
SetDefault(ManiaRulesetSetting.TimingBasedNoteColouring, false);
SetDefault(ManiaRulesetSetting.MobileLayout, ManiaMobileLayout.Portrait);
@@ -56,34 +53,20 @@ namespace osu.Game.Rulesets.Mania.Configuration
public enum ManiaRulesetSetting
{
- [Obsolete("Use ScrollSpeed instead.")] // Can be removed 2023-11-30
+ ScrollStyle,
ScrollTime,
ScrollBaseSpeed,
ScrollTimePerSpeed,
- ScrollStyle,
- // HitMode,
+ // HitMode,
+ //暂时无用
PerspectiveAngle,
- ColumnWidth,
- SpecialFactor,
ScrollPerKeyMode,
+
+ //官方设置
ScrollSpeed,
ScrollDirection,
TimingBasedNoteColouring,
MobileLayout,
}
-
- public enum EzManiaScrollingStyle
- {
- // [LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.ScrollingDirectionUp))]
- [Description("40速 通配速度风格(不可用)")]
- ScrollSpeedStyle,
-
- // [LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.ScrollingDirectionDown))]
- [Description("ms值 恒定速度")]
- ScrollTimeStyle,
-
- [Description("ms值 恒定时间")]
- ScrollTimeStyleFixed,
- }
}
diff --git a/osu.Game.Rulesets.Mania/LAsEZMania/EzManiaEnums.cs b/osu.Game.Rulesets.Mania/LAsEZMania/EzManiaEnums.cs
new file mode 100644
index 0000000000..47459df670
--- /dev/null
+++ b/osu.Game.Rulesets.Mania/LAsEZMania/EzManiaEnums.cs
@@ -0,0 +1,21 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using System.ComponentModel;
+
+namespace osu.Game.Rulesets.Mania.LAsEZMania
+{
+ public enum EzManiaScrollingStyle
+ {
+ // [LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.ScrollingDirectionUp))]
+ [Description("40速 通配速度风格(不可用)")]
+ ScrollSpeedStyle,
+
+ // [LocalisableDescription(typeof(RulesetSettingsStrings), nameof(RulesetSettingsStrings.ScrollingDirectionDown))]
+ [Description("ms值 相对默认判定线")]
+ ScrollTimeStyle,
+
+ [Description("ms值 相对屏幕底部")]
+ ScrollTimeStyleFixed,
+ }
+}
diff --git a/osu.Game.Rulesets.Mania/LAsEZMania/EzManiaHitModeConvertor.cs b/osu.Game.Rulesets.Mania/LAsEZMania/EzManiaHitModeConvertor.cs
index 8c2d3f0b9e..21b173a334 100644
--- a/osu.Game.Rulesets.Mania/LAsEZMania/EzManiaHitModeConvertor.cs
+++ b/osu.Game.Rulesets.Mania/LAsEZMania/EzManiaHitModeConvertor.cs
@@ -11,6 +11,7 @@ using osu.Framework.Bindables;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
+using osu.Game.Overlays.Settings.Sections.Gameplay;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Configuration;
using osu.Game.Rulesets.Mania.Objects;
diff --git a/osu.Game.Rulesets.Mania/LAsEZMania/ManiaKeyCounterDisplay.cs b/osu.Game.Rulesets.Mania/LAsEZMania/ManiaKeyCounterDisplay.cs
index 816fa4dc35..d640457e9e 100644
--- a/osu.Game.Rulesets.Mania/LAsEZMania/ManiaKeyCounterDisplay.cs
+++ b/osu.Game.Rulesets.Mania/LAsEZMania/ManiaKeyCounterDisplay.cs
@@ -8,6 +8,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Screens;
+using osu.Game.Screens.LAsEzExtensions;
using osu.Game.Screens.Play.HUD;
using osuTK;
@@ -64,7 +65,7 @@ namespace osu.Game.Rulesets.Mania.LAsEZMania
float width = (float)columnWidth.Value;
int index = KeyFlow.IndexOf(counter);
- if (StageDefinition.EzIsSpecialColumn(index))
+ if (EzColumnTypeManager.GetColumnType(StageDefinition.Columns, index) == "S1")
width *= (float)specialFactor.Value;
counter.Width = width;
diff --git a/osu.Game.Rulesets.Mania/ManiaRuleset.cs b/osu.Game.Rulesets.Mania/ManiaRuleset.cs
index 924b0565e5..e54c3b8e08 100644
--- a/osu.Game.Rulesets.Mania/ManiaRuleset.cs
+++ b/osu.Game.Rulesets.Mania/ManiaRuleset.cs
@@ -8,6 +8,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Bindings;
using osu.Framework.Localisation;
+using osu.Framework.Logging;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Legacy;
using osu.Game.Configuration;
@@ -86,13 +87,19 @@ namespace osu.Game.Rulesets.Mania
case Ez2Skin:
if (GlobalConfigStore.EzConfig == null)
- throw new ArgumentNullException(nameof(GlobalConfigStore.Config));
+ {
+ Logger.Log("!EGlobalConfigStore.EzConfig", LoggingTarget.Runtime, LogLevel.Important);
+ break;
+ }
return new ManiaEz2SkinTransformer(skin, beatmap, GlobalConfigStore.EzConfig);
case EzStyleProSkin:
if (GlobalConfigStore.EzConfig == null)
- throw new ArgumentNullException(nameof(GlobalConfigStore.Config));
+ {
+ Logger.Log("!GlobalConfigStore.EzConfig", LoggingTarget.Runtime, LogLevel.Important);
+ break;
+ }
return new ManiaEzStyleProSkinTransformer(skin, beatmap, GlobalConfigStore.EzConfig);
diff --git a/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs b/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs
index 9dcc49747e..9c831a44ab 100644
--- a/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs
+++ b/osu.Game.Rulesets.Mania/ManiaSettingsSubsection.cs
@@ -9,6 +9,7 @@ using osu.Game.Graphics.UserInterface;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings;
using osu.Game.Rulesets.Mania.Configuration;
+using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.UI;
namespace osu.Game.Rulesets.Mania
@@ -45,17 +46,19 @@ namespace osu.Game.Rulesets.Mania
Current = config.GetBindable(ManiaRulesetSetting.ScrollSpeed),
KeyboardStep = 1,
},
- new SettingsSlider
+ new SettingsSlider
{
LabelText = "Scroll Base MS (when 200 Speed)",
Current = config.GetBindable(ManiaRulesetSetting.ScrollBaseSpeed),
KeyboardStep = 1,
+ Keywords = new[] { "base" }
},
- new SettingsSlider
+ new SettingsSlider
{
- LabelText = "MS / Scroll Speed",
+ LabelText = "MS / Speed",
Current = config.GetBindable(ManiaRulesetSetting.ScrollTimePerSpeed),
KeyboardStep = 1,
+ Keywords = new[] { "mps" }
},
new SettingsCheckbox
{
@@ -85,20 +88,63 @@ namespace osu.Game.Rulesets.Mania
this.config = config;
}
- public override LocalisableString TooltipText => RulesetSettingsStrings.ScrollSpeedTooltip(
- (int)DrawableManiaRuleset.ComputeScrollTime(Current.Value, config.Get(ManiaRulesetSetting.ScrollBaseSpeed), config.Get(ManiaRulesetSetting.ScrollTimePerSpeed)),
- Current.Value
- );
+ public override LocalisableString TooltipText
+ {
+ get
+ {
+ double baseSpeed = config.Get(ManiaRulesetSetting.ScrollBaseSpeed);
+ double timePerSpeed = config.Get(ManiaRulesetSetting.ScrollTimePerSpeed);
+ int computedTime = (int)DrawableManiaRuleset.ComputeScrollTime(Current.Value, baseSpeed, timePerSpeed);
+ LocalisableString speedInfo = RulesetSettingsStrings.ScrollSpeedTooltip(computedTime, Current.Value);
+ return $"{baseSpeed}base - ( {Current.Value} - 200) * {timePerSpeed}mps\n = {speedInfo}";
+ }
+ }
}
- private partial class ManiaScrollBaseSpeedSlider : RoundedSliderBar
+ private partial class ManiaScrollBaseSlider : RoundedSliderBar
{
- public override LocalisableString TooltipText => RulesetSettingsStrings.ScrollSpeedTooltip(
- (int)Current.Value, 200);
+ private ManiaRulesetConfigManager config = null!;
+
+ [BackgroundDependencyLoader]
+ private void load(ManiaRulesetConfigManager config)
+ {
+ this.config = config;
+ }
+
+ public override LocalisableString TooltipText
+ {
+ get
+ {
+ double speed = config.Get(ManiaRulesetSetting.ScrollSpeed);
+ double timePerSpeed = config.Get(ManiaRulesetSetting.ScrollTimePerSpeed);
+ int computedTime = (int)DrawableManiaRuleset.ComputeScrollTime(speed, Current.Value, timePerSpeed);
+ LocalisableString speedInfo = RulesetSettingsStrings.ScrollSpeedTooltip(computedTime, speed);
+ return $"{Current.Value}base - ( {speed} - 200) * {timePerSpeed}mps\n = {speedInfo}";
+ }
+ }
}
- private partial class ManiaScrollTimePerSpeedSlider : RoundedSliderBar
+ private partial class ManiaScrollMsPerSpeedSlider : RoundedSliderBar
{
+ private ManiaRulesetConfigManager config = null!;
+
+ [BackgroundDependencyLoader]
+ private void load(ManiaRulesetConfigManager config)
+ {
+ this.config = config;
+ }
+
+ public override LocalisableString TooltipText
+ {
+ get
+ {
+ double speed = config.Get(ManiaRulesetSetting.ScrollSpeed);
+ double baseSpeed = config.Get(ManiaRulesetSetting.ScrollBaseSpeed);
+ int computedTime = (int)DrawableManiaRuleset.ComputeScrollTime(speed, baseSpeed, Current.Value);
+ LocalisableString speedInfo = RulesetSettingsStrings.ScrollSpeedTooltip(computedTime, speed);
+ return $"{baseSpeed}base - ( {speed} - 200) * {Current.Value}mps\n = {speedInfo}";
+ }
+ }
}
}
}
diff --git a/osu.Game.Rulesets.Mania/Mods/LAsMods/ManiaModJudgmentStyle.cs b/osu.Game.Rulesets.Mania/Mods/LAsMods/ManiaModJudgmentStyle.cs
index 2464c7ed43..3c9f02b19f 100644
--- a/osu.Game.Rulesets.Mania/Mods/LAsMods/ManiaModJudgmentStyle.cs
+++ b/osu.Game.Rulesets.Mania/Mods/LAsMods/ManiaModJudgmentStyle.cs
@@ -164,7 +164,7 @@ namespace osu.Game.Rulesets.Mania.Mods.LAsMods
hitWindows.SetDifficulty(difficulty.OverallDifficulty);
}
- public override void ResetHitWindows()
+ public override void ResetSettingsToDefaults()
{
hitWindows.ResetHitWindows();
}
diff --git a/osu.Game.Rulesets.Mania/Mods/YuLiangSSSMods/ManiaModNewJudgement.cs b/osu.Game.Rulesets.Mania/Mods/YuLiangSSSMods/ManiaModNewJudgement.cs
index 843a619f1b..6398063e3f 100644
--- a/osu.Game.Rulesets.Mania/Mods/YuLiangSSSMods/ManiaModNewJudgement.cs
+++ b/osu.Game.Rulesets.Mania/Mods/YuLiangSSSMods/ManiaModNewJudgement.cs
@@ -102,7 +102,7 @@ namespace osu.Game.Rulesets.Mania.Mods.YuLiangSSSMods
HitWindows.SetDifficulty(difficulty.OverallDifficulty);
}
- public override void ResetHitWindows()
+ public override void ResetSettingsToDefaults()
{
HitWindows.ResetHitWindows();
}
diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaHitWindows.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaHitWindows.cs
index e3f6301bec..28e6447656 100644
--- a/osu.Game.Rulesets.Mania/Scoring/ManiaHitWindows.cs
+++ b/osu.Game.Rulesets.Mania/Scoring/ManiaHitWindows.cs
@@ -55,12 +55,12 @@ namespace osu.Game.Rulesets.Mania.Scoring
public override void SetDifficulty(double difficulty)
{
- perfect = IBeatmapDifficultyInfo.DifficultyRange(difficulty, perfect_window_range) * multiplier;
- great = IBeatmapDifficultyInfo.DifficultyRange(difficulty, great_window_range) * multiplier;
- good = IBeatmapDifficultyInfo.DifficultyRange(difficulty, good_window_range) * multiplier;
- ok = IBeatmapDifficultyInfo.DifficultyRange(difficulty, ok_window_range) * multiplier;
- meh = IBeatmapDifficultyInfo.DifficultyRange(difficulty, meh_window_range) * multiplier;
- miss = IBeatmapDifficultyInfo.DifficultyRange(difficulty, miss_window_range) * multiplier;
+ perfect = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, perfect_window_range) * multiplier) + 0.5;
+ great = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, great_window_range) * multiplier) + 0.5;
+ good = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, good_window_range) * multiplier) + 0.5;
+ ok = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, ok_window_range) * multiplier) + 0.5;
+ meh = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, meh_window_range) * multiplier) + 0.5;
+ miss = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, miss_window_range) * multiplier) + 0.5;
}
public override double WindowFor(HitResult result)
diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2ColumnBackground.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2ColumnBackground.cs
index 0a6f9af638..1b644a47a1 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2ColumnBackground.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2ColumnBackground.cs
@@ -13,7 +13,6 @@ using osu.Framework.Input.Events;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.UI;
-using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Screens;
using osuTK.Graphics;
@@ -22,14 +21,13 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
public partial class Ez2ColumnBackground : CompositeDrawable, IKeyBindingHandler
{
private readonly Bindable overlayHeight = new Bindable();
- private readonly Bindable hitPosition = new Bindable();
- private readonly IBindable direction = new Bindable();
+ private Bindable hitPosition = new Bindable();
private Color4 brightColour;
private Color4 dimColour;
private Box background = null!;
private Box backgroundOverlay = null!;
- private Box? separator;
+ private Box separator = new Box();
private Bindable accentColour = null!;
[Resolved]
@@ -43,12 +41,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
public Ez2ColumnBackground()
{
+ Anchor = Anchor.BottomLeft;
+ Origin = Anchor.BottomLeft;
RelativeSizeAxes = Axes.Both;
- Masking = true;
+ // Masking = true;
}
[BackgroundDependencyLoader]
- private void load(IScrollingInfo scrollingInfo)
+ private void load()
{
InternalChild = new Container
{
@@ -99,46 +99,27 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
brightColour = colour.NewValue.Opacity(0.6f);
dimColour = colour.NewValue.Opacity(0);
}, true);
-
- direction.BindTo(scrollingInfo.Direction);
- direction.BindValueChanged(onDirectionChanged, true);
}
protected override void LoadComplete()
{
base.LoadComplete();
- ezSkinConfig.BindWith(EzSkinSetting.HitPosition, hitPosition);
+ hitPosition = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
hitPosition.BindValueChanged(_ => OnConfigChanged(), true);
- OnConfigChanged();
}
private void OnConfigChanged()
{
- if (separator != null)
- {
- separator.Height = DrawHeight - (float)hitPosition.Value;
+ separator.Height = DrawHeight - (float)hitPosition.Value;
- if (drawSeparator(column.Index, stageDefinition))
- {
- separator.Alpha = 0.2f;
- }
- else
- {
- separator.Alpha = 0;
- }
- }
- }
-
- private void onDirectionChanged(ValueChangedEvent direction)
- {
- if (direction.NewValue == ScrollingDirection.Up)
+ if (drawSeparator(column.Index, stageDefinition))
{
- backgroundOverlay.Anchor = backgroundOverlay.Origin = Anchor.TopLeft;
+ separator.Alpha = 0.2f;
}
else
{
- backgroundOverlay.Anchor = backgroundOverlay.Origin = Anchor.BottomLeft;
+ separator.Alpha = 0;
}
}
@@ -150,9 +131,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
brightColour = noteColour.Opacity(0.9f);
dimColour = noteColour.Opacity(0);
- backgroundOverlay.Colour = direction.Value == ScrollingDirection.Up
- ? ColourInfo.GradientVertical(brightColour, dimColour)
- : ColourInfo.GradientVertical(dimColour, brightColour);
+ backgroundOverlay.Colour = ColourInfo.GradientVertical(dimColour, brightColour);
overlayHeight.Value = 0.5f;
diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2KeyArea.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2KeyArea.cs
index a8efe03e5b..543448c8de 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2KeyArea.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2KeyArea.cs
@@ -15,7 +15,6 @@ using osu.Framework.Input.Events;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
-using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Screens;
@@ -46,9 +45,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
[Resolved]
private IGameplayClock gameplayClock { get; set; } = null!;
- [Resolved]
- private StageDefinition stageDefinition { get; set; } = null!;
-
[Resolved]
private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
@@ -60,9 +56,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
[BackgroundDependencyLoader]
private void load(IScrollingInfo scrollingInfo)
{
- if (stageDefinition.Columns == 14 && column.Index == 13)
- return;
-
hitPosition.Value = (float)ezSkinConfig.GetBindable(EzSkinSetting.HitPosition).Value;
InternalChild = directionContainer = new Container
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/Ez2KeyAreaPro.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2KeyAreaPlus.cs
similarity index 98%
rename from osu.Game.Rulesets.Mania/Skinning/EzStylePro/Ez2KeyAreaPro.cs
rename to osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2KeyAreaPlus.cs
index 34e8ff3216..a92c71f9e1 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/Ez2KeyAreaPro.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2/Ez2KeyAreaPlus.cs
@@ -15,16 +15,15 @@ using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.Mania.LAsEZMania;
-using osu.Game.Rulesets.Mania.Skinning.Ez2;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Screens.Play;
using osuTK;
using osuTK.Graphics;
-namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
+namespace osu.Game.Rulesets.Mania.Skinning.Ez2
{
- public partial class Ez2KeyAreaPro : CompositeDrawable, IKeyBindingHandler
+ public partial class Ez2KeyAreaPlus : CompositeDrawable, IKeyBindingHandler
{
private readonly IBindable direction = new Bindable();
@@ -46,7 +45,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
[Resolved]
private IGameplayClock gameplayClock { get; set; } = null!;
- public Ez2KeyAreaPro()
+ public Ez2KeyAreaPlus()
{
RelativeSizeAxes = Axes.Both;
}
diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2/ManiaEz2SkinTransformer.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2/ManiaEz2SkinTransformer.cs
index 17b4436662..8e130f6984 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Ez2/ManiaEz2SkinTransformer.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2/ManiaEz2SkinTransformer.cs
@@ -9,6 +9,7 @@ using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.Skinning.Ez2HUD;
+using osu.Game.Rulesets.Mania.Skinning.EzStylePro;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens;
using osu.Game.Screens.Play.HUD.HitErrorMeters;
@@ -183,7 +184,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
// if (Skin is Ez2Skin && resultComponent.Component >= HitResult.Perfect)
// return Drawable.Empty();
- return new Ez2ColumnBackground();
+ return new EzColumnBackground();
case ManiaSkinComponents.KeyArea:
return new Ez2KeyArea();
@@ -224,7 +225,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
bool isSpecialColumn = stage.EzIsSpecialColumn(columnIndex);
float width = (float)columnWidthBindable.Value * (isSpecialColumn ? (float)specialFactorBindable.Value : 1f);
- float hitPositionValue = (float)hitPosition.Value; // + (float)virtualHitPosition.Value - 110f;
+ // float hitPositionValue = (float)hitPosition.Value; // + (float)virtualHitPosition.Value - 110f;
if (stage.Columns == 14 && columnIndex == 13)
width = 0f;
@@ -234,8 +235,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2
case LegacyManiaSkinConfigurationLookups.ColumnWidth:
return SkinUtils.As(new Bindable(width));
- case LegacyManiaSkinConfigurationLookups.HitPosition:
- return SkinUtils.As(new Bindable(hitPositionValue));
+ // case LegacyManiaSkinConfigurationLookups.HitPosition:
+ // return SkinUtils.As(new Bindable(hitPositionValue));
case LegacyManiaSkinConfigurationLookups.ColumnBackgroundColour:
diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/Ez2SongProgress.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/Ez2SongProgress.cs
index fcffaf0d59..b6f0f79c5b 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/Ez2SongProgress.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/Ez2SongProgress.cs
@@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.UseRelativeSize))]
public BindableBool UseRelativeSize { get; } = new BindableBool(true);
- [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour), nameof(SkinnableComponentStrings.ColourDescription))]
+ [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour))]
public BindableColour4 AccentColour { get; } = new BindableColour4(Colour4.White);
[Resolved]
diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComComboCounter.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComComboCounter.cs
index ff19249506..4c4df61841 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComComboCounter.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComComboCounter.cs
@@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
public Bindable NameDropdown { get; } = new Bindable((EzSelectorNameSet)4);
[SettingSource("Effect Type", "Effect Type")]
- public Bindable Effect { get; } = new Bindable(EffectType.Scale);
+ public Bindable Effect { get; } = new Bindable(EzComEffectType.Scale);
// [SettingSource("Effect Origin", "Effect Origin", SettingControlType = typeof(AnchorDropdown))]
// public Bindable EffectOrigin { get; } = new Bindable(Anchor.TopCentre)
@@ -71,7 +71,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
Precision = 0.01f,
};
- [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour), nameof(SkinnableComponentStrings.ColourDescription))]
+ [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour))]
public BindableColour4 AccentColour { get; } = new BindableColour4(Colour4.White);
public EzComboText Text = null!;
@@ -114,7 +114,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
{
switch (Effect.Value)
{
- case EffectType.Scale:
+ case EzComEffectType.Scale:
EzEffectHelper.ApplyScaleAnimation(
Text.TextContainer,
wasIncrease,
@@ -125,7 +125,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
EffectEndDuration.Value);
break;
- case EffectType.Bounce:
+ case EzComEffectType.Bounce:
EzEffectHelper.ApplyBounceAnimation(
Text.TextContainer,
wasIncrease,
diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComComboSprite.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComComboSprite.cs
index 3b45b78614..e865c4e6d9 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComComboSprite.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComComboSprite.cs
@@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
public Bindable NameDropdown { get; } = new Bindable((EzSelectorNameSet)4);
[SettingSource("Effect Type", "Effect Type")]
- public Bindable Effect { get; } = new Bindable(EffectType.Scale);
+ public Bindable Effect { get; } = new Bindable(EzComEffectType.Scale);
[SettingSource("Effect Origin", "Effect Origin", SettingControlType = typeof(AnchorDropdown))]
public Bindable EffectOrigin { get; } = new Bindable(Anchor.TopCentre)
@@ -62,7 +62,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
Precision = 0.01f,
};
- [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour), nameof(SkinnableComponentStrings.ColourDescription))]
+ [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour))]
public BindableColour4 AccentColour { get; } = new BindableColour4(Colour4.White);
public EzComboText Text = null!;
@@ -137,7 +137,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
{
switch (Effect.Value)
{
- case EffectType.Scale:
+ case EzComEffectType.Scale:
EzEffectHelper.ApplyScaleAnimation(
Text.TextContainer,
wasIncrease,
@@ -148,7 +148,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
EffectEndDuration.Value);
break;
- case EffectType.Bounce:
+ case EzComEffectType.Bounce:
EzEffectHelper.ApplyBounceAnimation(
Text.TextContainer,
wasIncrease,
diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComHitTiming.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComHitTiming.cs
index bad86f1d01..13519bc5b7 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComHitTiming.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComHitTiming.cs
@@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
Precision = 0.01f,
};
- [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour), nameof(SkinnableComponentStrings.ColourDescription))]
+ [SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour))]
public BindableColour4 AccentColour { get; } = new BindableColour4(Colour4.White);
private Container timingContainer = null!;
diff --git a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComKeyCounterDisplay.cs b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComKeyCounterDisplay.cs
index 2d68ee272d..47ffdc3fd3 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComKeyCounterDisplay.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Ez2HUD/EzComKeyCounterDisplay.cs
@@ -51,7 +51,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.Ez2HUD
protected override void LoadComplete()
{
base.LoadComplete();
- updateWidths();
triggers.BindTo(controller.Triggers);
triggers.BindCollectionChanged(triggersChanged, true);
columnWidth.BindValueChanged(_ => updateWidths(), true);
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzColumnBackground.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzColumnBackground.cs
new file mode 100644
index 0000000000..675e877947
--- /dev/null
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzColumnBackground.cs
@@ -0,0 +1,168 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using System.Linq;
+using osu.Framework.Allocation;
+using osu.Framework.Bindables;
+using osu.Framework.Extensions.Color4Extensions;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Colour;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Shapes;
+using osu.Framework.Input.Bindings;
+using osu.Framework.Input.Events;
+using osu.Game.Rulesets.Mania.Beatmaps;
+using osu.Game.Rulesets.Mania.UI;
+using osu.Game.Screens;
+using osuTK.Graphics;
+
+namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
+{
+ public partial class EzColumnBackground : CompositeDrawable, IKeyBindingHandler
+ {
+ private Bindable hitPosition = new Bindable();
+ private Color4 brightColour;
+ private Color4 dimColour;
+
+ private Box backgroundOverlay = null!;
+
+ private readonly Box separator = new Box
+ {
+ Name = "Separator",
+ Anchor = Anchor.TopRight,
+ Origin = Anchor.TopCentre,
+ Width = 2,
+ Colour = Color4.White.Opacity(0.5f),
+ Alpha = 0,
+ };
+
+ private Bindable accentColour = null!;
+
+ [Resolved]
+ protected Column Column { get; private set; } = null!;
+
+ [Resolved]
+ private StageDefinition stageDefinition { get; set; } = null!;
+
+ [Resolved]
+ private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
+
+ public EzColumnBackground()
+ {
+ Anchor = Anchor.BottomLeft;
+ Origin = Anchor.BottomLeft;
+ RelativeSizeAxes = Axes.Both;
+ // Masking = true;
+ }
+
+ [BackgroundDependencyLoader]
+ private void load()
+ {
+ InternalChild = new Container
+ {
+ RelativeSizeAxes = Axes.Both,
+ Children = new Drawable[]
+ {
+ new Box
+ {
+ Name = "Background",
+ RelativeSizeAxes = Axes.Both,
+ Colour = Color4.Black.Opacity(0.8f).Darken(3),
+ },
+ backgroundOverlay = new Box
+ {
+ Name = "Background Gradient Overlay",
+ RelativeSizeAxes = Axes.Both,
+ Anchor = Anchor.BottomLeft,
+ Origin = Anchor.BottomLeft,
+ Height = 0.5f,
+ Blending = BlendingParameters.Additive,
+ Alpha = 0
+ },
+ }
+ };
+
+ accentColour = new Bindable(ezSkinConfig.GetColumnColor(stageDefinition.Columns, Column.Index));
+ accentColour.BindValueChanged(colour =>
+ {
+ var newColour = colour.NewValue.Darken(3);
+
+ if (newColour.A != 0)
+ {
+ newColour = newColour.Opacity(0.8f);
+ }
+
+ backgroundOverlay.Colour = newColour;
+ brightColour = colour.NewValue.Opacity(0.6f);
+ dimColour = colour.NewValue.Opacity(0);
+ }, true);
+ }
+
+ protected override void LoadComplete()
+ {
+ base.LoadComplete();
+
+ bool hasSeparator = Column.TopLevelContainer.Children
+ .OfType()
+ .Any(b => b.Name == "Separator");
+
+ if (!hasSeparator)
+ Column.TopLevelContainer.Add(separator);
+
+ hitPosition = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
+ hitPosition.BindValueChanged(_ => OnConfigChanged(), true);
+ }
+
+ protected virtual Color4 NoteColor
+ {
+ get
+ {
+ int keyMode = stageDefinition.Columns;
+ int columnIndex = Column.Index;
+ return ezSkinConfig.GetColumnColor(keyMode, columnIndex);
+ }
+ }
+
+ private void OnConfigChanged()
+ {
+ separator.Height = DrawHeight - (float)hitPosition.Value;
+
+ if (drawSeparator(Column.Index, stageDefinition))
+ separator.Alpha = 0.25f;
+ else
+ separator.Alpha = 0;
+ }
+
+ public bool OnPressed(KeyBindingPressEvent e)
+ {
+ if (e.Action == Column.Action.Value)
+ {
+ var noteColour = NoteColor;
+ brightColour = noteColour.Opacity(0.9f);
+ dimColour = noteColour.Opacity(0);
+ backgroundOverlay.Colour = ColourInfo.GradientVertical(dimColour, brightColour);
+ backgroundOverlay.FadeTo(1, 50, Easing.OutQuint).Then().FadeTo(0.5f, 250, Easing.OutQuint);
+ }
+
+ return false;
+ }
+
+ public void OnReleased(KeyBindingReleaseEvent e)
+ {
+ if (e.Action == Column.Action.Value)
+ backgroundOverlay.FadeTo(0, 250, Easing.OutQuint);
+ }
+
+ //TODO: 这里的逻辑可以优化,避免重复计算
+ private bool drawSeparator(int columnIndex, StageDefinition stage)
+ {
+ return stage.Columns switch
+ {
+ 12 => columnIndex is 0 or 10,
+ 14 => columnIndex is 0 or 5 or 6 or 11,
+ 16 => columnIndex is 0 or 5 or 9 or 14,
+ _ => false
+ };
+ }
+ }
+}
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHitExplosion.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHitExplosion.cs
index 3ece24ffd0..b3b39c99fe 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHitExplosion.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHitExplosion.cs
@@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
@@ -9,10 +8,8 @@ using osu.Framework.Graphics.Animations;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mania.Beatmaps;
-using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.Scoring;
-using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Screens;
using osu.Game.Screens.LAsEzExtensions;
using osuTK;
@@ -21,22 +18,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
{
public partial class EzHitExplosion : CompositeDrawable, IHitExplosion
{
- // public override bool RemoveWhenNotAlive => true;
-
- private readonly IBindable direction = new Bindable();
- private readonly Bindable columnWidth = new Bindable();
-
- private IBindable noteHeightBindable = new Bindable();
- private IBindable columnWidthBindable = new Bindable();
- private IBindable specialFactorBindable = new Bindable();
- private IBindable hitPosition = new Bindable();
-
private TextureAnimation? animation;
private TextureAnimation? animationP;
private Container container = null!;
- [UsedImplicitly]
- private float baseYPosition;
+ private IBindable noteHeightBindable = new Bindable();
+ private IBindable columnWidthBindable = new Bindable();
+ private IBindable specialFactorBindable = new Bindable();
+
+ // public override bool RemoveWhenNotAlive => true;
[Resolved]
private Column column { get; set; } = null!;
@@ -45,10 +35,10 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
private StageDefinition stageDefinition { get; set; } = null!;
[Resolved]
- private EzLocalTextureFactory factory { get; set; } = null!;
+ private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
[Resolved]
- private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
+ private EzLocalTextureFactory factory { get; set; } = null!;
public EzHitExplosion()
{
@@ -57,27 +47,24 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
}
[BackgroundDependencyLoader]
- private void load(IScrollingInfo scrollingInfo)
+ private void load()
{
- direction.BindTo(scrollingInfo.Direction);
- direction.BindValueChanged(onDirectionChanged, true);
+ Anchor = Anchor.BottomCentre;
+ Origin = Anchor.BottomCentre;
noteHeightBindable = ezSkinConfig.GetBindable(EzSkinSetting.NonSquareNoteHeight);
columnWidthBindable = ezSkinConfig.GetBindable(EzSkinSetting.ColumnWidth);
specialFactorBindable = ezSkinConfig.GetBindable(EzSkinSetting.SpecialFactor);
- hitPosition = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
noteHeightBindable.BindValueChanged(_ => updateY(), true);
columnWidthBindable.BindValueChanged(_ => updateY(), true);
specialFactorBindable.BindValueChanged(_ => updateY(), true);
- hitPosition.BindValueChanged(_ => updateY(), true);
}
protected override void LoadComplete()
{
base.LoadComplete();
onSkinChanged();
-
factory.OnNoteChanged += onSkinChanged;
}
@@ -85,10 +72,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
{
base.Dispose(isDisposing);
- if (isDisposing)
- {
- factory.OnNoteChanged -= onSkinChanged;
- }
+ if (isDisposing) { factory.OnNoteChanged -= onSkinChanged; }
}
private void loadAnimation()
@@ -98,9 +82,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
animation = factory.CreateAnimation("noteflare");
animationP = factory.CreateAnimation("noteflaregood");
- animation.Loop = false;
- animationP.Loop = false;
-
container = new Container
{
Anchor = Anchor.BottomCentre,
@@ -116,18 +97,18 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
private void updateY()
{
- bool isSpecialColumn = stageDefinition.EzIsSpecialColumn(column.Index);
- columnWidth.Value = columnWidthBindable.Value * (isSpecialColumn ? specialFactorBindable.Value : 1);
+ bool isSpecialColumn = EzColumnTypeManager.GetColumnType(stageDefinition.Columns, column.Index) == "S1";
+ double columnWidth = columnWidthBindable.Value * (isSpecialColumn ? specialFactorBindable.Value : 1);
bool isSquare = factory.IsSquareNote("whitenote");
float aspectRatio = factory.GetRatio("whitenote");
float moveY = isSquare
- ? (float)columnWidth.Value / 2 * aspectRatio
+ ? (float)columnWidth / 2 * aspectRatio
: (float)noteHeightBindable.Value / 2 * aspectRatio;
- baseYPosition = 110f - (float)hitPosition.Value - moveY;
- Position = new Vector2(0, baseYPosition);
+ // baseYPosition = LegacyManiaSkinConfiguration.DEFAULT_HIT_POSITION - (float)hitPosition.Value - moveY;
+ Position = new Vector2(0, -moveY);
}
private void onSkinChanged()
@@ -135,12 +116,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
loadAnimation();
}
- private void onDirectionChanged(ValueChangedEvent direction)
- {
- Rotation = direction.NewValue == ScrollingDirection.Up ? 90f : 0;
- Anchor = Origin = direction.NewValue == ScrollingDirection.Up ? Anchor.TopCentre : Anchor.BottomCentre;
- }
-
public void Animate(JudgementResult result)
{
loadAnimation();
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHitTarget.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHitTarget.cs
index da1074c198..2b04878056 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHitTarget.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHitTarget.cs
@@ -3,20 +3,15 @@
using System;
using osu.Framework.Allocation;
-using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
-using osu.Game.Rulesets.UI.Scrolling;
-using osu.Game.Screens;
using osu.Game.Screens.Play;
-using osuTK;
namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
{
internal partial class EzHitTarget : EzNote
{
- private readonly IBindable direction = new Bindable();
- private IBindable hitPosition = new Bindable();
+ // private IBindable hitPosition = new Bindable();
protected override bool ShowSeparators => false;
protected override bool UseColorization => false;
@@ -28,8 +23,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
[Resolved]
private IGameplayClock gameplayClock { get; set; } = null!;
- [Resolved]
- private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
+ // [Resolved]
+ // private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
public EzHitTarget()
{
@@ -39,16 +34,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
}
[BackgroundDependencyLoader]
- private void load(IScrollingInfo scrollingInfo)
+ private void load()
{
- direction.BindTo(scrollingInfo.Direction);
- direction.BindValueChanged(onDirectionChanged, true);
-
- hitPosition = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
- hitPosition.BindValueChanged(_ => updateY(), true);
+ Anchor = Anchor.BottomCentre;
+ Origin = Anchor.BottomCentre;
+ // hitPosition = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
+ // hitPosition.BindValueChanged(_ => updateY(), true);
}
- private float baseYPosition;
+ // private float baseYPosition = 0f;
private double beatInterval;
protected override void LoadComplete()
@@ -65,18 +59,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
double progress = (gameplayClock.CurrentTime % beatInterval) / beatInterval;
// 平滑正弦波效果
double smoothValue = 0.3 * Math.Sin(progress * 2 * Math.PI);
- Y = baseYPosition + (float)(smoothValue * 6);
+ Y = (float)(smoothValue * 6);
}
- private void updateY()
- {
- baseYPosition = 110f - (float)hitPosition.Value;
- Position = new Vector2(0, baseYPosition);
- }
-
- private void onDirectionChanged(ValueChangedEvent direction)
- {
- Anchor = Origin = direction.NewValue == ScrollingDirection.Up ? Anchor.TopCentre : Anchor.BottomCentre;
- }
+ //DrawableManiaRuleset中关联设置后,此处不必设置
+ // private void updateY()
+ // {
+ // baseYPosition = LegacyManiaSkinConfiguration.DEFAULT_HIT_POSITION - (float)hitPosition.Value;
+ // Position = new Vector2(0, baseYPosition);
+ // }
}
}
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteHead.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteHead.cs
index 43daa02b81..64b247186c 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteHead.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteHead.cs
@@ -7,7 +7,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Animations;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Beatmaps;
-using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Screens;
using osu.Game.Screens.LAsEzExtensions;
@@ -21,7 +20,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
private Bindable nonSquareNoteHeight = null!;
private TextureAnimation animation = null!;
- private Container? container;
+ private Container container = null!;
private EzNoteSideLine? noteSeparatorsL;
private EzNoteSideLine? noteSeparatorsR;
@@ -45,13 +44,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
nonSquareNoteHeight = ezSkinConfig.GetBindable(EzSkinSetting.NonSquareNoteHeight);
enabledColor = ezSkinConfig.GetBindable(EzSkinSetting.ColorSettingsEnabled);
+ OnSkinChanged();
}
protected override void LoadComplete()
{
base.LoadComplete();
- OnSkinChanged();
- nonSquareNoteHeight.ValueChanged += _ => updateSizes();
+
+ nonSquareNoteHeight.BindValueChanged(_ => updateSizes(), true);
ezSkinConfig.OnSettingsChanged += OnConfigChanged;
factory.OnNoteChanged += OnSkinChanged;
}
@@ -84,14 +84,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
if (enabledColor.Value)
return "white";
- if (stageDefinition.EzIsSpecialColumn(column.Index))
+ if (EzColumnTypeManager.GetColumnType(stageDefinition.Columns, column.Index) == "S1")
return "green";
int logicalIndex = 0;
for (int i = 0; i < column.Index; i++)
{
- if (!stageDefinition.EzIsSpecialColumn(i))
+ if (EzColumnTypeManager.GetColumnType(stageDefinition.Columns, i) != "S1")
logicalIndex++;
}
@@ -164,7 +164,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
AddInternal(animation);
}
- Schedule(updateSizes);
+ OnConfigChanged();
}
private void updateSizes()
@@ -176,11 +176,10 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
Height = noteHeight;
- if (container != null)
+ if (container.Children.Count > 0 && container.Child is Container c)
{
container.Height = noteHeight / 2;
- if (container.Child is Container containerA)
- containerA.Height = noteHeight;
+ c.Height = noteHeight;
}
}
@@ -191,7 +190,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
noteColor = NoteColor;
animation.Colour = noteColor;
-
+ container.Colour = noteColor;
noteSeparatorsL?.UpdateGlowEffect(noteColor);
noteSeparatorsR?.UpdateGlowEffect(noteColor);
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteHittingLayer.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteHittingLayer.cs
index 35d3affc49..dcd6d0607b 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteHittingLayer.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteHittingLayer.cs
@@ -8,10 +8,10 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Animations;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Beatmaps;
-using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Screens;
using osu.Game.Screens.LAsEzExtensions;
+using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
@@ -19,17 +19,16 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
public partial class EzHoldNoteHittingLayer : CompositeDrawable
{
public readonly Bindable IsHitting = new Bindable();
- private readonly IBindable noteHeightBindable = new Bindable();
- private readonly IBindable columnWidthBindable = new Bindable();
- private readonly IBindable specialFactorBindable = new Bindable();
- private readonly IBindable hitPosition = new Bindable();
-
private TextureAnimation? animation;
- // [UsedImplicitly]
- private readonly Bindable noteSize = new Bindable();
+ private IBindable noteHeightBindable = new Bindable();
+ private IBindable columnWidthBindable = new Bindable();
+ private IBindable specialFactorBindable = new Bindable();
- private float baseYPosition;
+ public IBindable HitPosition { get; set; } = new Bindable();
+
+ // private IBindable hitPosition = new Bindable();
+ // private float baseYPosition;
[Resolved]
private Column column { get; set; } = null!;
@@ -38,50 +37,30 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
private StageDefinition stageDefinition { get; set; } = null!;
[Resolved]
- private EzLocalTextureFactory factory { get; set; } = null!;
+ private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
[Resolved]
- private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
+ private EzLocalTextureFactory factory { get; set; } = null!;
public EzHoldNoteHittingLayer()
{
Anchor = Anchor.BottomCentre;
Origin = Anchor.Centre;
- AutoSizeAxes = Axes.Both;
+ // AutoSizeAxes = Axes.Both;
Blending = BlendingParameters.Additive;
}
[BackgroundDependencyLoader]
private void load()
{
- noteHeightBindable.BindTo(ezSkinConfig.GetBindable(EzSkinSetting.NonSquareNoteHeight));
- columnWidthBindable.BindTo(ezSkinConfig.GetBindable(EzSkinSetting.ColumnWidth));
- specialFactorBindable.BindTo(ezSkinConfig.GetBindable(EzSkinSetting.SpecialFactor));
- hitPosition.BindTo(ezSkinConfig.GetBindable(EzSkinSetting.HitPosition));
-
- hitPosition.BindValueChanged(_ => updateY(), true);
- noteHeightBindable.BindValueChanged(_ => updateY(), true);
- columnWidthBindable.BindValueChanged(_ => updateY());
- specialFactorBindable.BindValueChanged(_ => updateY());
-
- noteSize.BindValueChanged(_ => updateY(), true);
- IsHitting.BindValueChanged(hitting =>
- {
- ClearTransforms();
- // Logger.Log($"IsHitting changed to: {hitting.NewValue}", LoggingTarget.Runtime, LogLevel.Debug);
- // animation.IsPlaying = hitting.NewValue;
-
- if (hitting.NewValue && animation.IsNotNull())
- {
- Alpha = 1;
-
- animation.Restart();
- }
- else
- {
- Alpha = 0;
- }
- }, true);
+ noteHeightBindable = ezSkinConfig.GetBindable(EzSkinSetting.NonSquareNoteHeight);
+ columnWidthBindable = ezSkinConfig.GetBindable(EzSkinSetting.ColumnWidth);
+ specialFactorBindable = ezSkinConfig.GetBindable(EzSkinSetting.SpecialFactor);
+ HitPosition = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
+ noteHeightBindable.BindValueChanged(_ => UpdateLNsLight(), true);
+ columnWidthBindable.BindValueChanged(_ => UpdateLNsLight(), true);
+ specialFactorBindable.BindValueChanged(_ => UpdateLNsLight(), true);
+ // hitPosition.BindValueChanged(_ => updateY(), true);
}
protected override void LoadComplete()
@@ -89,6 +68,25 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
base.LoadComplete();
onSkinChanged();
factory.OnNoteChanged += onSkinChanged;
+ HitPosition.BindValueChanged(pos => Y =
+ LegacyManiaSkinConfiguration.DEFAULT_HIT_POSITION - (float)pos.NewValue, true);
+
+ IsHitting.BindValueChanged(hitting =>
+ {
+ ClearTransforms();
+ // Logger.Log($"IsHitting changed to: {hitting.NewValue}", LoggingTarget.Runtime, LogLevel.Debug);
+ // animation.IsPlaying = hitting.NewValue;
+
+ if (hitting.NewValue && animation.IsNotNull() && animation.FrameCount > 0)
+ {
+ Alpha = 1;
+ animation.Restart();
+ }
+ else
+ {
+ Alpha = 0;
+ }
+ }, true);
}
protected override void Dispose(bool isDisposing)
@@ -126,32 +124,22 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
animation.Loop = true;
AddInternal(animation);
- updateY();
+ UpdateLNsLight();
}
- private void updateY()
+ public void UpdateLNsLight()
{
- bool isSpecialColumn = stageDefinition.EzIsSpecialColumn(column.Index);
+ bool isSpecialColumn = EzColumnTypeManager.GetColumnType(stageDefinition.Columns, column.Index) == "S1";
double columnWidth = columnWidthBindable.Value * (isSpecialColumn ? specialFactorBindable.Value : 1);
bool isSquare = factory.IsSquareNote("whitenote");
- var tempContainer = factory.CreateAnimation("whitenote");
- float aspectRatio = 1f;
+ float aspectRatio = factory.GetRatio("whitenote");
- if (tempContainer.FrameCount > 0)
- {
- aspectRatio = tempContainer.CurrentFrame.Height / (float)tempContainer.CurrentFrame.Width;
- }
-
- tempContainer.Dispose();
float moveY = isSquare
? (float)columnWidth / 2 * aspectRatio
: (float)noteHeightBindable.Value * aspectRatio;
- baseYPosition = 110f - (float)hitPosition.Value - moveY;
- Position = new Vector2(0, baseYPosition);
-
- Invalidate();
+ Position = new Vector2(0, moveY);
}
private void onSkinChanged()
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteMiddle.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteMiddle.cs
index c41862fc14..78f9dc2a0e 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteMiddle.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzHoldNoteMiddle.cs
@@ -8,7 +8,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Animations;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Beatmaps;
-using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Mania.Skinning.Default;
using osu.Game.Rulesets.Mania.Skinning.Legacy;
@@ -34,7 +33,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
private Container middleScaleContainer = null!;
private Container middleInnerContainer = null!;
- private EzSkinSettingsManager ezSkinConfig = null!;
+ private IBindable noteHeight = new Bindable();
+ private IBindable hitPosition = new Bindable();
private Bindable enabledColor = null!;
private Drawable? container;
private Drawable? lightContainer;
@@ -46,6 +46,9 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
[Resolved]
private StageDefinition stageDefinition { get; set; } = null!;
+ [Resolved]
+ private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
+
[Resolved]
private EzLocalTextureFactory factory { get; set; } = null!;
@@ -60,12 +63,13 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
}
[BackgroundDependencyLoader(true)]
- private void load(EzSkinSettingsManager ezSkinConfig, DrawableHitObject drawableObject)
+ private void load(DrawableHitObject drawableObject)
{
- this.ezSkinConfig = ezSkinConfig;
holdNote = (DrawableHoldNote)drawableObject;
isHitting.BindTo(holdNote.IsHolding);
+ noteHeight = ezSkinConfig.GetBindable(EzSkinSetting.NonSquareNoteHeight);
+ hitPosition = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
enabledColor = ezSkinConfig.GetBindable(EzSkinSetting.ColorSettingsEnabled);
}
@@ -85,6 +89,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
{
base.LoadComplete();
OnSkinChanged();
+ noteHeight.BindValueChanged(_ => OnSettingsChanged(), true);
factory.OnNoteChanged += OnSkinChanged;
ezSkinConfig.OnSettingsChanged += OnSettingsChanged;
isHitting.BindValueChanged(onIsHittingChanged, true);
@@ -104,6 +109,13 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
private void OnSkinChanged()
{
+ if (lightContainer != null)
+ {
+ column.TopLevelContainer.Remove(lightContainer, false);
+ lightContainer.Expire();
+ lightContainer = null;
+ }
+
loadAnimation();
hittingLayer = new EzHoldNoteHittingLayer
{
@@ -115,6 +127,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
Alpha = 0,
Child = hittingLayer
};
+ hittingLayer.HitPosition.BindTo(hitPosition);
}
private void onIsHittingChanged(ValueChangedEvent isHitting)
@@ -157,14 +170,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
if (enabledColor.Value)
return "white";
- if (stageDefinition.EzIsSpecialColumn(column.Index))
+ if (EzColumnTypeManager.GetColumnType(stageDefinition.Columns, column.Index) == "S1")
return "green";
int logicalIndex = 0;
for (int i = 0; i < column.Index; i++)
{
- if (!stageDefinition.EzIsSpecialColumn(i))
+ if (EzColumnTypeManager.GetColumnType(stageDefinition.Columns, column.Index) != "S1")
logicalIndex++;
}
@@ -172,15 +185,12 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
}
}
- protected virtual string ComponentName => $"{ColorPrefix}longnote/middle";
- protected virtual string ComponentName2 => $"{ColorPrefix}longnote/tail";
-
private void loadAnimation()
{
ClearInternal();
string backupComponentName = $"{ColorPrefix}note";
- middleAnimation = factory.CreateAnimation(ComponentName);
- tailAnimation = factory.CreateAnimation(ComponentName2);
+ middleAnimation = factory.CreateAnimation($"{ColorPrefix}longnote/middle");
+ tailAnimation = factory.CreateAnimation($"{ColorPrefix}longnote/tail");
if (middleAnimation.FrameCount == 0)
{
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzStageKeys.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzKeyArea.cs
similarity index 60%
rename from osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzStageKeys.cs
rename to osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzKeyArea.cs
index 51adbbc1fd..ce33f47dd5 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzStageKeys.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzKeyArea.cs
@@ -3,21 +3,22 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
-using osu.Framework.Graphics.Animations;
using osu.Framework.Graphics.Containers;
+using osu.Framework.Input.Bindings;
+using osu.Framework.Input.Events;
using osu.Game.Rulesets.Mania.Beatmaps;
-using osu.Game.Rulesets.Mania.LAsEZMania;
+using osu.Game.Rulesets.Mania.Skinning.Legacy;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Screens;
using osu.Game.Screens.LAsEzExtensions;
namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
{
- public partial class EzStageKeys : CompositeDrawable
+ public partial class EzKeyArea : LegacyManiaColumnElement, IKeyBindingHandler
{
- private TextureAnimation animation = null!;
private Drawable container = null!;
-
+ private Drawable upSprite = null!;
+ private Drawable downSprite = null!;
protected virtual bool IsKeyPress => true;
protected virtual bool UseColorization => true;
@@ -33,18 +34,21 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
[Resolved]
private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
+ public EzKeyArea()
+ {
+ RelativeSizeAxes = Axes.Both;
+ }
+
[BackgroundDependencyLoader]
private void load()
{
- RelativeSizeAxes = Axes.X;
- FillMode = FillMode.Fill;
}
protected override void LoadComplete()
{
base.LoadComplete();
OnSkinChanged();
- factory.OnNoteChanged += OnSkinChanged;
+ factory.OnStageChanged += OnSkinChanged;
ezSkinConfig.OnSettingsChanged += OnConfigChanged;
}
@@ -54,11 +58,55 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
if (isDisposing)
{
- factory.OnNoteChanged -= OnSkinChanged;
+ factory.OnStageChanged -= OnSkinChanged;
ezSkinConfig.OnSettingsChanged -= OnConfigChanged;
}
}
+ protected virtual string KeyBasicSuffix
+ {
+ get
+ {
+ if (EzColumnTypeManager.GetColumnType(stageDefinition.Columns, column.Index) == "S1")
+ return "02";
+
+ int logicalIndex = 0;
+
+ for (int i = 0; i < column.Index; i++)
+ {
+ if (EzColumnTypeManager.GetColumnType(stageDefinition.Columns, i) == "S1")
+ logicalIndex++;
+ }
+
+ return logicalIndex % 2 == 0 ? "00" : "01";
+ }
+ }
+
+ private void loadAnimation()
+ {
+ ClearInternal();
+
+ upSprite = factory.CreateStage("keybase");
+ downSprite = factory.CreateStage("keypress");
+ downSprite.Alpha = 0;
+
+ container = new Container
+ {
+ Anchor = Anchor.TopCentre,
+ Origin = Anchor.TopCentre,
+ RelativeSizeAxes = Axes.X,
+ AutoSizeAxes = Axes.Y,
+ Children = new[]
+ {
+ upSprite,
+ downSprite,
+ }
+ };
+
+ OnConfigChanged();
+ AddInternal(container);
+ }
+
private void updateSizes()
{
bool isSquare = factory.IsSquareNote("whitenote");
@@ -67,25 +115,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
: (float)(ezSkinConfig.GetBindable(EzSkinSetting.NonSquareNoteHeight).Value);
}
- private void loadAnimation()
- {
- ClearInternal();
-
- animation = factory.CreateAnimation(ComponentName);
- container = new Container
- {
- RelativeSizeAxes = Axes.Both,
- Anchor = Anchor.Centre,
- Origin = Anchor.Centre,
- Child = animation
- };
-
- OnConfigChanged();
- AddInternal(container);
- }
-
- private void OnSkinChanged() => loadAnimation();
-
private void OnConfigChanged()
{
Schedule(() =>
@@ -95,32 +124,26 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
});
}
- protected virtual string KeyPressPrefix => IsKeyPress switch
- {
- true => "keypress/KeyBasicPress_",
- _ => "keybase/KeyBasicBase_",
- };
+ private void OnSkinChanged() => loadAnimation();
- protected virtual string KeyBasicSuffix
+ public bool OnPressed(KeyBindingPressEvent e)
{
- get
+ if (e.Action == column.Action.Value)
{
- if (stageDefinition.EzIsSpecialColumn(column.Index))
- return "02";
-
- int logicalIndex = 0;
-
- for (int i = 0; i < column.Index; i++)
- {
- if (!stageDefinition.EzIsSpecialColumn(i))
- logicalIndex++;
- }
-
- return logicalIndex % 2 == 0 ? "00" : "01";
+ upSprite.FadeTo(0);
+ downSprite.FadeTo(1);
}
+
+ return false;
}
- protected virtual string StagePrefix => EzStageBottom.StagePrefix;
- protected virtual string ComponentName => $"{StagePrefix}/{KeyPressPrefix}{KeyBasicSuffix}";
+ public void OnReleased(KeyBindingReleaseEvent e)
+ {
+ if (e.Action == column.Action.Value)
+ {
+ upSprite.Delay(LegacyHitExplosion.FADE_IN_DURATION).FadeTo(1);
+ downSprite.Delay(LegacyHitExplosion.FADE_IN_DURATION).FadeTo(0);
+ }
+ }
}
}
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzNote.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzNote.cs
index 2eceef6696..0116e07446 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzNote.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzNote.cs
@@ -7,7 +7,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Animations;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Beatmaps;
-using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Screens;
using osu.Game.Screens.LAsEzExtensions;
@@ -88,14 +87,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
if (enabledColor.Value)
return "white";
- if (stageDefinition.EzIsSpecialColumn(column.Index))
+ if (EzColumnTypeManager.GetColumnType(stageDefinition.Columns, column.Index) == "S1")
return "green";
int logicalIndex = 0;
for (int i = 0; i < column.Index; i++)
{
- if (!stageDefinition.EzIsSpecialColumn(i))
+ if (EzColumnTypeManager.GetColumnType(stageDefinition.Columns, i) != "S1")
logicalIndex++;
}
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzStageBottom.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzStageBottom.cs
index af38c74208..7bfaf9173a 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzStageBottom.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/EzStageBottom.cs
@@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Screens;
using osu.Game.Screens.LAsEzExtensions;
+using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
@@ -29,20 +30,21 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
private void load()
{
RelativeSizeAxes = Axes.Both;
- Anchor = Anchor.Centre;
- Origin = Anchor.Centre;
+ Anchor = Anchor.TopCentre;
+ Origin = Anchor.TopCentre;
hitPositon = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
columnWidth = ezSkinConfig.GetBindable(EzSkinSetting.ColumnWidth);
hitPositon.BindValueChanged(_ => OnConfigChanged());
columnWidth.BindValueChanged(_ => OnConfigChanged());
+ OnSkinChanged();
}
protected override void LoadComplete()
{
base.LoadComplete();
- OnSkinChanged();
- factory.OnNoteChanged += OnSkinChanged;
+
+ factory.OnStageChanged += OnSkinChanged;
}
protected override void Dispose(bool isDisposing)
@@ -51,24 +53,27 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
if (isDisposing)
{
- factory.OnNoteChanged -= OnSkinChanged;
+ factory.OnStageChanged -= OnSkinChanged;
}
}
- public static string StagePrefix => "Stage/fivekey";
- protected static string ComponentName => $"{StagePrefix}/Body";
+ // protected override void Update()
+ // {
+ // base.Update();
+ // updateSizes();
+ // }
private void loadAnimation()
{
ClearInternal();
- var stageBottom = factory.CreateStage(ComponentName);
+ var stageBottom = factory.CreateStage("Body");
sprite = new Container
{
RelativeSizeAxes = Axes.None,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
- // Masking = true,
+
Child = stageBottom
};
// sprite.Depth = float.MinValue;
@@ -76,23 +81,17 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
AddInternal(sprite);
}
- protected override void Update()
- {
- base.Update();
- updateSizes();
- }
-
private void updateSizes()
{
if (sprite == null)
return;
float actualPanelWidth = DrawWidth;
- double scale = actualPanelWidth / 410.0;
- sprite.Scale = new Vector2((float)scale);
+ float scale = actualPanelWidth / 410.0f;
+ sprite.Scale = new Vector2(scale);
- Y = 274;
- Position = new Vector2(0, 660 + 110 - (float)hitPositon.Value);
+ sprite.Y = LegacyManiaSkinConfiguration.DEFAULT_HIT_POSITION - (float)hitPositon.Value - DrawHeight * 0.865f;
+ // Position = new Vector2(0, 415 + 110 - (float)hitPositon.Value);
}
private void OnConfigChanged()
diff --git a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/ManiaEzStyleProSkinTransformer.cs b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/ManiaEzStyleProSkinTransformer.cs
index eb5946bdd7..193cc871a4 100644
--- a/osu.Game.Rulesets.Mania/Skinning/EzStylePro/ManiaEzStyleProSkinTransformer.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/EzStylePro/ManiaEzStyleProSkinTransformer.cs
@@ -7,16 +7,15 @@ using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mania.Beatmaps;
-using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.Skinning.Ez2;
using osu.Game.Rulesets.Mania.Skinning.Ez2HUD;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens;
+using osu.Game.Screens.LAsEzExtensions;
using osu.Game.Screens.Play.HUD.HitErrorMeters;
using osu.Game.Skinning;
using osu.Game.Skinning.Components;
using osuTK;
-using osuTK.Graphics;
namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
{
@@ -180,7 +179,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
// if (Skin is Ez2Skin && resultComponent.Component >= HitResult.Perfect)
// return Drawable.Empty();
- return new Ez2ColumnBackground();
+ return new EzColumnBackground();
case ManiaSkinComponents.KeyArea:
return new Ez2KeyArea();
@@ -227,7 +226,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
{
int columnIndex = maniaLookup.ColumnIndex ?? 0;
var stage = beatmap.GetStageForColumnIndex(columnIndex);
- bool isSpecialColumn = stage.EzIsSpecialColumn(columnIndex);
+ bool isSpecialColumn = EzColumnTypeManager.GetColumnType(stage.Columns, columnIndex) == "S1";
float width = (float)columnWidthBindable.Value * (isSpecialColumn ? (float)specialFactorBindable.Value : 1f);
// float hitPositionValue = (float)hitPosition.Value; // + (float)virtualHitPosition.Value - 110f;
@@ -242,9 +241,9 @@ namespace osu.Game.Rulesets.Mania.Skinning.EzStylePro
// case LegacyManiaSkinConfigurationLookups.HitPosition:
// return SkinUtils.As(new Bindable(hitPositionValue));
- case LegacyManiaSkinConfigurationLookups.ColumnBackgroundColour:
- var colour = stage.GetColourForLayout(columnIndex);
- return SkinUtils.As(new Bindable(colour));
+ // case LegacyManiaSkinConfigurationLookups.ColumnBackgroundColour:
+ // var colour = stage.GetColourForLayout(columnIndex);
+ // return SkinUtils.As(new Bindable(colour));
case LegacyManiaSkinConfigurationLookups.BarLineHeight:
return SkinUtils.As(new Bindable(1));
diff --git a/osu.Game.Rulesets.Mania/Skinning/Legacy/HitTargetInsetContainer.cs b/osu.Game.Rulesets.Mania/Skinning/Legacy/HitTargetInsetContainer.cs
index 608cde7272..130410ab6a 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Legacy/HitTargetInsetContainer.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Legacy/HitTargetInsetContainer.cs
@@ -5,8 +5,8 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
-using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.UI.Scrolling;
+using osu.Game.Screens;
using osu.Game.Skinning;
namespace osu.Game.Rulesets.Mania.Skinning.Legacy
@@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
public partial class HitTargetInsetContainer : Container
{
private readonly IBindable direction = new Bindable();
-
+ private Bindable hitPositonBindable = new Bindable();
protected override Container Content => content;
private readonly Container content;
@@ -28,14 +28,21 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
}
[BackgroundDependencyLoader]
- private void load(ISkinSource skin, IScrollingInfo scrollingInfo)
+ private void load(ISkinSource skin, EzSkinSettingsManager ezSkinConfig, IScrollingInfo scrollingInfo)
{
- hitPosition = skin.GetManiaSkinConfig(LegacyManiaSkinConfigurationLookups.HitPosition)?.Value ?? Stage.HIT_TARGET_POSITION;
+ hitPositonBindable = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
+ hitPositonBindable.BindValueChanged(_ => UpdateHitPosition(), true);
+ hitPosition = skin.GetManiaSkinConfig(LegacyManiaSkinConfigurationLookups.HitPosition)?.Value ?? (float)hitPositonBindable.Value;
direction.BindTo(scrollingInfo.Direction);
direction.BindValueChanged(onDirectionChanged, true);
}
+ protected virtual void UpdateHitPosition()
+ {
+ hitPosition = (float)hitPositonBindable.Value;
+ }
+
private void onDirectionChanged(ValueChangedEvent direction)
{
content.Padding = direction.NewValue == ScrollingDirection.Up
diff --git a/osu.Game.Rulesets.Mania/Skinning/SbI/ManiaSbISkinTransformer.cs b/osu.Game.Rulesets.Mania/Skinning/SbI/ManiaSbISkinTransformer.cs
index 5a74a20434..7a62539bae 100644
--- a/osu.Game.Rulesets.Mania/Skinning/SbI/ManiaSbISkinTransformer.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/SbI/ManiaSbISkinTransformer.cs
@@ -14,7 +14,6 @@ using osu.Game.Skinning;
using osu.Game.Skinning.Components;
using osuTK;
using osuTK.Graphics;
-using EffectType = osu.Game.Skinning.Components.EffectType;
namespace osu.Game.Rulesets.Mania.Skinning.SbI
{
@@ -71,7 +70,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.SbI
combo1.Anchor = Anchor.TopCentre;
combo1.Origin = Anchor.Centre;
combo1.Y = 200;
- combo1.Effect.Value = EffectType.None;
+ combo1.Effect.Value = EzComEffectType.None;
combo1.NameDropdown.Value = (EzSelectorNameSet)43;
}
diff --git a/osu.Game.Rulesets.Mania/UI/ColumnFlow.cs b/osu.Game.Rulesets.Mania/UI/ColumnFlow.cs
index a112b3ea7d..a3ec5d23c5 100644
--- a/osu.Game.Rulesets.Mania/UI/ColumnFlow.cs
+++ b/osu.Game.Rulesets.Mania/UI/ColumnFlow.cs
@@ -11,9 +11,9 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Layout;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Configuration;
-using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.Skinning;
using osu.Game.Screens;
+using osu.Game.Screens.LAsEzExtensions;
using osu.Game.Skinning;
using osuTK;
@@ -68,28 +68,28 @@ namespace osu.Game.Rulesets.Mania.UI
[Resolved]
private ISkinSource skin { get; set; } = null!;
+ [Resolved]
+ private SkinManager skinManager { get; set; } = null!;
+
[Resolved]
private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
private readonly Bindable mobileLayout = new Bindable();
private readonly Bindable columnWidthBindable = new Bindable();
private readonly Bindable specialFactorBindable = new Bindable();
+ private readonly Bindable ezColumnWidthStyle = new Bindable();
[BackgroundDependencyLoader]
private void load(ManiaRulesetConfigManager? rulesetConfig)
{
rulesetConfig?.BindWith(ManiaRulesetSetting.MobileLayout, mobileLayout);
+ ezSkinConfig.BindWith(EzSkinSetting.ColumnWidthStyle, ezColumnWidthStyle);
ezSkinConfig.BindWith(EzSkinSetting.ColumnWidth, columnWidthBindable);
ezSkinConfig.BindWith(EzSkinSetting.SpecialFactor, specialFactorBindable);
- columnWidthBindable.BindValueChanged(v =>
- {
- updateColumnSize();
- });
- specialFactorBindable.BindValueChanged(v =>
- {
- updateColumnSize();
- });
+ ezColumnWidthStyle.BindValueChanged(v => updateColumnSize());
+ columnWidthBindable.BindValueChanged(v => updateColumnSize());
+ specialFactorBindable.BindValueChanged(v => updateColumnSize());
mobileLayout.BindValueChanged(_ => invalidateLayout());
skin.SourceChanged += invalidateLayout;
@@ -156,8 +156,6 @@ namespace osu.Game.Rulesets.Mania.UI
new ManiaSkinConfigurationLookup(LegacyManiaSkinConfigurationLookups.ColumnWidth, i))
?.Value;
- bool isSpecialColumn = stageDefinition.EzIsSpecialColumn(i);
-
if (width == 0)
{
columns[i].Width = 0;
@@ -165,7 +163,26 @@ namespace osu.Game.Rulesets.Mania.UI
continue;
}
- width = (float)columnWidthBindable.Value * (isSpecialColumn ? (float)specialFactorBindable.Value : 1);
+ bool isSpecialColumn =
+ EzColumnTypeManager.GetColumnType(stageDefinition.Columns, i) == "S1";
+ float ezWidth = (float)columnWidthBindable.Value * (isSpecialColumn ? (float)specialFactorBindable.Value : 1);
+
+ switch (ezColumnWidthStyle.Value)
+ {
+ case EzColumnWidthStyle.EzStyleProOnly:
+ var skinInfo = skinManager.CurrentSkinInfo.Value;
+ if (skinInfo.Value.Name.Contains("Ez Style Pro"))
+ width = ezWidth;
+ break;
+
+ case EzColumnWidthStyle.GlobalWidth:
+ width = ezWidth;
+ break;
+
+ case EzColumnWidthStyle.GlobalTotalWidth:
+ width = ezWidth * 10 / stageDefinition.Columns;
+ break;
+ }
// only used by default skin (legacy skins get defaults set in LegacyManiaSkinConfiguration)
width ??= isSpecialColumn ? Column.SPECIAL_COLUMN_WIDTH : Column.COLUMN_WIDTH;
diff --git a/osu.Game.Rulesets.Mania/UI/Components/HitPositionPaddedContainer.cs b/osu.Game.Rulesets.Mania/UI/Components/HitPositionPaddedContainer.cs
index 0630c67d53..a697000700 100644
--- a/osu.Game.Rulesets.Mania/UI/Components/HitPositionPaddedContainer.cs
+++ b/osu.Game.Rulesets.Mania/UI/Components/HitPositionPaddedContainer.cs
@@ -23,12 +23,16 @@ namespace osu.Game.Rulesets.Mania.UI.Components
[Resolved]
private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
+ private Bindable hitPositonBindable = new Bindable();
+
[BackgroundDependencyLoader]
private void load(IScrollingInfo scrollingInfo)
{
Direction.BindTo(scrollingInfo.Direction);
Direction.BindValueChanged(_ => UpdateHitPosition(), true);
+ hitPositonBindable = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
+ hitPositonBindable.BindValueChanged(_ => UpdateHitPosition(), true);
skin.SourceChanged += onSkinChanged;
}
@@ -38,7 +42,7 @@ namespace osu.Game.Rulesets.Mania.UI.Components
{
float hitPosition = skin.GetConfig(
new ManiaSkinConfigurationLookup(LegacyManiaSkinConfigurationLookups.HitPosition))?.Value
- ?? Stage.HIT_TARGET_POSITION;
+ ?? (float)hitPositonBindable.Value;
Padding = Direction.Value == ScrollingDirection.Up
? new MarginPadding { Top = hitPosition }
diff --git a/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs b/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs
index 1d04724409..57f57283fb 100644
--- a/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs
+++ b/osu.Game.Rulesets.Mania/UI/DrawableManiaRuleset.cs
@@ -18,6 +18,7 @@ using osu.Game.Input.Handlers;
using osu.Game.Replays;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Configuration;
+using osu.Game.Rulesets.Mania.LAsEZMania;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mania.Replays;
using osu.Game.Rulesets.Mania.Skinning;
@@ -27,6 +28,7 @@ using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Scoring;
+using osu.Game.Screens;
using osu.Game.Screens.Play;
using osu.Game.Skinning;
@@ -79,6 +81,12 @@ namespace osu.Game.Rulesets.Mania.UI
[Resolved]
private GameHost gameHost { get; set; } = null!;
+ [Resolved]
+ private EzSkinSettingsManager ezSkinConfig { get; set; } = null!;
+
+ private Bindable hitPositonBindable = new Bindable();
+ private readonly Bindable globalHitPosition = new Bindable();
+
public DrawableManiaRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList? mods = null)
: base(ruleset, beatmap, mods)
{
@@ -125,6 +133,11 @@ namespace osu.Game.Rulesets.Mania.UI
Config.BindWith(ManiaRulesetSetting.MobileLayout, mobileLayout);
mobileLayout.BindValueChanged(_ => updateMobileLayout(), true);
+
+ hitPositonBindable = ezSkinConfig.GetBindable(EzSkinSetting.HitPosition);
+ hitPositonBindable.BindValueChanged(_ => skinChanged(), true);
+ ezSkinConfig.BindWith(EzSkinSetting.GlobalHitPosition, globalHitPosition);
+ globalHitPosition.BindValueChanged(_ => skinChanged(), true);
}
private ManiaTouchInputArea? touchInputArea;
@@ -167,9 +180,14 @@ namespace osu.Game.Rulesets.Mania.UI
private void skinChanged()
{
- hitPosition = currentSkin.GetConfig(
- new ManiaSkinConfigurationLookup(LegacyManiaSkinConfigurationLookups.HitPosition))?.Value
- ?? Stage.HIT_TARGET_POSITION;
+ if (globalHitPosition.Value)
+ hitPosition = (float)hitPositonBindable.Value;
+ else
+ {
+ hitPosition = currentSkin.GetConfig(
+ new ManiaSkinConfigurationLookup(LegacyManiaSkinConfigurationLookups.HitPosition))?.Value
+ ?? (float)hitPositonBindable.Value;
+ }
pendingSkinChange = null;
}
@@ -192,7 +210,7 @@ namespace osu.Game.Rulesets.Mania.UI
case EzManiaScrollingStyle.ScrollTimeStyleFixed:
// Ensure the travel time from the top of the screen to the hit position remains constant.
- scale = length_to_default_hit_position / lengthToHitPosition;
+ scale = lengthToHitPosition / 768;
break;
}
diff --git a/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModFlashlight.cs b/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModFlashlight.cs
index 33ae2c68e6..496e7610ff 100644
--- a/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModFlashlight.cs
+++ b/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModFlashlight.cs
@@ -5,7 +5,6 @@ using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
-using osu.Framework.Utils;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Beatmaps;
@@ -36,22 +35,21 @@ namespace osu.Game.Rulesets.Osu.Tests.Mods
[Test]
public void TestPlayfieldBasedSize()
{
- ModFlashlight mod = new OsuModFlashlight();
+ OsuModFlashlight flashlight;
CreateModTest(new ModTestData
{
- Mod = mod,
+ Mods = [flashlight = new OsuModFlashlight(), new OsuModBarrelRoll()],
PassCondition = () =>
{
var flashlightOverlay = Player.DrawableRuleset.Overlays
.ChildrenOfType.Flashlight>()
.First();
- return Precision.AlmostEquals(mod.DefaultFlashlightSize * .5f, flashlightOverlay.GetSize());
+ // the combo check is here because the flashlight radius decreases for the first time at 100 combo
+ // and hardcoding it here eliminates the need to meddle in flashlight internals further by e.g. exposing `GetComboScaleFor()`
+ return flashlightOverlay.GetSize() < flashlight.DefaultFlashlightSize && Player.GameplayState.ScoreProcessor.Combo.Value < 100;
}
});
-
- AddStep("adjust playfield scale", () =>
- Player.DrawableRuleset.Playfield.Scale = new Vector2(.5f));
}
[Test]
diff --git a/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModRelax.cs b/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModRelax.cs
index 1bb2f24c1c..b4298344b8 100644
--- a/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModRelax.cs
+++ b/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModRelax.cs
@@ -13,7 +13,6 @@ using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Replays;
using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Rulesets.Replays;
-using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Tests.Visual;
using osuTK;
@@ -22,21 +21,6 @@ namespace osu.Game.Rulesets.Osu.Tests.Mods
{
public partial class TestSceneOsuModRelax : OsuModTestScene
{
- private readonly HitCircle hitObject;
- private readonly HitWindows hitWindows = new OsuHitWindows();
-
- public TestSceneOsuModRelax()
- {
- hitWindows.SetDifficulty(9);
-
- hitObject = new HitCircle
- {
- StartTime = 1000,
- Position = new Vector2(100, 100),
- HitWindows = hitWindows
- };
- }
-
protected override TestPlayer CreateModPlayer(Ruleset ruleset) => new ModRelaxTestPlayer(CurrentTestData, AllowFail);
[Test]
@@ -46,12 +30,21 @@ namespace osu.Game.Rulesets.Osu.Tests.Mods
Autoplay = false,
CreateBeatmap = () => new Beatmap
{
- HitObjects = new List { hitObject }
+ Difficulty = { OverallDifficulty = 9 },
+ HitObjects = new List
+ {
+ new HitCircle
+ {
+ StartTime = 1000,
+ Position = new Vector2(100, 100),
+ HitWindows = new OsuHitWindows()
+ }
+ }
},
ReplayFrames = new List
{
new OsuReplayFrame(0, new Vector2()),
- new OsuReplayFrame(hitObject.StartTime, hitObject.Position),
+ new OsuReplayFrame(100, new Vector2(100)),
},
PassCondition = () => Player.ScoreProcessor.Combo.Value == 1
});
@@ -63,13 +56,22 @@ namespace osu.Game.Rulesets.Osu.Tests.Mods
Autoplay = false,
CreateBeatmap = () => new Beatmap
{
- HitObjects = new List { hitObject }
+ Difficulty = { OverallDifficulty = 9 },
+ HitObjects = new List
+ {
+ new HitCircle
+ {
+ StartTime = 1000,
+ Position = new Vector2(100, 100),
+ HitWindows = new OsuHitWindows()
+ }
+ }
},
ReplayFrames = new List
{
- new OsuReplayFrame(0, new Vector2(hitObject.X - 22, hitObject.Y - 22)), // must be an edge hit for the cursor to not stay on the object for too long
- new OsuReplayFrame(hitObject.StartTime - OsuModRelax.RELAX_LENIENCY, new Vector2(hitObject.X - 22, hitObject.Y - 22)),
- new OsuReplayFrame(hitObject.StartTime, new Vector2(0)),
+ new OsuReplayFrame(0, new Vector2(78, 78)), // must be an edge hit for the cursor to not stay on the object for too long
+ new OsuReplayFrame(1000 - OsuModRelax.RELAX_LENIENCY, new Vector2(78, 78)),
+ new OsuReplayFrame(1000, new Vector2(0)),
},
PassCondition = () => Player.ScoreProcessor.Combo.Value == 1
});
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneLegacyReplayPlayback.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneLegacyReplayPlayback.cs
index 379699b276..404ca0c79e 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneLegacyReplayPlayback.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneLegacyReplayPlayback.cs
@@ -17,7 +17,6 @@ using osuTK;
namespace osu.Game.Rulesets.Osu.Tests
{
- [Ignore("These tests are expected to fail until an acceptable solution for various replay playback issues concerning rounding of replay frame times & hit windows is found.")]
public partial class TestSceneLegacyReplayPlayback : LegacyReplayPlaybackTestScene
{
protected override Ruleset CreateRuleset() => new OsuRuleset();
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneOsuHitObjectSamples.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneOsuHitObjectSamples.cs
index 61cc10f284..ddea5eed87 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneOsuHitObjectSamples.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneOsuHitObjectSamples.cs
@@ -14,26 +14,27 @@ namespace osu.Game.Rulesets.Osu.Tests
protected override IResourceStore RulesetResources => new DllResourceStore(Assembly.GetAssembly(typeof(TestSceneOsuHitObjectSamples)));
- [TestCase("normal-hitnormal")]
- [TestCase("hitnormal")]
- public void TestDefaultCustomSampleFromBeatmap(string expectedSample)
+ [TestCase("normal-hitnormal2", "normal-hitnormal")]
+ [TestCase("hitnormal", "hitnormal")]
+ public void TestDefaultCustomSampleFromBeatmap(string beatmapSkinSampleName, string userSkinSampleName)
{
- SetupSkins(expectedSample, expectedSample);
+ SetupSkins(beatmapSkinSampleName, userSkinSampleName);
CreateTestWithBeatmap("osu-hitobject-beatmap-custom-sample-bank.osu");
- AssertBeatmapLookup(expectedSample);
+ AssertBeatmapLookup(beatmapSkinSampleName);
}
- [TestCase("normal-hitnormal")]
- [TestCase("hitnormal")]
- public void TestDefaultCustomSampleFromUserSkinFallback(string expectedSample)
+ [TestCase("", "normal-hitnormal")]
+ [TestCase("normal-hitnormal", "normal-hitnormal")]
+ [TestCase("", "hitnormal")]
+ public void TestDefaultCustomSampleFromUserSkinFallback(string beatmapSkinSampleName, string userSkinSampleName)
{
- SetupSkins(string.Empty, expectedSample);
+ SetupSkins(beatmapSkinSampleName, userSkinSampleName);
CreateTestWithBeatmap("osu-hitobject-beatmap-custom-sample-bank.osu");
- AssertUserLookup(expectedSample);
+ AssertUserLookup(userSkinSampleName);
}
[TestCase("normal-hitnormal2")]
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneReplayStability.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneReplayStability.cs
index 2303b17d96..320fdcff2c 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneReplayStability.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneReplayStability.cs
@@ -13,7 +13,6 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Osu.Tests
{
- [Ignore("These tests are expected to fail until an acceptable solution for various replay playback issues concerning rounding of replay frame times & hit windows is found.")]
public partial class TestSceneReplayStability : ReplayStabilityTestScene
{
private static readonly object[][] test_cases =
@@ -23,53 +22,49 @@ namespace osu.Game.Rulesets.Osu.Tests
// while round brackets `()` represent *open* or *exclusive* bounds.
// OD = 5 test cases.
- // GREAT hit window is [ -50ms, 50ms]
- // OK hit window is [-100ms, 100ms]
- // MEH hit window is [-150ms, 150ms]
- // MISS hit window is [-400ms, 400ms]
+ // GREAT hit window is [ -49.5ms, 49.5ms]
+ // OK hit window is [ -99.5ms, 99.5ms]
+ // MEH hit window is [-149.5ms, 149.5ms]
new object[] { 5f, 49d, HitResult.Great },
new object[] { 5f, 49.2d, HitResult.Great },
- new object[] { 5f, 49.7d, HitResult.Great },
- new object[] { 5f, 50d, HitResult.Great },
+ new object[] { 5f, 49.7d, HitResult.Ok },
+ new object[] { 5f, 50d, HitResult.Ok },
new object[] { 5f, 50.4d, HitResult.Ok },
new object[] { 5f, 50.9d, HitResult.Ok },
new object[] { 5f, 51d, HitResult.Ok },
new object[] { 5f, 99d, HitResult.Ok },
new object[] { 5f, 99.2d, HitResult.Ok },
- new object[] { 5f, 99.7d, HitResult.Ok },
- new object[] { 5f, 100d, HitResult.Ok },
+ new object[] { 5f, 99.7d, HitResult.Meh },
+ new object[] { 5f, 100d, HitResult.Meh },
new object[] { 5f, 100.4d, HitResult.Meh },
new object[] { 5f, 100.9d, HitResult.Meh },
new object[] { 5f, 101d, HitResult.Meh },
new object[] { 5f, 149d, HitResult.Meh },
new object[] { 5f, 149.2d, HitResult.Meh },
- new object[] { 5f, 149.7d, HitResult.Meh },
- new object[] { 5f, 150d, HitResult.Meh },
+ new object[] { 5f, 149.7d, HitResult.Miss },
+ new object[] { 5f, 150d, HitResult.Miss },
new object[] { 5f, 150.4d, HitResult.Miss },
new object[] { 5f, 150.9d, HitResult.Miss },
new object[] { 5f, 151d, HitResult.Miss },
// OD = 5.7 test cases.
- // GREAT hit window is [ -45.8ms, 45.8ms]
- // OK hit window is [ -94.4ms, 94.4ms]
- // MEH hit window is [-143.0ms, 143.0ms]
- // MISS hit window is [-400.0ms, 400.0ms]
- new object[] { 5.7f, 45d, HitResult.Great },
- new object[] { 5.7f, 45.2d, HitResult.Great },
- new object[] { 5.7f, 45.8d, HitResult.Great },
- new object[] { 5.7f, 45.9d, HitResult.Ok },
- new object[] { 5.7f, 46d, HitResult.Ok },
- new object[] { 5.7f, 46.4d, HitResult.Ok },
- new object[] { 5.7f, 94d, HitResult.Ok },
- new object[] { 5.7f, 94.2d, HitResult.Ok },
- new object[] { 5.7f, 94.4d, HitResult.Ok },
- new object[] { 5.7f, 94.48d, HitResult.Ok },
- new object[] { 5.7f, 94.9d, HitResult.Meh },
- new object[] { 5.7f, 95d, HitResult.Meh },
- new object[] { 5.7f, 95.4d, HitResult.Meh },
+ // GREAT hit window is [ -44.5ms, 44.5ms]
+ // OK hit window is [ -93.5ms, 93.5ms]
+ // MEH hit window is [-142.5ms, 142.5ms]
+ new object[] { 5.7f, 44d, HitResult.Great },
+ new object[] { 5.7f, 44.2d, HitResult.Great },
+ new object[] { 5.7f, 44.8d, HitResult.Ok },
+ new object[] { 5.7f, 45d, HitResult.Ok },
+ new object[] { 5.7f, 45.4d, HitResult.Ok },
+ new object[] { 5.7f, 93d, HitResult.Ok },
+ new object[] { 5.7f, 93.4d, HitResult.Ok },
+ new object[] { 5.7f, 93.9d, HitResult.Meh },
+ new object[] { 5.7f, 94d, HitResult.Meh },
+ new object[] { 5.7f, 94.4d, HitResult.Meh },
new object[] { 5.7f, 142d, HitResult.Meh },
- new object[] { 5.7f, 142.7d, HitResult.Meh },
- new object[] { 5.7f, 143d, HitResult.Meh },
+ new object[] { 5.7f, 142.2d, HitResult.Meh },
+ new object[] { 5.7f, 142.7d, HitResult.Miss },
+ new object[] { 5.7f, 143d, HitResult.Miss },
new object[] { 5.7f, 143.4d, HitResult.Miss },
new object[] { 5.7f, 143.9d, HitResult.Miss },
new object[] { 5.7f, 144d, HitResult.Miss },
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneSliderLateHitJudgement.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderLateHitJudgement.cs
index d089e924ca..3276516d0a 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneSliderLateHitJudgement.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSliderLateHitJudgement.cs
@@ -52,8 +52,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 100, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 100, slider_end_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 99, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 99, slider_end_position, OsuAction.LeftButton),
});
assertHeadJudgement(HitResult.Ok);
@@ -70,8 +70,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 100, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 100, slider_end_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 99, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 99, slider_end_position, OsuAction.LeftButton),
}, s =>
{
s.SliderVelocityMultiplier = 2;
@@ -91,8 +91,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 150, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 150, slider_end_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 149, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 149, slider_end_position, OsuAction.LeftButton),
}, s =>
{
s.TickDistanceMultiplier = 0.2f;
@@ -116,8 +116,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 150, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 150, slider_end_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 149, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 149, slider_end_position, OsuAction.LeftButton),
}, s =>
{
s.SliderVelocityMultiplier = 2;
@@ -165,8 +165,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 150, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 150, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 149, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 149, slider_start_position, OsuAction.LeftButton),
}, s =>
{
s.Path = new SliderPath(PathType.LINEAR, new[]
@@ -195,8 +195,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 150, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 150, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 149, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 149, slider_start_position, OsuAction.LeftButton),
}, s =>
{
s.Path = new SliderPath(PathType.LINEAR, new[]
@@ -224,8 +224,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 150, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 150, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 149, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 149, slider_start_position, OsuAction.LeftButton),
}, s =>
{
s.Path = new SliderPath(PathType.PERFECT_CURVE, new[]
@@ -259,8 +259,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 150, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 150, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 149, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 149, slider_start_position, OsuAction.LeftButton),
}, s =>
{
s.Path = new SliderPath(PathType.PERFECT_CURVE, new[]
@@ -289,8 +289,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 150, slider_start_position, OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 150, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 149, slider_start_position, OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 149, slider_start_position, OsuAction.LeftButton),
}, s =>
{
s.Path = new SliderPath(PathType.PERFECT_CURVE, new[]
@@ -320,8 +320,8 @@ namespace osu.Game.Rulesets.Osu.Tests
{
performTest(new List
{
- new OsuReplayFrame(time_slider_start + 150, slider_start_position - new Vector2(20), OsuAction.LeftButton),
- new OsuReplayFrame(time_slider_end + 150, slider_start_position - new Vector2(20), OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_start + 149, slider_start_position - new Vector2(20), OsuAction.LeftButton),
+ new OsuReplayFrame(time_slider_end + 149, slider_start_position - new Vector2(20), OsuAction.LeftButton),
}, s =>
{
s.Path = new SliderPath(PathType.PERFECT_CURVE, new[]
diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs b/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
index 1d94ac6335..1c3b7360bc 100644
--- a/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
+++ b/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
@@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Mods
{
get
{
- if (UserAdjustedSettingsCount != 1)
+ if (!IsExactlyOneSettingChanged(CircleSize, ApproachRate, OverallDifficulty, DrainRate))
return string.Empty;
if (!CircleSize.IsDefault) return format("CS", CircleSize);
diff --git a/osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs b/osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs
index 154503c20d..a0f235c8c7 100644
--- a/osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs
+++ b/osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs
@@ -38,9 +38,9 @@ namespace osu.Game.Rulesets.Osu.Scoring
public override void SetDifficulty(double difficulty)
{
- great = IBeatmapDifficultyInfo.DifficultyRange(difficulty, GREAT_WINDOW_RANGE);
- ok = IBeatmapDifficultyInfo.DifficultyRange(difficulty, OK_WINDOW_RANGE);
- meh = IBeatmapDifficultyInfo.DifficultyRange(difficulty, MEH_WINDOW_RANGE);
+ great = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, GREAT_WINDOW_RANGE)) - 0.5;
+ ok = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, OK_WINDOW_RANGE)) - 0.5;
+ meh = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, MEH_WINDOW_RANGE)) - 0.5;
}
public override double WindowFor(HitResult result)
diff --git a/osu.Game.Rulesets.Taiko.Tests/Judgements/TestSceneHitJudgements.cs b/osu.Game.Rulesets.Taiko.Tests/Judgements/TestSceneHitJudgements.cs
index 7008d8d37a..c175e3342b 100644
--- a/osu.Game.Rulesets.Taiko.Tests/Judgements/TestSceneHitJudgements.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/Judgements/TestSceneHitJudgements.cs
@@ -177,7 +177,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
PerformTest(new List
{
new TaikoReplayFrame(0),
- new TaikoReplayFrame(hit_time - hitWindows.WindowFor(HitResult.Great), TaikoAction.LeftCentre),
+ new TaikoReplayFrame(hit_time - (hitWindows.WindowFor(HitResult.Great) + 0.1), TaikoAction.LeftCentre),
}, beatmap);
AssertJudgementCount(1);
diff --git a/osu.Game.Rulesets.Taiko.Tests/TestSceneLegacyReplayPlayback.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneLegacyReplayPlayback.cs
index 5e71f974d8..40a426b360 100644
--- a/osu.Game.Rulesets.Taiko.Tests/TestSceneLegacyReplayPlayback.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneLegacyReplayPlayback.cs
@@ -15,7 +15,6 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Taiko.Tests
{
- [Ignore("These tests are expected to fail until an acceptable solution for various replay playback issues concerning rounding of replay frame times & hit windows is found.")]
public partial class TestSceneLegacyReplayPlayback : LegacyReplayPlaybackTestScene
{
protected override string? ExportLocation => null;
@@ -177,7 +176,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
ScoreInfo = new ScoreInfo
{
Ruleset = CreateRuleset().RulesetInfo,
- Mods = [new TaikoModHardRock()]
+ Mods = [new TaikoModEasy()]
}
};
diff --git a/osu.Game.Rulesets.Taiko.Tests/TestSceneReplayStability.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneReplayStability.cs
index 62bbebcf0b..c61ae8ecc7 100644
--- a/osu.Game.Rulesets.Taiko.Tests/TestSceneReplayStability.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneReplayStability.cs
@@ -12,7 +12,6 @@ using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Taiko.Tests
{
- [Ignore("These tests are expected to fail until an acceptable solution for various replay playback issues concerning rounding of replay frame times & hit windows is found.")]
public partial class TestSceneReplayStability : ReplayStabilityTestScene
{
private static readonly object[][] test_cases =
@@ -22,40 +21,38 @@ namespace osu.Game.Rulesets.Taiko.Tests
// while round brackets `()` represent *open* or *exclusive* bounds.
// OD = 5 test cases.
- // GREAT hit window is [-35ms, 35ms]
- // OK hit window is [-80ms, 80ms]
- // MISS hit window is [-95ms, 95ms]
+ // GREAT hit window is [-34.5ms, 34.5ms]
+ // OK hit window is [-79.5ms, 79.5ms]
+ // MISS hit window is [-94.5ms, 94.5ms]
new object[] { 5f, -34d, HitResult.Great },
new object[] { 5f, -34.2d, HitResult.Great },
- new object[] { 5f, -34.7d, HitResult.Great },
- new object[] { 5f, -35d, HitResult.Great },
+ new object[] { 5f, -34.7d, HitResult.Ok },
+ new object[] { 5f, -35d, HitResult.Ok },
new object[] { 5f, -35.2d, HitResult.Ok },
new object[] { 5f, -35.8d, HitResult.Ok },
new object[] { 5f, -36d, HitResult.Ok },
new object[] { 5f, -79d, HitResult.Ok },
new object[] { 5f, -79.3d, HitResult.Ok },
- new object[] { 5f, -79.7d, HitResult.Ok },
- new object[] { 5f, -80d, HitResult.Ok },
+ new object[] { 5f, -79.7d, HitResult.Miss },
+ new object[] { 5f, -80d, HitResult.Miss },
new object[] { 5f, -80.2d, HitResult.Miss },
new object[] { 5f, -80.8d, HitResult.Miss },
new object[] { 5f, -81d, HitResult.Miss },
// OD = 7.8 test cases.
- // GREAT hit window is [-26.6ms, 26.6ms]
- // OK hit window is [-63.2ms, 63.2ms]
- // MISS hit window is [-81.0ms, 81.0ms]
- new object[] { 7.8f, -26d, HitResult.Great },
- new object[] { 7.8f, -26.4d, HitResult.Great },
- new object[] { 7.8f, -26.59d, HitResult.Great },
- new object[] { 7.8f, -26.8d, HitResult.Ok },
- new object[] { 7.8f, -27d, HitResult.Ok },
- new object[] { 7.8f, -27.1d, HitResult.Ok },
- new object[] { 7.8f, -63d, HitResult.Ok },
- new object[] { 7.8f, -63.18d, HitResult.Ok },
- new object[] { 7.8f, -63.4d, HitResult.Ok },
- new object[] { 7.8f, -63.7d, HitResult.Miss },
- new object[] { 7.8f, -64d, HitResult.Miss },
- new object[] { 7.8f, -64.2d, HitResult.Miss },
+ // GREAT hit window is [-25.5ms, 25.5ms]
+ // OK hit window is [-62.5ms, 62.5ms]
+ // MISS hit window is [-80.5ms, 80.5ms]
+ new object[] { 7.8f, -25d, HitResult.Great },
+ new object[] { 7.8f, -25.4d, HitResult.Great },
+ new object[] { 7.8f, -25.8d, HitResult.Ok },
+ new object[] { 7.8f, -26d, HitResult.Ok },
+ new object[] { 7.8f, -26.1d, HitResult.Ok },
+ new object[] { 7.8f, -62d, HitResult.Ok },
+ new object[] { 7.8f, -62.4d, HitResult.Ok },
+ new object[] { 7.8f, -62.7d, HitResult.Miss },
+ new object[] { 7.8f, -63d, HitResult.Miss },
+ new object[] { 7.8f, -63.2d, HitResult.Miss },
};
[TestCaseSource(nameof(test_cases))]
diff --git a/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoHitObjectSamples.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoHitObjectSamples.cs
index 1d1e82fb07..b1df133c30 100644
--- a/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoHitObjectSamples.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoHitObjectSamples.cs
@@ -14,26 +14,27 @@ namespace osu.Game.Rulesets.Taiko.Tests
protected override IResourceStore RulesetResources => new DllResourceStore(Assembly.GetAssembly(typeof(TestSceneTaikoHitObjectSamples)));
- [TestCase("taiko-normal-hitnormal")]
- [TestCase("hitnormal")]
- public void TestDefaultCustomSampleFromBeatmap(string expectedSample)
+ [TestCase("taiko-normal-hitnormal2", "taiko-normal-hitnormal")]
+ [TestCase("hitnormal", "hitnormal")]
+ public void TestDefaultCustomSampleFromBeatmap(string beatmapSkinSampleName, string userSkinSampleName)
{
- SetupSkins(expectedSample, expectedSample);
+ SetupSkins(beatmapSkinSampleName, userSkinSampleName);
CreateTestWithBeatmap("taiko-hitobject-beatmap-custom-sample-bank.osu");
- AssertBeatmapLookup(expectedSample);
+ AssertBeatmapLookup(beatmapSkinSampleName);
}
- [TestCase("taiko-normal-hitnormal")]
- [TestCase("hitnormal")]
- public void TestDefaultCustomSampleFromUserSkinFallback(string expectedSample)
+ [TestCase("", "taiko-normal-hitnormal")]
+ [TestCase("taiko-normal-hitnormal", "taiko-normal-hitnormal")]
+ [TestCase("", "hitnormal")]
+ public void TestDefaultCustomSampleFromUserSkinFallback(string beatmapSkinSampleName, string userSkinSampleName)
{
- SetupSkins(string.Empty, expectedSample);
+ SetupSkins(beatmapSkinSampleName, userSkinSampleName);
CreateTestWithBeatmap("taiko-hitobject-beatmap-custom-sample-bank.osu");
- AssertUserLookup(expectedSample);
+ AssertUserLookup(userSkinSampleName);
}
[TestCase("taiko-normal-hitnormal2")]
diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs
index 57b57555c2..b06d1fe5ac 100644
--- a/osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs
+++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs
@@ -25,16 +25,16 @@ namespace osu.Game.Rulesets.Taiko.Mods
{
get
{
- if (UserAdjustedSettingsCount != 1)
+ if (!IsExactlyOneSettingChanged(ScrollSpeed, OverallDifficulty, DrainRate))
return string.Empty;
- if (!ScrollSpeed.IsDefault) return format("SC", ScrollSpeed);
- if (!OverallDifficulty.IsDefault) return format("OD", OverallDifficulty);
- if (!DrainRate.IsDefault) return format("HP", DrainRate);
+ if (!ScrollSpeed.IsDefault) return format("SC", ScrollSpeed, 2);
+ if (!OverallDifficulty.IsDefault) return format("OD", OverallDifficulty, 1);
+ if (!DrainRate.IsDefault) return format("HP", DrainRate, 1);
return string.Empty;
- string format(string acronym, DifficultyBindable bindable) => $"{acronym}{bindable.Value!.Value.ToStandardFormattedString(1)}";
+ string format(string acronym, DifficultyBindable bindable, int digits) => $"{acronym}{bindable.Value!.Value.ToStandardFormattedString(digits)}";
}
}
diff --git a/osu.Game.Rulesets.Taiko/Scoring/TaikoHitWindows.cs b/osu.Game.Rulesets.Taiko/Scoring/TaikoHitWindows.cs
index 22d268de3b..f3a478f592 100644
--- a/osu.Game.Rulesets.Taiko/Scoring/TaikoHitWindows.cs
+++ b/osu.Game.Rulesets.Taiko/Scoring/TaikoHitWindows.cs
@@ -32,9 +32,9 @@ namespace osu.Game.Rulesets.Taiko.Scoring
public override void SetDifficulty(double difficulty)
{
- great = IBeatmapDifficultyInfo.DifficultyRange(difficulty, GREAT_WINDOW_RANGE);
- ok = IBeatmapDifficultyInfo.DifficultyRange(difficulty, OK_WINDOW_RANGE);
- miss = IBeatmapDifficultyInfo.DifficultyRange(difficulty, MISS_WINDOW_RANGE);
+ great = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, GREAT_WINDOW_RANGE)) - 0.5;
+ ok = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, OK_WINDOW_RANGE)) - 0.5;
+ miss = Math.Floor(IBeatmapDifficultyInfo.DifficultyRange(difficulty, MISS_WINDOW_RANGE)) - 0.5;
}
public override double WindowFor(HitResult result)
diff --git a/osu.Game.Tests/Gameplay/TestSceneHitObjectSamples.cs b/osu.Game.Tests/Gameplay/TestSceneHitObjectSamples.cs
index d198ef5074..c9f5f50232 100644
--- a/osu.Game.Tests/Gameplay/TestSceneHitObjectSamples.cs
+++ b/osu.Game.Tests/Gameplay/TestSceneHitObjectSamples.cs
@@ -64,11 +64,9 @@ namespace osu.Game.Tests.Gameplay
///
/// Tests that a hitobject which provides a custom sample set of 2 retrieves the following samples from the beatmap skin:
/// normal-hitnormal2
- /// normal-hitnormal
/// hitnormal
///
[TestCase("normal-hitnormal2")]
- [TestCase("normal-hitnormal")]
[TestCase("hitnormal")]
public void TestDefaultCustomSampleFromBeatmap(string expectedSample)
{
@@ -162,7 +160,6 @@ namespace osu.Game.Tests.Gameplay
/// Tests that a control point that provides a custom sample of 2 causes .
///
[TestCase("normal-hitnormal2")]
- [TestCase("normal-hitnormal")]
[TestCase("hitnormal")]
public void TestControlPointCustomSampleFromBeatmap(string sampleName)
{
diff --git a/osu.Game.Tests/Mods/ModUtilsTest.cs b/osu.Game.Tests/Mods/ModUtilsTest.cs
index b780d60817..6ec4e799e6 100644
--- a/osu.Game.Tests/Mods/ModUtilsTest.cs
+++ b/osu.Game.Tests/Mods/ModUtilsTest.cs
@@ -342,13 +342,14 @@ namespace osu.Game.Tests.Mods
{
foreach (var mod in ruleset.CreateAllMods())
{
- if (mod.ValidForFreestyleAsRequiredMod && mod.UserPlayable && !commonAcronyms.Contains(mod.Acronym))
- Assert.Fail($"{mod.GetType().ReadableName()} declares {nameof(Mod.ValidForFreestyleAsRequiredMod)} but does not exist in all four basic rulesets!");
+ if (mod.ValidForFreestyleAsRequiredMod && !mod.UserPlayable)
+ Assert.Fail($"Mod {mod.GetType().ReadableName()} declares {nameof(Mod.ValidForFreestyleAsRequiredMod)} but is not playable!");
- // downgraded to warning, because there are valid reasons why they may still not be specified to be valid for freestyle as required
- // (see `TestModsValidForRequiredFreestyleAreConsistentlyCompatibleAcrossRulesets()` test case below).
- if (!mod.ValidForFreestyleAsRequiredMod && mod.UserPlayable && commonAcronyms.Contains(mod.Acronym))
- Assert.Warn($"{mod.GetType().ReadableName()} does not declare {nameof(Mod.ValidForFreestyleAsRequiredMod)} but exists in all four basic rulesets.");
+ if (mod.ValidForFreestyleAsRequiredMod && !mod.HasImplementation)
+ Assert.Fail($"Mod {mod.GetType().ReadableName()} declares {nameof(Mod.ValidForFreestyleAsRequiredMod)} but is not implemented!");
+
+ if (mod.ValidForFreestyleAsRequiredMod && mod.UserPlayable && mod.HasImplementation && !commonAcronyms.Contains(mod.Acronym))
+ Assert.Fail($"{mod.GetType().ReadableName()} declares {nameof(Mod.ValidForFreestyleAsRequiredMod)} but does not exist in all four basic rulesets!");
}
}
});
diff --git a/osu.Game.Tests/Visual/Background/TestSceneUserDimBackgrounds.cs b/osu.Game.Tests/Visual/Background/TestSceneUserDimBackgrounds.cs
index eeaa68e2ee..58fb02c90c 100644
--- a/osu.Game.Tests/Visual/Background/TestSceneUserDimBackgrounds.cs
+++ b/osu.Game.Tests/Visual/Background/TestSceneUserDimBackgrounds.cs
@@ -32,7 +32,7 @@ using osu.Game.Screens.Backgrounds;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.PlayerSettings;
using osu.Game.Screens.Ranking;
-using osu.Game.Screens.Select;
+using osu.Game.Screens.SelectV2;
using osu.Game.Storyboards.Drawables;
using osu.Game.Tests.Resources;
using osuTK;
@@ -325,7 +325,7 @@ namespace osu.Game.Tests.Visual.Background
private void setupUserSettings()
{
AddUntilStep("Song select is current", () => songSelect.IsCurrentScreen());
- AddUntilStep("Song select has selection", () => songSelect.Carousel?.SelectedBeatmapInfo != null);
+ AddUntilStep("Song select has selection", () => songSelect.Carousel?.CurrentSelection != null);
AddStep("Set default user settings", () =>
{
SelectedMods.Value = new[] { new OsuModNoFail() };
@@ -340,7 +340,7 @@ namespace osu.Game.Tests.Visual.Background
rulesets?.Dispose();
}
- private partial class DummySongSelect : PlaySongSelect
+ private partial class DummySongSelect : SoloSongSelect
{
private FadeAccessibleBackground background;
@@ -355,7 +355,7 @@ namespace osu.Game.Tests.Visual.Background
public readonly Bindable DimLevel = new BindableDouble();
public readonly Bindable BlurLevel = new BindableDouble();
- public new BeatmapCarousel Carousel => base.Carousel;
+ public BeatmapCarousel Carousel => this.ChildrenOfType().SingleOrDefault();
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
@@ -368,7 +368,7 @@ namespace osu.Game.Tests.Visual.Background
public bool IsBackgroundDimmed() => background.CurrentColour == OsuColour.Gray(1f - background.CurrentDim);
- public bool IsBackgroundUndimmed() => background.CurrentColour == Color4.White;
+ public bool IsBackgroundUndimmed() => background.CurrentColour == new Color4(0.9f, 0.9f, 0.9f, 1f);
public bool IsUserBlurApplied() => Precision.AlmostEquals(background.CurrentBlur, new Vector2((float)BlurLevel.Value * BackgroundScreenBeatmap.USER_BLUR_FACTOR), 0.1f);
@@ -376,7 +376,7 @@ namespace osu.Game.Tests.Visual.Background
public bool IsBackgroundVisible() => background.CurrentAlpha == 1;
- public bool IsBackgroundBlur() => Precision.AlmostEquals(background.CurrentBlur, new Vector2(BACKGROUND_BLUR), 0.1f);
+ public bool IsBackgroundBlur() => Precision.AlmostBigger(background.CurrentBlur.X, 0, 0.1f);
public bool CheckBackgroundBlur(Vector2 expected) => Precision.AlmostEquals(background.CurrentBlur, expected, 0.1f);
diff --git a/osu.Game.Tests/Visual/Editing/TestSceneEditorSaving.cs b/osu.Game.Tests/Visual/Editing/TestSceneEditorSaving.cs
index 2e7b55ab49..7f40da5bab 100644
--- a/osu.Game.Tests/Visual/Editing/TestSceneEditorSaving.cs
+++ b/osu.Game.Tests/Visual/Editing/TestSceneEditorSaving.cs
@@ -15,7 +15,7 @@ using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Overlays;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Edit.Compose.Components.Timeline;
-using osu.Game.Screens.Select;
+using osu.Game.Screens.SelectV2;
using osuTK.Input;
namespace osu.Game.Tests.Visual.Editing
@@ -190,7 +190,7 @@ namespace osu.Game.Tests.Visual.Editing
AddStep("Set tags again", () => EditorBeatmap.BeatmapInfo.Metadata.Tags = tags_to_discard);
AddStep("Exit editor", () => Editor.Exit());
- AddUntilStep("Wait for song select", () => Game.ScreenStack.CurrentScreen is PlaySongSelect);
+ AddUntilStep("Wait for song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect);
AddAssert("Tags reverted correctly", () => Game.Beatmap.Value.BeatmapInfo.Metadata.Tags == tags_to_save);
}
diff --git a/osu.Game.Tests/Visual/Editing/TestSceneOpenEditorTimestamp.cs b/osu.Game.Tests/Visual/Editing/TestSceneOpenEditorTimestamp.cs
index 955ded97af..e3b79d4053 100644
--- a/osu.Game.Tests/Visual/Editing/TestSceneOpenEditorTimestamp.cs
+++ b/osu.Game.Tests/Visual/Editing/TestSceneOpenEditorTimestamp.cs
@@ -14,7 +14,7 @@ using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Menu;
-using osu.Game.Screens.Select;
+using osu.Game.Screens.SelectV2;
using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Visual.Editing
@@ -36,7 +36,7 @@ namespace osu.Game.Tests.Visual.Editing
() => Is.EqualTo(1));
AddStep("enter song select", () => Game.ChildrenOfType().Single().OnSolo?.Invoke());
- AddUntilStep("entered song select", () => Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("entered song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
addStepClickLink("00:00:000 (1)", waitForSeek: false);
AddUntilStep("received 'must be in edit'",
@@ -151,12 +151,12 @@ namespace osu.Game.Tests.Visual.Editing
AddStep("Present beatmap", () => Game.PresentBeatmap(beatmapSet));
AddUntilStep("Wait for song select", () =>
Game.Beatmap.Value.BeatmapSetInfo.Equals(beatmapSet)
- && Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect
- && songSelect.BeatmapSetsLoaded
+ && Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect
+ && songSelect.CarouselItemsPresented
);
AddStep("Switch ruleset", () => Game.Ruleset.Value = ruleset);
AddStep("Open editor for ruleset", () =>
- ((PlaySongSelect)Game.ScreenStack.CurrentScreen)
+ ((SoloSongSelect)Game.ScreenStack.CurrentScreen)
.Edit(beatmapSet.Beatmaps.Last(beatmap => beatmap.Ruleset.Name == ruleset.Name))
);
AddUntilStep("Wait for editor open", () => editor?.ReadyForUse == true);
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneGameplaySamplePlayback.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneGameplaySamplePlayback.cs
index 2334b1c6d6..84b312d5ee 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneGameplaySamplePlayback.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneGameplaySamplePlayback.cs
@@ -9,7 +9,6 @@ using osu.Game.Audio;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Objects.Drawables;
-using osu.Game.Screens.Play;
using osu.Game.Skinning;
namespace osu.Game.Tests.Visual.Gameplay
@@ -74,8 +73,8 @@ namespace osu.Game.Tests.Visual.Gameplay
//
// We want to keep seeking while asserting various test conditions, so
// continue to seek until we unset the flag.
- var gameplayClockContainer = Player.ChildrenOfType().First();
- gameplayClockContainer.Seek(gameplayClockContainer.CurrentTime > 30000 ? 0 : 60000);
+ var gameplayClockContainer = Player?.GameplayClockContainer;
+ gameplayClockContainer?.Seek(gameplayClockContainer.CurrentTime > 30000 ? 0 : 60000);
}
}
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayPlayer.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayPlayer.cs
index 81dd23661c..b3ed4135a9 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneReplayPlayer.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneReplayPlayer.cs
@@ -6,11 +6,16 @@ using NUnit.Framework;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
+using osu.Game.Replays;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
+using osu.Game.Rulesets.Osu.Replays;
using osu.Game.Scoring;
using osu.Game.Screens.Play;
+using osu.Game.Screens.Play.HUD;
using osu.Game.Tests.Beatmaps;
+using osu.Game.Tests.Resources;
+using osuTK;
using osuTK.Input;
namespace osu.Game.Tests.Visual.Gameplay
@@ -157,6 +162,51 @@ namespace osu.Game.Tests.Visual.Gameplay
AddAssert("Jumped forwards", () => Player.GameplayClockContainer.CurrentTime - lastTime > 500);
}
+ [Test]
+ public void TestReplayDoesNotFailUntilRunningOutOfFrames()
+ {
+ var score = new Score
+ {
+ ScoreInfo = TestResources.CreateTestScoreInfo(Beatmap.Value.BeatmapInfo),
+ Replay = new Replay
+ {
+ Frames =
+ {
+ new OsuReplayFrame(0, Vector2.Zero),
+ new OsuReplayFrame(10000, Vector2.Zero),
+ }
+ }
+ };
+ score.ScoreInfo.Mods = [];
+ score.ScoreInfo.Rank = ScoreRank.F;
+ AddStep("set global state", () =>
+ {
+ Beatmap.Value = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
+ Ruleset.Value = Beatmap.Value.BeatmapInfo.Ruleset;
+ SelectedMods.Value = score.ScoreInfo.Mods;
+ });
+ AddStep("create player", () => Player = new TestReplayPlayer(score, showResults: false));
+ AddStep("load player", () => LoadScreen(Player));
+ AddUntilStep("wait for loaded", () => Player.IsCurrentScreen());
+ AddStep("seek to 8000", () => Player.Seek(8000));
+ AddUntilStep("wait for fail", () => Player.GameplayState.HasFailed);
+ AddAssert("player failed after 10000", () => Player.GameplayClockContainer.CurrentTime, () => Is.GreaterThanOrEqualTo(10000));
+ }
+
+ [Test]
+ public void TestPlayerLoaderSettingsHover()
+ {
+ loadPlayerWithBeatmap();
+
+ AddUntilStep("wait for settings overlay hidden", () => settingsOverlay().Expanded.Value, () => Is.False);
+ AddStep("move mouse to right of screen", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopRight));
+ AddUntilStep("wait for settings overlay visible", () => settingsOverlay().Expanded.Value, () => Is.True);
+ AddStep("move mouse to centre of screen", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.Centre));
+ AddUntilStep("wait for settings overlay hidden", () => settingsOverlay().Expanded.Value, () => Is.False);
+
+ PlayerSettingsOverlay settingsOverlay() => Player.ChildrenOfType().Single();
+ }
+
private void loadPlayerWithBeatmap(IBeatmap? beatmap = null)
{
AddStep("create player", () =>
diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneBeatmapEditorNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneBeatmapEditorNavigation.cs
index ee5b1797ed..c7499c98b5 100644
--- a/osu.Game.Tests/Visual/Navigation/TestSceneBeatmapEditorNavigation.cs
+++ b/osu.Game.Tests/Visual/Navigation/TestSceneBeatmapEditorNavigation.cs
@@ -26,8 +26,8 @@ using osu.Game.Screens.Edit;
using osu.Game.Screens.Edit.GameplayTest;
using osu.Game.Screens.Edit.Setup;
using osu.Game.Screens.Menu;
-using osu.Game.Screens.Select;
using osu.Game.Screens.Select.Filter;
+using osu.Game.Screens.SelectV2;
using osu.Game.Tests.Resources;
using osuTK.Input;
@@ -110,7 +110,7 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("exit", () => getEditor().Exit());
- AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect
+ AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect
&& songSelect.Beatmap.Value is DummyWorkingBeatmap);
}
@@ -171,7 +171,7 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("switch ruleset at song select", () => Game.Ruleset.Value = new ManiaRuleset().RulesetInfo);
- AddStep("open editor", () => ((PlaySongSelect)Game.ScreenStack.CurrentScreen).Edit(beatmapSet.Beatmaps.First(beatmap => beatmap.Ruleset.OnlineID == 0)));
+ AddStep("open editor", () => ((SoloSongSelect)Game.ScreenStack.CurrentScreen).Edit(beatmapSet.Beatmaps.First(beatmap => beatmap.Ruleset.OnlineID == 0)));
AddUntilStep("wait for editor open", () => Game.ScreenStack.CurrentScreen is Editor editor && editor.ReadyForUse);
AddAssert("editor ruleset is osu!", () => Game.Ruleset.Value, () => Is.EqualTo(new OsuRuleset().RulesetInfo));
@@ -187,8 +187,8 @@ namespace osu.Game.Tests.Visual.Navigation
});
AddAssert("gameplay ruleset is osu!", () => Game.Ruleset.Value, () => Is.EqualTo(new OsuRuleset().RulesetInfo));
- AddStep("exit to song select", () => Game.PerformFromScreen(_ => { }, typeof(PlaySongSelect).Yield()));
- AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is PlaySongSelect);
+ AddStep("exit to song select", () => Game.PerformFromScreen(_ => { }, typeof(SoloSongSelect).Yield()));
+ AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect);
AddAssert("previous ruleset restored", () => Game.Ruleset.Value.Equals(new ManiaRuleset().RulesetInfo));
}
@@ -289,8 +289,8 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("user request play", () => Game.MusicController.Play(requestedByUser: true));
AddUntilStep("music still stopped", () => !Game.MusicController.IsPlaying);
- AddStep("exit to song select", () => Game.PerformFromScreen(_ => { }, typeof(PlaySongSelect).Yield()));
- AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is PlaySongSelect);
+ AddStep("exit to song select", () => Game.PerformFromScreen(_ => { }, typeof(SoloSongSelect).Yield()));
+ AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect);
AddUntilStep("wait for music playing", () => Game.MusicController.IsPlaying);
AddStep("user request stop", () => Game.MusicController.Stop(requestedByUser: true));
@@ -352,13 +352,13 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("present beatmap", () => Game.PresentBeatmap(beatmapSet));
AddUntilStep("wait for song select",
() => Game.Beatmap.Value.BeatmapSetInfo.Equals(beatmapSet)
- && Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect
- && songSelect.BeatmapSetsLoaded);
+ && Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect
+ && songSelect.CarouselItemsPresented);
}
private void openEditor()
{
- AddStep("open editor", () => ((PlaySongSelect)Game.ScreenStack.CurrentScreen).Edit(beatmapSet.Beatmaps.First(beatmap => beatmap.Ruleset.OnlineID == 0)));
+ AddStep("open editor", () => ((SoloSongSelect)Game.ScreenStack.CurrentScreen).Edit(beatmapSet.Beatmaps.First(beatmap => beatmap.Ruleset.OnlineID == 0)));
AddUntilStep("wait for editor open", () => Game.ScreenStack.CurrentScreen is Editor editor && editor.ReadyForUse);
}
diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneButtonSystemNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneButtonSystemNavigation.cs
index 43b160250c..0ccfb5a4e3 100644
--- a/osu.Game.Tests/Visual/Navigation/TestSceneButtonSystemNavigation.cs
+++ b/osu.Game.Tests/Visual/Navigation/TestSceneButtonSystemNavigation.cs
@@ -5,7 +5,7 @@ using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Screens.Menu;
-using osu.Game.Screens.Select;
+using osu.Game.Screens.SelectV2;
using osuTK.Input;
namespace osu.Game.Tests.Visual.Navigation
@@ -40,7 +40,7 @@ namespace osu.Game.Tests.Visual.Navigation
InputManager.Key(Key.P);
});
- AddAssert("entered song select", () => Game.ScreenStack.CurrentScreen is PlaySongSelect);
+ AddAssert("entered song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect);
}
[Test]
@@ -55,7 +55,7 @@ namespace osu.Game.Tests.Visual.Navigation
AddAssert("state is play", () => buttons.State == ButtonSystemState.Play);
AddStep("press P", () => InputManager.Key(Key.P));
- AddAssert("entered song select", () => Game.ScreenStack.CurrentScreen is PlaySongSelect);
+ AddAssert("entered song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect);
}
}
}
diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneChangeAndUseGameplayBindings.cs b/osu.Game.Tests/Visual/Navigation/TestSceneChangeAndUseGameplayBindings.cs
index 3a3af43cb1..4f27d9b323 100644
--- a/osu.Game.Tests/Visual/Navigation/TestSceneChangeAndUseGameplayBindings.cs
+++ b/osu.Game.Tests/Visual/Navigation/TestSceneChangeAndUseGameplayBindings.cs
@@ -15,7 +15,7 @@ using osu.Game.Input.Bindings;
using osu.Game.Overlays.Settings.Sections.Input;
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD;
-using osu.Game.Screens.Select;
+using osu.Game.Screens.SelectV2;
using osu.Game.Tests.Beatmaps.IO;
using osuTK.Input;
@@ -54,10 +54,10 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
- PushAndConfirm(() => new PlaySongSelect());
+ PushAndConfirm(() => new SoloSongSelect());
AddUntilStep("wait for selection", () => !Game.Beatmap.IsDefault);
- AddUntilStep("wait for carousel load", () => songSelect.BeatmapSetsLoaded);
+ AddUntilStep("wait for carousel load", () => songSelect.CarouselItemsPresented);
AddStep("enter gameplay", () => InputManager.Key(Key.Enter));
@@ -94,7 +94,7 @@ namespace osu.Game.Tests.Visual.Navigation
.AsEnumerable()
.First(k => k.RulesetName == "osu" && k.ActionInt == 0);
- private Screens.Select.SongSelect songSelect => Game.ScreenStack.CurrentScreen as Screens.Select.SongSelect;
+ private SoloSongSelect songSelect => Game.ScreenStack.CurrentScreen as SoloSongSelect;
private Player player => Game.ScreenStack.CurrentScreen as Player;
diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneMouseWheelVolumeAdjust.cs b/osu.Game.Tests/Visual/Navigation/TestSceneMouseWheelVolumeAdjust.cs
index 26a37fa211..0a4349d73f 100644
--- a/osu.Game.Tests/Visual/Navigation/TestSceneMouseWheelVolumeAdjust.cs
+++ b/osu.Game.Tests/Visual/Navigation/TestSceneMouseWheelVolumeAdjust.cs
@@ -5,6 +5,7 @@ using NUnit.Framework;
using osu.Framework.Extensions;
using osu.Game.Configuration;
using osu.Game.Screens.Play;
+using osu.Game.Screens.SelectV2;
using osu.Game.Tests.Beatmaps.IO;
using osuTK.Input;
@@ -83,9 +84,9 @@ namespace osu.Game.Tests.Visual.Navigation
private void loadToPlayerNonBreakTime()
{
Player? player = null;
- Screens.Select.SongSelect songSelect = null!;
- PushAndConfirm(() => songSelect = new TestSceneScreenNavigation.TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ SoloSongSelect songSelect = null!;
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddStep("import beatmap", () => BeatmapImportHelper.LoadOszIntoOsu(Game, virtualTrack: true).WaitSafely());
AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault);
diff --git a/osu.Game.Tests/Visual/Navigation/TestScenePerformFromScreen.cs b/osu.Game.Tests/Visual/Navigation/TestScenePerformFromScreen.cs
index 5fe4bb9340..04d7b15295 100644
--- a/osu.Game.Tests/Visual/Navigation/TestScenePerformFromScreen.cs
+++ b/osu.Game.Tests/Visual/Navigation/TestScenePerformFromScreen.cs
@@ -17,9 +17,9 @@ using osu.Game.Rulesets.Mods;
using osu.Game.Screens;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Play;
+using osu.Game.Screens.SelectV2;
using osu.Game.Tests.Beatmaps.IO;
using osuTK.Input;
-using static osu.Game.Tests.Visual.Navigation.TestSceneScreenNavigation;
namespace osu.Game.Tests.Visual.Navigation
{
@@ -44,17 +44,17 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestPerformAtSongSelect()
{
- PushAndConfirm(() => new TestPlaySongSelect());
+ PushAndConfirm(() => new SoloSongSelect());
- AddStep("perform immediately", () => Game.PerformFromScreen(_ => actionPerformed = true, new[] { typeof(TestPlaySongSelect) }));
+ AddStep("perform immediately", () => Game.PerformFromScreen(_ => actionPerformed = true, new[] { typeof(SoloSongSelect) }));
AddAssert("did perform", () => actionPerformed);
- AddAssert("screen didn't change", () => Game.ScreenStack.CurrentScreen is TestPlaySongSelect);
+ AddAssert("screen didn't change", () => Game.ScreenStack.CurrentScreen is SoloSongSelect);
}
[Test]
public void TestPerformAtMenuFromSongSelect()
{
- PushAndConfirm(() => new TestPlaySongSelect());
+ PushAndConfirm(() => new SoloSongSelect());
AddStep("try to perform", () => Game.PerformFromScreen(_ => actionPerformed = true));
AddUntilStep("returned to menu", () => Game.ScreenStack.CurrentScreen is MainMenu);
@@ -69,8 +69,8 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("Press enter", () => InputManager.Key(Key.Enter));
AddUntilStep("Wait for new screen", () => Game.ScreenStack.CurrentScreen is PlayerLoader);
- AddStep("try to perform", () => Game.PerformFromScreen(_ => actionPerformed = true, new[] { typeof(TestPlaySongSelect) }));
- AddUntilStep("returned to song select", () => Game.ScreenStack.CurrentScreen is TestPlaySongSelect);
+ AddStep("try to perform", () => Game.PerformFromScreen(_ => actionPerformed = true, new[] { typeof(SoloSongSelect) }));
+ AddUntilStep("returned to song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect);
AddAssert("did perform", () => actionPerformed);
}
@@ -257,7 +257,7 @@ namespace osu.Game.Tests.Visual.Navigation
private void importAndWaitForSongSelect()
{
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
- PushAndConfirm(() => new TestPlaySongSelect());
+ PushAndConfirm(() => new SoloSongSelect());
AddUntilStep("beatmap updated", () => Game.Beatmap.Value.BeatmapSetInfo.OnlineID == 241526);
}
diff --git a/osu.Game.Tests/Visual/Navigation/TestScenePresentBeatmap.cs b/osu.Game.Tests/Visual/Navigation/TestScenePresentBeatmap.cs
index f036b4b3ef..e7172cacbf 100644
--- a/osu.Game.Tests/Visual/Navigation/TestScenePresentBeatmap.cs
+++ b/osu.Game.Tests/Visual/Navigation/TestScenePresentBeatmap.cs
@@ -16,7 +16,7 @@ using osu.Game.Rulesets.Catch;
using osu.Game.Rulesets.Mania;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Menu;
-using osu.Game.Screens.Select;
+using osu.Game.Screens.SelectV2;
namespace osu.Game.Tests.Visual.Navigation
{
@@ -81,11 +81,9 @@ namespace osu.Game.Tests.Visual.Navigation
presentAndConfirm(osuImport);
var maniaImport = importBeatmap(2, new ManiaRuleset().RulesetInfo);
- confirmBeatmapInSongSelect(maniaImport);
presentAndConfirm(maniaImport);
var catchImport = importBeatmap(3, new CatchRuleset().RulesetInfo);
- confirmBeatmapInSongSelect(catchImport);
presentAndConfirm(catchImport);
// Ruleset is always changed.
@@ -103,11 +101,9 @@ namespace osu.Game.Tests.Visual.Navigation
presentAndConfirm(osuImport);
var maniaImport = importBeatmap(2, new ManiaRuleset().RulesetInfo);
- confirmBeatmapInSongSelect(maniaImport);
presentAndConfirm(maniaImport);
var catchImport = importBeatmap(3, new CatchRuleset().RulesetInfo);
- confirmBeatmapInSongSelect(catchImport);
presentAndConfirm(catchImport);
// force ruleset to osu!mania
@@ -178,14 +174,14 @@ namespace osu.Game.Tests.Visual.Navigation
{
AddUntilStep("wait for carousel loaded", () =>
{
- var songSelect = (Screens.Select.SongSelect)Game.ScreenStack.CurrentScreen;
+ var songSelect = (SoloSongSelect)Game.ScreenStack.CurrentScreen;
return songSelect.ChildrenOfType().SingleOrDefault()?.IsLoaded == true;
});
AddUntilStep("beatmap in song select", () =>
{
- var songSelect = (Screens.Select.SongSelect)Game.ScreenStack.CurrentScreen;
- return songSelect.ChildrenOfType().Single().BeatmapSets.Any(b => b.MatchesOnlineID(getImport()));
+ var songSelect = (SoloSongSelect)Game.ScreenStack.CurrentScreen;
+ return songSelect.ChildrenOfType().Single().GetCarouselItems()!.Any(i => i.Model is BeatmapSetInfo bsi && bsi.MatchesOnlineID(getImport()));
});
}
@@ -193,7 +189,7 @@ namespace osu.Game.Tests.Visual.Navigation
{
AddStep("present beatmap", () => Game.PresentBeatmap(getImport()));
- AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is Screens.Select.SongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
AddUntilStep("correct beatmap displayed", () => Game.Beatmap.Value.BeatmapSetInfo.OnlineID, () => Is.EqualTo(getImport().OnlineID));
AddAssert("correct ruleset selected", () => Game.Ruleset.Value, () => Is.EqualTo(getImport().Beatmaps.First().Ruleset));
}
@@ -203,7 +199,7 @@ namespace osu.Game.Tests.Visual.Navigation
Predicate pred = b => b.OnlineID == importedID * 1024 + 2;
AddStep("present difficulty", () => Game.PresentBeatmap(getImport(), pred));
- AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is Screens.Select.SongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("wait for song select", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
AddUntilStep("correct beatmap displayed", () => Game.Beatmap.Value.BeatmapInfo.OnlineID, () => Is.EqualTo(importedID * 1024 + 2));
AddAssert("correct ruleset selected", () => Game.Ruleset.Value.OnlineID, () => Is.EqualTo(expectedRulesetOnlineID ?? getImport().Beatmaps.First().Ruleset.OnlineID));
}
diff --git a/osu.Game.Tests/Visual/Navigation/TestScenePresentScore.cs b/osu.Game.Tests/Visual/Navigation/TestScenePresentScore.cs
index 2c2335de13..fa337a3ec2 100644
--- a/osu.Game.Tests/Visual/Navigation/TestScenePresentScore.cs
+++ b/osu.Game.Tests/Visual/Navigation/TestScenePresentScore.cs
@@ -18,7 +18,8 @@ using osu.Game.Screens;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Play;
using osu.Game.Screens.Ranking;
-using osu.Game.Screens.Select;
+using osu.Game.Screens.SelectV2;
+using FilterControl = osu.Game.Screens.SelectV2.FilterControl;
namespace osu.Game.Tests.Visual.Navigation
{
@@ -96,9 +97,9 @@ namespace osu.Game.Tests.Visual.Navigation
public void TestFromSongSelectWithFilter([Values] ScorePresentType type)
{
AddStep("enter song select", () => Game.ChildrenOfType().Single().OnSolo?.Invoke());
- AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
- AddStep("filter to nothing", () => ((PlaySongSelect)Game.ScreenStack.CurrentScreen).FilterControl.CurrentTextSearch.Value = "fdsajkl;fgewq");
+ AddStep("filter to nothing", () => ((SoloSongSelect)Game.ScreenStack.CurrentScreen).ChildrenOfType().Single().Search("fdsajkl;fgewq"));
AddUntilStep("wait for no results", () => Beatmap.IsDefault);
var firstImport = importScore(1, new CatchRuleset().RulesetInfo);
@@ -109,7 +110,7 @@ namespace osu.Game.Tests.Visual.Navigation
public void TestFromSongSelectWithConvertRulesetChange([Values] ScorePresentType type)
{
AddStep("enter song select", () => Game.ChildrenOfType().Single().OnSolo?.Invoke());
- AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
AddStep("set convert to false", () => Game.LocalConfig.SetValue(OsuSetting.ShowConvertedBeatmaps, false));
@@ -121,7 +122,7 @@ namespace osu.Game.Tests.Visual.Navigation
public void TestFromSongSelect([Values] ScorePresentType type)
{
AddStep("enter song select", () => Game.ChildrenOfType().Single().OnSolo?.Invoke());
- AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
var firstImport = importScore(1);
presentAndConfirm(firstImport, type);
@@ -134,7 +135,7 @@ namespace osu.Game.Tests.Visual.Navigation
public void TestFromSongSelectDifferentRuleset([Values] ScorePresentType type)
{
AddStep("enter song select", () => Game.ChildrenOfType().Single().OnSolo?.Invoke());
- AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
var firstImport = importScore(1);
presentAndConfirm(firstImport, type);
@@ -147,7 +148,7 @@ namespace osu.Game.Tests.Visual.Navigation
public void TestPresentTwoImportsWithSameOnlineIDButDifferentHashes([Values] ScorePresentType type)
{
AddStep("enter song select", () => Game.ChildrenOfType().Single().OnSolo?.Invoke());
- AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
var firstImport = importScore(1);
presentAndConfirm(firstImport, type);
@@ -160,7 +161,7 @@ namespace osu.Game.Tests.Visual.Navigation
public void TestScoreRefetchIgnoresEmptyHash()
{
AddStep("enter song select", () => Game.ChildrenOfType().Single().OnSolo?.Invoke());
- AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is PlaySongSelect songSelect && songSelect.BeatmapSetsLoaded);
+ AddUntilStep("song select is current", () => Game.ScreenStack.CurrentScreen is SoloSongSelect songSelect && songSelect.CarouselItemsPresented);
importScore(-1, hash: string.Empty);
importScore(3, hash: @"deadbeef");
diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs
index 2a755b46b3..d50fc69823 100644
--- a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs
+++ b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs
@@ -26,7 +26,6 @@ using osu.Game.Graphics.Carousel;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
-using osu.Game.Online.Leaderboards;
using osu.Game.Online.Notifications.WebSocket;
using osu.Game.Online.Notifications.WebSocket.Events;
using osu.Game.Overlays;
@@ -49,20 +48,13 @@ using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Play.PlayerSettings;
using osu.Game.Screens.Ranking;
-using osu.Game.Screens.Select;
-using osu.Game.Screens.Select.Carousel;
using osu.Game.Screens.Select.Leaderboards;
-using osu.Game.Screens.Select.Options;
using osu.Game.Screens.SelectV2;
using osu.Game.Tests.Beatmaps.IO;
using osu.Game.Tests.Resources;
using osu.Game.Utils;
using osuTK;
using osuTK.Input;
-using BeatmapCarousel = osu.Game.Screens.Select.BeatmapCarousel;
-using CollectionDropdown = osu.Game.Collections.CollectionDropdown;
-using FilterControl = osu.Game.Screens.Select.FilterControl;
-using FooterButtonRandom = osu.Game.Screens.Select.FooterButtonRandom;
namespace osu.Game.Tests.Visual.Navigation
{
@@ -146,62 +138,70 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestExitSongSelectWithEscape()
{
- TestPlaySongSelect songSelect = null;
+ SoloSongSelect songSelect = null;
+ ModSelectOverlay modSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddStep("Show mods overlay", () => songSelect.ModSelectOverlay.Show());
- AddAssert("Overlay was shown", () => songSelect.ModSelectOverlay.State.Value == Visibility.Visible);
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddStep("Show mods overlay", () =>
+ {
+ modSelect = songSelect!.ChildrenOfType().Single();
+ modSelect.Show();
+ });
+ AddAssert("Overlay was shown", () => modSelect.State.Value == Visibility.Visible);
pushEscape();
- AddAssert("Overlay was hidden", () => songSelect.ModSelectOverlay.State.Value == Visibility.Hidden);
+ AddAssert("Overlay was hidden", () => modSelect.State.Value == Visibility.Hidden);
exitViaEscapeAndConfirm();
}
[Test]
public void TestEnterGameplayWhileFilteringToNoSelection()
{
- TestPlaySongSelect songSelect = null;
+ SoloSongSelect songSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault);
- AddStep("force selection", () =>
+ AddStep("force selection and change filter immediately", () =>
{
- songSelect.FinaliseSelection();
- songSelect.FilterControl.CurrentTextSearch.Value = "test";
+ InputManager.Key(Key.Enter);
+ songSelect.ChildrenOfType().Single().Search("test");
});
AddUntilStep("wait for player", () => !songSelect.IsCurrentScreen());
AddStep("return to song select", () => songSelect.MakeCurrent());
- AddUntilStep("wait for selection lost", () => songSelect.Beatmap.IsDefault);
+ AddUntilStep("selection not lost", () => !songSelect.Beatmap.IsDefault);
+ AddUntilStep("placeholder visible", () => songSelect.ChildrenOfType().Single().State.Value, () => Is.EqualTo(Visibility.Visible));
}
[Test]
public void TestSongSelectBackActionHandling()
{
- TestPlaySongSelect songSelect = null;
+ SoloSongSelect songSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+
+ AddUntilStep("wait for filter control", () => filterControlTextBox().IsLoaded);
AddStep("set filter", () => filterControlTextBox().Current.Value = "test");
AddStep("press back", () => InputManager.Click(MouseButton.Button1));
- AddAssert("still at song select", () => Game.ScreenStack.CurrentScreen == songSelect);
+ AddAssert("still at song select", () => Game.ScreenStack.CurrentScreen, () => Is.EqualTo(songSelect));
AddAssert("filter cleared", () => string.IsNullOrEmpty(filterControlTextBox().Current.Value));
AddStep("set filter again", () => filterControlTextBox().Current.Value = "test");
AddStep("open collections dropdown", () =>
{
- InputManager.MoveMouseTo(songSelect.ChildrenOfType().Single());
+ InputManager.MoveMouseTo(songSelect.ChildrenOfType().Single());
InputManager.Click(MouseButton.Left);
});
AddStep("press back once", () => InputManager.Click(MouseButton.Button1));
AddAssert("still at song select", () => Game.ScreenStack.CurrentScreen == songSelect);
AddAssert("collections dropdown closed", () => songSelect
- .ChildrenOfType().Single()
+ .ChildrenOfType().Single()
.ChildrenOfType.DropdownMenu>().Single().State == MenuState.Closed);
AddStep("press back a second time", () => InputManager.Click(MouseButton.Button1));
@@ -210,17 +210,17 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("press back a third time", () => InputManager.Click(MouseButton.Button1));
ConfirmAtMainMenu();
- TextBox filterControlTextBox() => songSelect.ChildrenOfType().Single();
+ FilterControl.SongSelectSearchTextBox filterControlTextBox() => songSelect.ChildrenOfType().Single();
}
[Test]
public void TestSongSelectRandomRewindButton()
{
Guid? originalSelection = null;
- TestPlaySongSelect songSelect = null;
+ SoloSongSelect songSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddStep("Add two beatmaps", () =>
{
@@ -247,41 +247,6 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestSongSelectScrollHandling()
- {
- TestPlaySongSelect songSelect = null;
- double scrollPosition = 0;
-
- AddStep("set game volume to max", () => Game.Dependencies.Get().SetValue(FrameworkSetting.VolumeUniversal, 1d));
- AddUntilStep("wait for volume overlay to hide", () => Game.ChildrenOfType().SingleOrDefault()?.State.Value, () => Is.EqualTo(Visibility.Hidden));
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
- AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
- AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault);
-
- AddStep("store scroll position", () => scrollPosition = getCarouselScrollPosition());
-
- AddStep("move to left side", () => InputManager.MoveMouseTo(
- songSelect.ChildrenOfType().Single().ScreenSpaceDrawQuad.TopLeft + new Vector2(1)));
- AddStep("scroll down", () => InputManager.ScrollVerticalBy(-1));
- AddAssert("carousel didn't move", getCarouselScrollPosition, () => Is.EqualTo(scrollPosition));
-
- AddRepeatStep("alt-scroll down", () =>
- {
- InputManager.PressKey(Key.AltLeft);
- InputManager.ScrollVerticalBy(-1);
- InputManager.ReleaseKey(Key.AltLeft);
- }, 5);
- AddAssert("game volume decreased", () => Game.Dependencies.Get().Get(FrameworkSetting.VolumeUniversal), () => Is.LessThan(1));
-
- AddStep("move to carousel", () => InputManager.MoveMouseTo(songSelect.ChildrenOfType().Single()));
- AddStep("scroll down", () => InputManager.ScrollVerticalBy(-1));
- AddAssert("carousel moved", getCarouselScrollPosition, () => Is.Not.EqualTo(scrollPosition));
-
- double getCarouselScrollPosition() => Game.ChildrenOfType>().Single().Current;
- }
-
- [Test]
- public void TestNewSongSelectScrollHandling()
{
SoloSongSelect songSelect = null;
double scrollPosition = 0;
@@ -293,6 +258,8 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
AddUntilStep("wait for beatmap", () => Game.ChildrenOfType().Any());
+ // TODO: this logic can likely be removed when we fix https://github.com/ppy/osu/issues/33379
+ // It should be probably be immediate in this case.
AddWaitStep("wait for scroll", 10);
AddStep("store scroll position", () => scrollPosition = getCarouselScrollPosition());
@@ -325,7 +292,7 @@ namespace osu.Game.Tests.Visual.Navigation
}, 5);
AddAssert("game volume decreased", () => Game.Dependencies.Get().Get(FrameworkSetting.VolumeUniversal), () => Is.LessThan(1));
- AddStep("move to carousel", () => InputManager.MoveMouseTo(songSelect.ChildrenOfType().Single()));
+ AddStep("move to carousel", () => InputManager.MoveMouseTo(songSelect.ChildrenOfType().Single()));
AddStep("scroll down", () => InputManager.ScrollVerticalBy(-1));
AddAssert("carousel moved", getCarouselScrollPosition, () => Is.Not.EqualTo(scrollPosition));
@@ -339,21 +306,21 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestOpenModSelectOverlayUsingAction()
{
- TestPlaySongSelect songSelect = null;
+ SoloSongSelect songSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
AddStep("Show mods overlay", () => InputManager.Key(Key.F1));
- AddAssert("Overlay was shown", () => songSelect.ModSelectOverlay.State.Value == Visibility.Visible);
+ AddAssert("Overlay was shown", () => songSelect!.ChildrenOfType().Single().State.Value == Visibility.Visible);
}
[Test]
public void TestAttemptPlayBeatmapWrongHashFails()
{
- Screens.Select.SongSelect songSelect = null;
+ Screens.SelectV2.SongSelect songSelect = null;
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).GetResultSafely());
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault);
@@ -384,11 +351,11 @@ namespace osu.Game.Tests.Visual.Navigation
[Test]
public void TestAttemptPlayBeatmapMissingFails()
{
- Screens.Select.SongSelect songSelect = null;
+ Screens.SelectV2.SongSelect songSelect = null;
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).GetResultSafely());
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault);
@@ -418,9 +385,9 @@ namespace osu.Game.Tests.Visual.Navigation
{
Player player = null;
- Screens.Select.SongSelect songSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ Screens.SelectV2.SongSelect songSelect = null;
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
@@ -461,9 +428,9 @@ namespace osu.Game.Tests.Visual.Navigation
{
Player player = null;
- Screens.Select.SongSelect songSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ Screens.SelectV2.SongSelect songSelect = null;
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddStep("import beatmap", () => BeatmapImportHelper.LoadOszIntoOsu(Game).WaitSafely());
@@ -515,9 +482,9 @@ namespace osu.Game.Tests.Visual.Navigation
{
Player player = null;
- Screens.Select.SongSelect songSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ Screens.SelectV2.SongSelect songSelect = null;
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddStep("import beatmap", () => BeatmapImportHelper.LoadOszIntoOsu(Game).WaitSafely());
@@ -558,9 +525,9 @@ namespace osu.Game.Tests.Visual.Navigation
{
Player player = null;
- Screens.Select.SongSelect songSelect = null;
- PushAndConfirm(() => songSelect = new TestPlaySongSelect());
- AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded);
+ Screens.SelectV2.SongSelect songSelect = null;
+ PushAndConfirm(() => songSelect = new SoloSongSelect());
+ AddUntilStep("wait for song select", () => songSelect.CarouselItemsPresented);
AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely());
@@ -663,7 +630,7 @@ namespace osu.Game.Tests.Visual.Navigation
playToResults();
ScoreInfo score = null;
- LeaderboardScore scorePanel = null;
+ BeatmapLeaderboardScore scorePanel = null;
AddStep("get score", () => score = ((ResultsScreen)Game.ScreenStack.CurrentScreen).Score);
@@ -672,18 +639,11 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("press back button", () => Game.ChildrenOfType().First().Action!.Invoke());
AddStep("show local scores",
- () => Game.ChildrenOfType