1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-27 10:13:20 +08:00

Merge branch 'master' into buttons-fix

This commit is contained in:
Bartłomiej Dach 2022-12-13 16:35:03 +01:00 committed by GitHub
commit dfb8f4fdd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 13 deletions

View File

@ -6,9 +6,9 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Catch.UI namespace osu.Game.Rulesets.Catch.UI
{ {
public partial class CatchRelaxCursorContainer : GameplayCursorContainer public partial class CatchCursorContainer : GameplayCursorContainer
{ {
// Just hide the cursor in relax. // Just hide the cursor.
// The main goal here is to show that we have a cursor so the game never shows the global one. // The main goal here is to show that we have a cursor so the game never shows the global one.
protected override Drawable CreateCursor() => Empty(); protected override Drawable CreateCursor() => Empty();
} }

View File

@ -3,14 +3,12 @@
#nullable disable #nullable disable
using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawables; using osu.Game.Rulesets.Catch.Objects.Drawables;
using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.UI; using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling; using osu.Game.Rulesets.UI.Scrolling;
@ -52,13 +50,7 @@ namespace osu.Game.Rulesets.Catch.UI
this.difficulty = difficulty; this.difficulty = difficulty;
} }
protected override GameplayCursorContainer CreateCursor() protected override GameplayCursorContainer CreateCursor() => new CatchCursorContainer();
{
if (Mods != null && Mods.Any(m => m is ModRelax))
return new CatchRelaxCursorContainer();
return base.CreateCursor();
}
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()

View File

@ -53,9 +53,9 @@ namespace osu.Game.Scoring.Legacy
throw new ArgumentException(@"Only scores in the osu, taiko, catch, or mania rulesets can be encoded to the legacy score format.", nameof(score)); throw new ArgumentException(@"Only scores in the osu, taiko, catch, or mania rulesets can be encoded to the legacy score format.", nameof(score));
} }
public void Encode(Stream stream) public void Encode(Stream stream, bool leaveOpen = false)
{ {
using (SerializationWriter sw = new SerializationWriter(stream)) using (SerializationWriter sw = new SerializationWriter(stream, leaveOpen))
{ {
sw.Write((byte)(score.ScoreInfo.Ruleset.OnlineID)); sw.Write((byte)(score.ScoreInfo.Ruleset.OnlineID));
sw.Write(LATEST_VERSION); sw.Write(LATEST_VERSION);