diff --git a/osu-framework b/osu-framework index 036b124eb2..db310bfc10 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 036b124eb2387dde29af56e06391c42063ec85e2 +Subproject commit db310bfc10cd1c9ed12c9e19cdc0edfa53117353 diff --git a/osu-resources b/osu-resources index 4f9ed4e703..f85c594c18 160000 --- a/osu-resources +++ b/osu-resources @@ -1 +1 @@ -Subproject commit 4f9ed4e703777ede98737c7e2af31efa4694c395 +Subproject commit f85c594c182db2b01233e29ca52639b7baa00402 diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs index aff2903078..c2e33f7f32 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs @@ -48,7 +48,7 @@ namespace osu.Desktop.VisualTests.Tests HitObjects = objects, BeatmapInfo = new BeatmapInfo { - BaseDifficulty = new BaseDifficulty(), + Difficulty = new BeatmapDifficulty(), Metadata = new BeatmapMetadata { Artist = @"Unknown", diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs index 84bb1cfde6..c97ea929f3 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs @@ -8,6 +8,7 @@ using osu.Framework.MathUtils; using osu.Game.Database; using osu.Game.Modes; using osu.Game.Screens.Select; +using osu.Game.Screens.Select.Filter; namespace osu.Desktop.VisualTests.Tests { @@ -39,10 +40,10 @@ namespace osu.Desktop.VisualTests.Tests Add(songSelect = new PlaySongSelect()); - AddButton(@"Sort by Artist", delegate { songSelect.Filter.Sort = FilterControl.SortMode.Artist; }); - AddButton(@"Sort by Title", delegate { songSelect.Filter.Sort = FilterControl.SortMode.Title; }); - AddButton(@"Sort by Author", delegate { songSelect.Filter.Sort = FilterControl.SortMode.Author; }); - AddButton(@"Sort by Difficulty", delegate { songSelect.Filter.Sort = FilterControl.SortMode.Difficulty; }); + AddButton(@"Sort by Artist", delegate { songSelect.FilterControl.Sort = SortMode.Artist; }); + AddButton(@"Sort by Title", delegate { songSelect.FilterControl.Sort = SortMode.Title; }); + AddButton(@"Sort by Author", delegate { songSelect.FilterControl.Sort = SortMode.Author; }); + AddButton(@"Sort by Difficulty", delegate { songSelect.FilterControl.Sort = SortMode.Difficulty; }); } protected override void Dispose(bool isDisposing) @@ -79,7 +80,7 @@ namespace osu.Desktop.VisualTests.Tests Mode = PlayMode.Osu, Path = "normal.osu", Version = "Normal", - BaseDifficulty = new BaseDifficulty + Difficulty = new BeatmapDifficulty { OverallDifficulty = 3.5f, } @@ -90,7 +91,7 @@ namespace osu.Desktop.VisualTests.Tests Mode = PlayMode.Osu, Path = "hard.osu", Version = "Hard", - BaseDifficulty = new BaseDifficulty + Difficulty = new BeatmapDifficulty { OverallDifficulty = 5, } @@ -101,7 +102,7 @@ namespace osu.Desktop.VisualTests.Tests Mode = PlayMode.Osu, Path = "insane.osu", Version = "Insane", - BaseDifficulty = new BaseDifficulty + Difficulty = new BeatmapDifficulty { OverallDifficulty = 7, } diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index 0d32532f09..41bd24b900 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -65,7 +65,7 @@ namespace osu.Desktop.VisualTests.Tests HitObjects = objects, BeatmapInfo = new BeatmapInfo { - BaseDifficulty = new BaseDifficulty(), + Difficulty = new BeatmapDifficulty(), Metadata = new BeatmapMetadata { Artist = @"Unknown", diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs b/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs new file mode 100644 index 0000000000..da807d5e53 --- /dev/null +++ b/osu.Desktop.VisualTests/Tests/TestCaseTabControl.cs @@ -0,0 +1,45 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Screens.Testing; +using osu.Game.Graphics.Sprites; +using osu.Game.Graphics.UserInterface; +using osu.Game.Screens.Select.Filter; + +namespace osu.Desktop.VisualTests.Tests +{ + public class TestCaseTabControl : TestCase + { + public override string Description => @"Filter for song select"; + + public override void Reset() + { + base.Reset(); + + OsuSpriteText text; + OsuTabControl filter; + Add(filter = new OsuTabControl + { + Margin = new MarginPadding(4), + Size = new Vector2(229, 24), + AutoSort = true + }); + Add(text = new OsuSpriteText + { + Text = "None", + Margin = new MarginPadding(4), + Position = new Vector2(275, 5) + }); + + filter.PinItem(GroupMode.All); + filter.PinItem(GroupMode.RecentlyPlayed); + + filter.ItemChanged += (sender, mode) => + { + text.Text = "Currently Selected: " + mode.ToString(); + }; + } + } +} diff --git a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj index 8a2ea5906b..6eb9e5e648 100644 --- a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj +++ b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj @@ -193,6 +193,7 @@ + diff --git a/osu.Game.Modes.Catch/CatchRuleset.cs b/osu.Game.Modes.Catch/CatchRuleset.cs index cb695aaabe..50224e3fdb 100644 --- a/osu.Game.Modes.Catch/CatchRuleset.cs +++ b/osu.Game.Modes.Catch/CatchRuleset.cs @@ -87,8 +87,8 @@ namespace osu.Game.Modes.Catch new KeyCounterMouse(MouseButton.Right) }; - public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null; - public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new CatchDifficultyCalculator(beatmap); + + public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(); } } diff --git a/osu.Game.Modes.Catch/CatchScoreProcessor.cs b/osu.Game.Modes.Catch/CatchScoreProcessor.cs new file mode 100644 index 0000000000..be4ae8b799 --- /dev/null +++ b/osu.Game.Modes.Catch/CatchScoreProcessor.cs @@ -0,0 +1,25 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Modes.Catch.Judgements; +using osu.Game.Modes.Catch.Objects; +using osu.Game.Modes.UI; + +namespace osu.Game.Modes.Catch +{ + internal class CatchScoreProcessor : ScoreProcessor + { + public CatchScoreProcessor() + { + } + + public CatchScoreProcessor(HitRenderer hitRenderer) + : base(hitRenderer) + { + } + + protected override void UpdateCalculations(CatchJudgementInfo newJudgement) + { + } + } +} diff --git a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs index e45ca7d293..c02b6b6c49 100644 --- a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs +++ b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs @@ -17,11 +17,13 @@ namespace osu.Game.Modes.Catch.UI { } + public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this); + protected override IBeatmapConverter CreateBeatmapConverter() => new CatchBeatmapConverter(); protected override IBeatmapProcessor CreateBeatmapProcessor() => new CatchBeatmapProcessor(); - protected override Playfield CreatePlayfield() => new CatchPlayfield(); + protected override Playfield CreatePlayfield() => new CatchPlayfield(); protected override DrawableHitObject GetVisualRepresentation(CatchBaseHit h) => null; } diff --git a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj index e6861b54ef..a32416173d 100644 --- a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj +++ b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj @@ -50,6 +50,7 @@ + diff --git a/osu.Game.Modes.Catch/packages.config b/osu.Game.Modes.Catch/packages.config index 4031dd62a8..08fca09c35 100644 --- a/osu.Game.Modes.Catch/packages.config +++ b/osu.Game.Modes.Catch/packages.config @@ -1,4 +1,5 @@  +