mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 03:02:54 +08:00
Merge branch 'master' into details
This commit is contained in:
commit
e59c0a770f
@ -10,7 +10,7 @@ install:
|
|||||||
- cmd: git submodule update --init --recursive
|
- cmd: git submodule update --init --recursive
|
||||||
- cmd: choco install resharper-clt -y
|
- cmd: choco install resharper-clt -y
|
||||||
- cmd: choco install nvika -y
|
- cmd: choco install nvika -y
|
||||||
- cmd: appveyor DownloadFile https://github.com/peppy/CodeFileSanity/releases/download/v0.1/CodeFileSanity.exe
|
- cmd: appveyor DownloadFile https://github.com/peppy/CodeFileSanity/releases/download/v0.2.2/CodeFileSanity.exe
|
||||||
before_build:
|
before_build:
|
||||||
- cmd: CodeFileSanity.exe
|
- cmd: CodeFileSanity.exe
|
||||||
- cmd: nuget restore
|
- cmd: nuget restore
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0d6dc294738d433999c6c68ff61169d3a8e6ce5f
|
Subproject commit 0cba3cbc167cfe94e07fe5b629c925e190be939e
|
@ -4,7 +4,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("osu.Desktop.Deploy")]
|
[assembly: AssemblyTitle("osu.Desktop.Deploy")]
|
||||||
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
|
|||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Desktop.VisualTests.Beatmaps
|
|||||||
}
|
}
|
||||||
|
|
||||||
private readonly Beatmap beatmap;
|
private readonly Beatmap beatmap;
|
||||||
|
|
||||||
protected override Beatmap GetBeatmap() => beatmap;
|
protected override Beatmap GetBeatmap() => beatmap;
|
||||||
protected override Texture GetBackground() => null;
|
protected override Texture GetBackground() => null;
|
||||||
protected override Track GetTrack() => null;
|
protected override Track GetTrack() => null;
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Desktop.VisualTests.Platform
|
|||||||
public TestStorage(string baseName) : base(baseName)
|
public TestStorage(string baseName) : base(baseName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SQLiteConnection GetDatabase(string name)
|
public override SQLiteConnection GetDatabase(string name)
|
||||||
{
|
{
|
||||||
ISQLitePlatform platform;
|
ISQLitePlatform platform;
|
||||||
|
59
osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs
Normal file
59
osu.Desktop.VisualTests/Tests/TestCaseMenuOverlays.cs
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Logging;
|
||||||
|
using osu.Framework.Testing;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
|
{
|
||||||
|
internal class TestCaseMenuOverlays : TestCase
|
||||||
|
{
|
||||||
|
public override string Description => @"Tests pause and fail overlays";
|
||||||
|
|
||||||
|
private PauseOverlay pauseOverlay;
|
||||||
|
private FailOverlay failOverlay;
|
||||||
|
private int retryCount;
|
||||||
|
|
||||||
|
public override void Reset()
|
||||||
|
{
|
||||||
|
base.Reset();
|
||||||
|
|
||||||
|
retryCount = 0;
|
||||||
|
|
||||||
|
Add(pauseOverlay = new PauseOverlay
|
||||||
|
{
|
||||||
|
OnResume = () => Logger.Log(@"Resume"),
|
||||||
|
OnRetry = () => Logger.Log(@"Retry"),
|
||||||
|
OnQuit = () => Logger.Log(@"Quit"),
|
||||||
|
});
|
||||||
|
Add(failOverlay = new FailOverlay
|
||||||
|
{
|
||||||
|
OnRetry = () => Logger.Log(@"Retry"),
|
||||||
|
OnQuit = () => Logger.Log(@"Quit"),
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep(@"Pause", delegate {
|
||||||
|
if(failOverlay.State == Visibility.Visible)
|
||||||
|
{
|
||||||
|
failOverlay.Hide();
|
||||||
|
}
|
||||||
|
pauseOverlay.Show();
|
||||||
|
});
|
||||||
|
AddStep("Fail", delegate {
|
||||||
|
if (pauseOverlay.State == Visibility.Visible)
|
||||||
|
{
|
||||||
|
pauseOverlay.Hide();
|
||||||
|
}
|
||||||
|
failOverlay.Show();
|
||||||
|
});
|
||||||
|
AddStep("Add Retry", delegate
|
||||||
|
{
|
||||||
|
retryCount++;
|
||||||
|
pauseOverlay.Retries = retryCount;
|
||||||
|
failOverlay.Retries = retryCount;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,38 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Framework.Logging;
|
|
||||||
using osu.Framework.Testing;
|
|
||||||
using osu.Game.Screens.Play;
|
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
|
||||||
{
|
|
||||||
internal class TestCasePauseOverlay : TestCase
|
|
||||||
{
|
|
||||||
public override string Description => @"Tests the pause overlay";
|
|
||||||
|
|
||||||
private PauseOverlay pauseOverlay;
|
|
||||||
private int retryCount;
|
|
||||||
|
|
||||||
public override void Reset()
|
|
||||||
{
|
|
||||||
base.Reset();
|
|
||||||
|
|
||||||
Add(pauseOverlay = new PauseOverlay
|
|
||||||
{
|
|
||||||
Depth = -1,
|
|
||||||
OnResume = () => Logger.Log(@"Resume"),
|
|
||||||
OnRetry = () => Logger.Log(@"Retry"),
|
|
||||||
OnQuit = () => Logger.Log(@"Quit")
|
|
||||||
});
|
|
||||||
AddStep("Pause", pauseOverlay.Show);
|
|
||||||
AddStep("Add Retry", delegate
|
|
||||||
{
|
|
||||||
retryCount++;
|
|
||||||
pauseOverlay.Retries = retryCount;
|
|
||||||
});
|
|
||||||
|
|
||||||
retryCount = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -106,7 +106,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
ScrollTime = scroll_time
|
ScrollTime = scroll_time
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addDrumRoll(bool strong, double duration = default_duration)
|
private void addDrumRoll(bool strong, double duration = default_duration)
|
||||||
{
|
{
|
||||||
addBarLine(true);
|
addBarLine(true);
|
||||||
|
@ -191,6 +191,7 @@
|
|||||||
<Compile Include="Tests\TestCaseDrawings.cs" />
|
<Compile Include="Tests\TestCaseDrawings.cs" />
|
||||||
<Compile Include="Tests\TestCaseGamefield.cs" />
|
<Compile Include="Tests\TestCaseGamefield.cs" />
|
||||||
<Compile Include="Tests\TestCaseGraphAndBar.cs" />
|
<Compile Include="Tests\TestCaseGraphAndBar.cs" />
|
||||||
|
<Compile Include="Tests\TestCaseMenuOverlays.cs" />
|
||||||
<Compile Include="Tests\TestCaseMusicController.cs" />
|
<Compile Include="Tests\TestCaseMusicController.cs" />
|
||||||
<Compile Include="Tests\TestCaseNotificationManager.cs" />
|
<Compile Include="Tests\TestCaseNotificationManager.cs" />
|
||||||
<Compile Include="Tests\TestCasePlayer.cs" />
|
<Compile Include="Tests\TestCasePlayer.cs" />
|
||||||
@ -208,7 +209,6 @@
|
|||||||
<Compile Include="VisualTestGame.cs" />
|
<Compile Include="VisualTestGame.cs" />
|
||||||
<Compile Include="Platform\TestStorage.cs" />
|
<Compile Include="Platform\TestStorage.cs" />
|
||||||
<Compile Include="Tests\TestCaseOptions.cs" />
|
<Compile Include="Tests\TestCaseOptions.cs" />
|
||||||
<Compile Include="Tests\TestCasePauseOverlay.cs" />
|
|
||||||
<Compile Include="Tests\TestCaseModSelectOverlay.cs" />
|
<Compile Include="Tests\TestCaseModSelectOverlay.cs" />
|
||||||
<Compile Include="Tests\TestCaseDialogOverlay.cs" />
|
<Compile Include="Tests\TestCaseDialogOverlay.cs" />
|
||||||
<Compile Include="Tests\TestCaseBeatmapOptionsOverlay.cs" />
|
<Compile Include="Tests\TestCaseBeatmapOptionsOverlay.cs" />
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("osu!lazer")]
|
[assembly: AssemblyTitle("osu!lazer")]
|
||||||
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("osu.Game.Modes.Catch")]
|
[assembly: AssemblyTitle("osu.Game.Modes.Catch")]
|
||||||
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
|
|||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("osu.Game.Modes.Mania")]
|
[assembly: AssemblyTitle("osu.Game.Modes.Mania")]
|
||||||
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
|
|||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
@ -43,7 +43,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
|||||||
return new Slider
|
return new Slider
|
||||||
{
|
{
|
||||||
StartTime = original.StartTime,
|
StartTime = original.StartTime,
|
||||||
Sample = original.Sample,
|
Samples = original.Samples,
|
||||||
CurveObject = curveData,
|
CurveObject = curveData,
|
||||||
Position = positionData?.Position ?? Vector2.Zero,
|
Position = positionData?.Position ?? Vector2.Zero,
|
||||||
NewCombo = comboData?.NewCombo ?? false
|
NewCombo = comboData?.NewCombo ?? false
|
||||||
@ -55,7 +55,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
|||||||
return new Spinner
|
return new Spinner
|
||||||
{
|
{
|
||||||
StartTime = original.StartTime,
|
StartTime = original.StartTime,
|
||||||
Sample = original.Sample,
|
Samples = original.Samples,
|
||||||
Position = new Vector2(512, 384) / 2,
|
Position = new Vector2(512, 384) / 2,
|
||||||
EndTime = endTimeData.EndTime
|
EndTime = endTimeData.EndTime
|
||||||
};
|
};
|
||||||
@ -64,7 +64,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
|||||||
return new HitCircle
|
return new HitCircle
|
||||||
{
|
{
|
||||||
StartTime = original.StartTime,
|
StartTime = original.StartTime,
|
||||||
Sample = original.Sample,
|
Samples = original.Samples,
|
||||||
Position = positionData?.Position ?? Vector2.Zero,
|
Position = positionData?.Position ?? Vector2.Zero,
|
||||||
NewCombo = comboData?.NewCombo ?? false
|
NewCombo = comboData?.NewCombo ?? false
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Connections
|
|||||||
Colour = Color4.White.Opacity(0.2f),
|
Colour = Color4.White.Opacity(0.2f),
|
||||||
Radius = 4,
|
Radius = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
ComboIndex = s.ComboIndex,
|
ComboIndex = s.ComboIndex,
|
||||||
Scale = s.Scale,
|
Scale = s.Scale,
|
||||||
ComboColour = s.ComboColour,
|
ComboColour = s.ComboColour,
|
||||||
Sample = s.Sample,
|
Samples = s.Samples,
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
if (repeat > currentRepeat)
|
if (repeat > currentRepeat)
|
||||||
{
|
{
|
||||||
if (repeat < slider.RepeatCount && ball.Tracking)
|
if (repeat < slider.RepeatCount && ball.Tracking)
|
||||||
PlaySample();
|
PlaySamples();
|
||||||
currentRepeat = repeat;
|
currentRepeat = repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,12 +2,8 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Audio;
|
|
||||||
using osu.Framework.Audio.Sample;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
using osu.Game.Modes.Objects.Drawables;
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
using osu.Game.Modes.Osu.Judgements;
|
using osu.Game.Modes.Osu.Judgements;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
@ -53,22 +49,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private SampleChannel sample;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(AudioManager audio)
|
|
||||||
{
|
|
||||||
string sampleSet = (HitObject.Sample?.Set ?? SampleSet.Normal).ToString().ToLower();
|
|
||||||
|
|
||||||
sample = audio.Sample.Get($@"Gameplay/{sampleSet}-slidertick");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void PlaySample()
|
|
||||||
{
|
|
||||||
sample?.Play();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected override void CheckJudgement(bool userTriggered)
|
protected override void CheckJudgement(bool userTriggered)
|
||||||
{
|
{
|
||||||
if (Judgement.TimeOffset >= 0)
|
if (Judgement.TimeOffset >= 0)
|
||||||
@ -77,7 +57,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
Judgement.Score = Tracking ? OsuScoreResult.SliderTick : OsuScoreResult.Miss;
|
Judgement.Score = Tracking ? OsuScoreResult.SliderTick : OsuScoreResult.Miss;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdatePreemptState()
|
protected override void UpdatePreemptState()
|
||||||
{
|
{
|
||||||
var animIn = Math.Min(150, sliderTick.StartTime - FadeInTime);
|
var animIn = Math.Min(150, sliderTick.StartTime - FadeInTime);
|
||||||
|
@ -2,13 +2,14 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
using osu.Game.Modes.Objects.Types;
|
using osu.Game.Modes.Objects.Types;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
|
using System.Linq;
|
||||||
|
using osu.Game.Audio;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Osu.Objects
|
namespace osu.Game.Modes.Osu.Objects
|
||||||
{
|
{
|
||||||
@ -95,11 +96,12 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
StackHeight = StackHeight,
|
StackHeight = StackHeight,
|
||||||
Scale = Scale,
|
Scale = Scale,
|
||||||
ComboColour = ComboColour,
|
ComboColour = ComboColour,
|
||||||
Sample = new HitSampleInfo
|
Samples = Samples.Select(s => new SampleInfo
|
||||||
{
|
{
|
||||||
Type = SampleType.None,
|
Bank = s.Bank,
|
||||||
Set = SampleSet.Soft,
|
Name = @"slidertick",
|
||||||
},
|
Volume = s.Volume
|
||||||
|
}).ToList()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("osu.Game.Mode.Osu")]
|
[assembly: AssemblyTitle("osu.Game.Mode.Osu")]
|
||||||
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
|
|||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
@ -2,16 +2,15 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
using osu.Game.Modes.Objects.Types;
|
using osu.Game.Modes.Objects.Types;
|
||||||
using osu.Game.Modes.Taiko.Objects;
|
using osu.Game.Modes.Taiko.Objects;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps.Legacy;
|
|
||||||
using osu.Game.Beatmaps.Timing;
|
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
|
using osu.Game.IO.Serialization;
|
||||||
|
using osu.Game.Audio;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko.Beatmaps
|
namespace osu.Game.Modes.Taiko.Beatmaps
|
||||||
{
|
{
|
||||||
@ -41,9 +40,12 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
|
|
||||||
public Beatmap<TaikoHitObject> Convert(Beatmap original)
|
public Beatmap<TaikoHitObject> Convert(Beatmap original)
|
||||||
{
|
{
|
||||||
|
BeatmapInfo info = original.BeatmapInfo.DeepClone<BeatmapInfo>();
|
||||||
|
info.Difficulty.SliderMultiplier *= legacy_velocity_multiplier;
|
||||||
|
|
||||||
return new Beatmap<TaikoHitObject>(original)
|
return new Beatmap<TaikoHitObject>(original)
|
||||||
{
|
{
|
||||||
TimingInfo = original is LegacyBeatmap ? new LegacyTimingInfo(original.TimingInfo) : original.TimingInfo,
|
BeatmapInfo = info,
|
||||||
HitObjects = original.HitObjects.SelectMany(h => convertHitObject(h, original)).ToList()
|
HitObjects = original.HitObjects.SelectMany(h => convertHitObject(h, original)).ToList()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -60,9 +62,9 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
var endTimeData = obj as IHasEndTime;
|
var endTimeData = obj as IHasEndTime;
|
||||||
|
|
||||||
// Old osu! used hit sounding to determine various hit type information
|
// Old osu! used hit sounding to determine various hit type information
|
||||||
SampleType sample = obj.Sample?.Type ?? SampleType.None;
|
List<SampleInfo> samples = obj.Samples;
|
||||||
|
|
||||||
bool strong = (sample & SampleType.Finish) > 0;
|
bool strong = samples.Any(s => s.Name == SampleInfo.HIT_FINISH);
|
||||||
|
|
||||||
if (distanceData != null)
|
if (distanceData != null)
|
||||||
{
|
{
|
||||||
@ -70,12 +72,12 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
|
|
||||||
double speedAdjustment = beatmap.TimingInfo.SpeedMultiplierAt(obj.StartTime);
|
double speedAdjustment = beatmap.TimingInfo.SpeedMultiplierAt(obj.StartTime);
|
||||||
double speedAdjustedBeatLength = beatmap.TimingInfo.BeatLengthAt(obj.StartTime) * speedAdjustment;
|
double speedAdjustedBeatLength = beatmap.TimingInfo.BeatLengthAt(obj.StartTime) * speedAdjustment;
|
||||||
|
|
||||||
// The true distance, accounting for any repeats. This ends up being the drum roll distance later
|
// The true distance, accounting for any repeats. This ends up being the drum roll distance later
|
||||||
double distance = distanceData.Distance * repeats * legacy_velocity_multiplier;
|
double distance = distanceData.Distance * repeats * legacy_velocity_multiplier;
|
||||||
|
|
||||||
// The velocity of the taiko hit object - calculated as the velocity of a drum roll
|
// The velocity of the taiko hit object - calculated as the velocity of a drum roll
|
||||||
double taikoVelocity = taiko_base_distance * beatmap.BeatmapInfo.Difficulty.SliderMultiplier / speedAdjustedBeatLength * legacy_velocity_multiplier;
|
double taikoVelocity = taiko_base_distance * beatmap.BeatmapInfo.Difficulty.SliderMultiplier * legacy_velocity_multiplier / speedAdjustedBeatLength;
|
||||||
// The duration of the taiko hit object
|
// The duration of the taiko hit object
|
||||||
double taikoDuration = distance / taikoVelocity;
|
double taikoDuration = distance / taikoVelocity;
|
||||||
|
|
||||||
@ -85,7 +87,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
speedAdjustedBeatLength /= speedAdjustment;
|
speedAdjustedBeatLength /= speedAdjustment;
|
||||||
|
|
||||||
// The velocity of the osu! hit object - calculated as the velocity of a slider
|
// The velocity of the osu! hit object - calculated as the velocity of a slider
|
||||||
double osuVelocity = osu_base_scoring_distance * beatmap.BeatmapInfo.Difficulty.SliderMultiplier / speedAdjustedBeatLength * legacy_velocity_multiplier;
|
double osuVelocity = osu_base_scoring_distance * beatmap.BeatmapInfo.Difficulty.SliderMultiplier * legacy_velocity_multiplier / speedAdjustedBeatLength;
|
||||||
// The duration of the osu! hit object
|
// The duration of the osu! hit object
|
||||||
double osuDuration = distance / osuVelocity;
|
double osuDuration = distance / osuVelocity;
|
||||||
|
|
||||||
@ -101,7 +103,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
yield return new CentreHit
|
yield return new CentreHit
|
||||||
{
|
{
|
||||||
StartTime = j,
|
StartTime = j,
|
||||||
Sample = obj.Sample,
|
Samples = obj.Samples,
|
||||||
IsStrong = strong,
|
IsStrong = strong,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -111,7 +113,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
yield return new DrumRoll
|
yield return new DrumRoll
|
||||||
{
|
{
|
||||||
StartTime = obj.StartTime,
|
StartTime = obj.StartTime,
|
||||||
Sample = obj.Sample,
|
Samples = obj.Samples,
|
||||||
IsStrong = strong,
|
IsStrong = strong,
|
||||||
Duration = taikoDuration,
|
Duration = taikoDuration,
|
||||||
TickRate = beatmap.BeatmapInfo.Difficulty.SliderTickRate == 3 ? 3 : 4,
|
TickRate = beatmap.BeatmapInfo.Difficulty.SliderTickRate == 3 ? 3 : 4,
|
||||||
@ -125,7 +127,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
yield return new Swell
|
yield return new Swell
|
||||||
{
|
{
|
||||||
StartTime = obj.StartTime,
|
StartTime = obj.StartTime,
|
||||||
Sample = obj.Sample,
|
Samples = obj.Samples,
|
||||||
IsStrong = strong,
|
IsStrong = strong,
|
||||||
Duration = endTimeData.Duration,
|
Duration = endTimeData.Duration,
|
||||||
RequiredHits = (int)Math.Max(1, endTimeData.Duration / 1000 * hitMultiplier),
|
RequiredHits = (int)Math.Max(1, endTimeData.Duration / 1000 * hitMultiplier),
|
||||||
@ -133,41 +135,25 @@ namespace osu.Game.Modes.Taiko.Beatmaps
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool isCentre = (sample & ~(SampleType.Finish | SampleType.Normal)) == 0;
|
bool isRim = samples.Any(s => s.Name == SampleInfo.HIT_CLAP || s.Name == SampleInfo.HIT_WHISTLE);
|
||||||
|
|
||||||
if (isCentre)
|
if (isRim)
|
||||||
{
|
|
||||||
yield return new CentreHit
|
|
||||||
{
|
|
||||||
StartTime = obj.StartTime,
|
|
||||||
Sample = obj.Sample,
|
|
||||||
IsStrong = strong,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
yield return new RimHit
|
yield return new RimHit
|
||||||
{
|
{
|
||||||
StartTime = obj.StartTime,
|
StartTime = obj.StartTime,
|
||||||
Sample = obj.Sample,
|
Samples = obj.Samples,
|
||||||
IsStrong = strong,
|
IsStrong = strong,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class LegacyTimingInfo : TimingInfo
|
|
||||||
{
|
|
||||||
public LegacyTimingInfo(TimingInfo original)
|
|
||||||
{
|
|
||||||
if (original is LegacyTimingInfo)
|
|
||||||
ControlPoints.AddRange(original.ControlPoints);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ControlPoints.AddRange(original.ControlPoints.Select(c => c.Clone()));
|
yield return new CentreHit
|
||||||
|
{
|
||||||
foreach (var c in ControlPoints)
|
StartTime = obj.StartTime,
|
||||||
c.SpeedMultiplier *= legacy_velocity_multiplier;
|
Samples = obj.Samples,
|
||||||
|
IsStrong = strong,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@ namespace osu.Game.Modes.Taiko.Judgements
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override string MaxResultString => string.Empty;
|
public override string MaxResultString => string.Empty;
|
||||||
|
|
||||||
|
public override bool AffectsCombo => false;
|
||||||
|
|
||||||
protected override int NumericResultForScore(TaikoHitResult result)
|
protected override int NumericResultForScore(TaikoHitResult result)
|
||||||
{
|
{
|
||||||
switch (result)
|
switch (result)
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Game.Modes.Judgements;
|
using osu.Game.Modes.Judgements;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko.Judgements
|
namespace osu.Game.Modes.Taiko.Judgements
|
||||||
{
|
{
|
||||||
@ -21,12 +22,12 @@ namespace osu.Game.Modes.Taiko.Judgements
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The result value for the combo portion of the score.
|
/// The result value for the combo portion of the score.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ResultValueForScore => NumericResultForScore(TaikoResult);
|
public int ResultValueForScore => Result == HitResult.Miss ? 0 : NumericResultForScore(TaikoResult);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The result value for the accuracy portion of the score.
|
/// The result value for the accuracy portion of the score.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ResultValueForAccuracy => NumericResultForAccuracy(TaikoResult);
|
public int ResultValueForAccuracy => Result == HitResult.Miss ? 0 : NumericResultForAccuracy(TaikoResult);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum result value for the combo portion of the score.
|
/// The maximum result value for the combo portion of the score.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
using osu.Game.Modes.Objects.Types;
|
using osu.Game.Modes.Objects.Types;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
|
using osu.Game.Audio;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko.Objects
|
namespace osu.Game.Modes.Taiko.Objects
|
||||||
{
|
{
|
||||||
@ -82,11 +82,12 @@ namespace osu.Game.Modes.Taiko.Objects
|
|||||||
TickSpacing = tickSpacing,
|
TickSpacing = tickSpacing,
|
||||||
StartTime = t,
|
StartTime = t,
|
||||||
IsStrong = IsStrong,
|
IsStrong = IsStrong,
|
||||||
Sample = new HitSampleInfo
|
Samples = Samples.Select(s => new SampleInfo
|
||||||
{
|
{
|
||||||
Type = SampleType.None,
|
Bank = s.Bank,
|
||||||
Set = SampleSet.Soft
|
Name = @"slidertick",
|
||||||
}
|
Volume = s.Volume
|
||||||
|
}).ToList()
|
||||||
});
|
});
|
||||||
|
|
||||||
first = false;
|
first = false;
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Modes.Taiko.Objects
|
|||||||
{
|
{
|
||||||
base.ApplyDefaults(timing, difficulty);
|
base.ApplyDefaults(timing, difficulty);
|
||||||
|
|
||||||
ScrollTime = scroll_time * (timing.BeatLengthAt(StartTime) / 1000) / (difficulty.SliderMultiplier * timing.SpeedMultiplierAt(StartTime));
|
ScrollTime = scroll_time * (timing.BeatLengthAt(StartTime) * timing.SpeedMultiplierAt(StartTime) / 1000) / difficulty.SliderMultiplier;
|
||||||
|
|
||||||
ControlPoint overridePoint;
|
ControlPoint overridePoint;
|
||||||
Kiai = timing.TimingPointAt(StartTime, out overridePoint).KiaiMode;
|
Kiai = timing.TimingPointAt(StartTime, out overridePoint).KiaiMode;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("osu.Game.Modes.Taiko")]
|
[assembly: AssemblyTitle("osu.Game.Modes.Taiko")]
|
||||||
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
|
|||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
@ -187,10 +187,6 @@ namespace osu.Game.Modes.Taiko.Scoring
|
|||||||
if (!isTick)
|
if (!isTick)
|
||||||
totalHits++;
|
totalHits++;
|
||||||
|
|
||||||
// Apply combo changes, must be done before the hit score is added
|
|
||||||
if (!isTick && judgement.Result == HitResult.Hit)
|
|
||||||
Combo.Value++;
|
|
||||||
|
|
||||||
// Apply score changes
|
// Apply score changes
|
||||||
addHitScore(judgement);
|
addHitScore(judgement);
|
||||||
|
|
||||||
@ -261,7 +257,7 @@ namespace osu.Game.Modes.Taiko.Scoring
|
|||||||
foreach (var j in Judgements)
|
foreach (var j in Judgements)
|
||||||
{
|
{
|
||||||
scoreForAccuracy += j.ResultValueForAccuracy;
|
scoreForAccuracy += j.ResultValueForAccuracy;
|
||||||
maxScoreForAccuracy = j.MaxResultValueForAccuracy;
|
maxScoreForAccuracy += j.MaxResultValueForAccuracy;
|
||||||
}
|
}
|
||||||
|
|
||||||
Accuracy.Value = (double)scoreForAccuracy / maxScoreForAccuracy;
|
Accuracy.Value = (double)scoreForAccuracy / maxScoreForAccuracy;
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
/// Diameter of normal hit object circles.
|
/// Diameter of normal hit object circles.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2;
|
private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Diameter of strong hit object circles.
|
/// Diameter of strong hit object circles.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
/// The key to be used for the rim of the half-drum.
|
/// The key to be used for the rim of the half-drum.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Key RimKey;
|
public Key RimKey;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The key to be used for the centre of the half-drum.
|
/// The key to be used for the centre of the half-drum.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -6,11 +6,12 @@ using NUnit.Framework;
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
using osu.Game.Tests.Resources;
|
using osu.Game.Tests.Resources;
|
||||||
using osu.Game.Modes.Osu;
|
using osu.Game.Modes.Osu;
|
||||||
using osu.Game.Modes.Objects.Legacy;
|
using osu.Game.Modes.Objects.Legacy;
|
||||||
|
using System.Linq;
|
||||||
|
using osu.Game.Audio;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Beatmaps.Formats
|
namespace osu.Game.Tests.Beatmaps.Formats
|
||||||
{
|
{
|
||||||
@ -55,7 +56,6 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
var beatmapInfo = decoder.Decode(new StreamReader(stream)).BeatmapInfo;
|
var beatmapInfo = decoder.Decode(new StreamReader(stream)).BeatmapInfo;
|
||||||
Assert.AreEqual(0, beatmapInfo.AudioLeadIn);
|
Assert.AreEqual(0, beatmapInfo.AudioLeadIn);
|
||||||
Assert.AreEqual(false, beatmapInfo.Countdown);
|
Assert.AreEqual(false, beatmapInfo.Countdown);
|
||||||
Assert.AreEqual(SampleSet.Soft, beatmapInfo.SampleSet);
|
|
||||||
Assert.AreEqual(0.7f, beatmapInfo.StackLeniency);
|
Assert.AreEqual(0.7f, beatmapInfo.StackLeniency);
|
||||||
Assert.AreEqual(false, beatmapInfo.SpecialStyle);
|
Assert.AreEqual(false, beatmapInfo.SpecialStyle);
|
||||||
Assert.AreEqual(PlayMode.Osu, beatmapInfo.Mode);
|
Assert.AreEqual(PlayMode.Osu, beatmapInfo.Mode);
|
||||||
@ -137,12 +137,12 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
Assert.IsNotNull(slider);
|
Assert.IsNotNull(slider);
|
||||||
Assert.AreEqual(new Vector2(192, 168), slider.Position);
|
Assert.AreEqual(new Vector2(192, 168), slider.Position);
|
||||||
Assert.AreEqual(956, slider.StartTime);
|
Assert.AreEqual(956, slider.StartTime);
|
||||||
Assert.AreEqual(SampleType.None, slider.Sample.Type);
|
Assert.IsTrue(slider.Samples.Any(s => s.Name == SampleInfo.HIT_NORMAL));
|
||||||
var hit = beatmap.HitObjects[1] as LegacyHit;
|
var hit = beatmap.HitObjects[1] as LegacyHit;
|
||||||
Assert.IsNotNull(hit);
|
Assert.IsNotNull(hit);
|
||||||
Assert.AreEqual(new Vector2(304, 56), hit.Position);
|
Assert.AreEqual(new Vector2(304, 56), hit.Position);
|
||||||
Assert.AreEqual(1285, hit.StartTime);
|
Assert.AreEqual(1285, hit.StartTime);
|
||||||
Assert.AreEqual(SampleType.Clap, hit.Sample.Type);
|
Assert.IsTrue(hit.Samples.Any(s => s.Name == SampleInfo.HIT_CLAP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ namespace osu.Game.Tests.Beatmaps.IO
|
|||||||
ensureLoaded(osu);
|
ensureLoaded(osu);
|
||||||
|
|
||||||
Assert.IsTrue(File.Exists(temp));
|
Assert.IsTrue(File.Exists(temp));
|
||||||
|
|
||||||
File.Delete(temp);
|
File.Delete(temp);
|
||||||
|
|
||||||
Assert.IsFalse(File.Exists(temp));
|
Assert.IsFalse(File.Exists(temp));
|
||||||
|
28
osu.Game/Audio/SampleInfo.cs
Normal file
28
osu.Game/Audio/SampleInfo.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
namespace osu.Game.Audio
|
||||||
|
{
|
||||||
|
public class SampleInfo
|
||||||
|
{
|
||||||
|
public const string HIT_WHISTLE = @"hitwhistle";
|
||||||
|
public const string HIT_FINISH = @"hitfinish";
|
||||||
|
public const string HIT_NORMAL = @"hitnormal";
|
||||||
|
public const string HIT_CLAP = @"hitclap";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The bank to load the sample from.
|
||||||
|
/// </summary>
|
||||||
|
public string Bank;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the sample to load.
|
||||||
|
/// </summary>
|
||||||
|
public string Name;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The sample volume.
|
||||||
|
/// </summary>
|
||||||
|
public int Volume;
|
||||||
|
}
|
||||||
|
}
|
@ -69,7 +69,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
GainedSelection = headerGainedSelection,
|
GainedSelection = headerGainedSelection,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
};
|
};
|
||||||
|
|
||||||
BeatmapSet.Beatmaps = BeatmapSet.Beatmaps.OrderBy(b => b.StarDifficulty).ToList();
|
BeatmapSet.Beatmaps = BeatmapSet.Beatmaps.OrderBy(b => b.StarDifficulty).ToList();
|
||||||
BeatmapPanels = BeatmapSet.Beatmaps.Select(b => new BeatmapPanel(b)
|
BeatmapPanels = BeatmapSet.Beatmaps.Select(b => new BeatmapPanel(b)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Game.Beatmaps.Events;
|
using osu.Game.Beatmaps.Events;
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
@ -31,6 +30,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
// TODO: Not sure how far back to go, or differences between versions
|
// TODO: Not sure how far back to go, or differences between versions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private LegacySampleBank defaultSampleBank;
|
||||||
|
private int defaultSampleVolume = 100;
|
||||||
|
|
||||||
private readonly int beatmapVersion;
|
private readonly int beatmapVersion;
|
||||||
|
|
||||||
public OsuLegacyDecoder()
|
public OsuLegacyDecoder()
|
||||||
@ -73,7 +75,10 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
beatmap.BeatmapInfo.Countdown = int.Parse(val) == 1;
|
beatmap.BeatmapInfo.Countdown = int.Parse(val) == 1;
|
||||||
break;
|
break;
|
||||||
case @"SampleSet":
|
case @"SampleSet":
|
||||||
beatmap.BeatmapInfo.SampleSet = (SampleSet)Enum.Parse(typeof(SampleSet), val);
|
defaultSampleBank = (LegacySampleBank)Enum.Parse(typeof(LegacySampleBank), val);
|
||||||
|
break;
|
||||||
|
case @"SampleVolume":
|
||||||
|
defaultSampleVolume = int.Parse(val);
|
||||||
break;
|
break;
|
||||||
case @"StackLeniency":
|
case @"StackLeniency":
|
||||||
beatmap.BeatmapInfo.StackLeniency = float.Parse(val, NumberFormatInfo.InvariantInfo);
|
beatmap.BeatmapInfo.StackLeniency = float.Parse(val, NumberFormatInfo.InvariantInfo);
|
||||||
@ -203,28 +208,56 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
private void handleTimingPoints(Beatmap beatmap, string val)
|
private void handleTimingPoints(Beatmap beatmap, string val)
|
||||||
{
|
{
|
||||||
ControlPoint cp = null;
|
|
||||||
|
|
||||||
string[] split = val.Split(',');
|
string[] split = val.Split(',');
|
||||||
|
|
||||||
if (split.Length > 2)
|
double time = double.Parse(split[0].Trim(), NumberFormatInfo.InvariantInfo);
|
||||||
|
double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo);
|
||||||
|
|
||||||
|
TimeSignatures timeSignature = TimeSignatures.SimpleQuadruple;
|
||||||
|
if (split.Length >= 3)
|
||||||
|
timeSignature = split[2][0] == '0' ? TimeSignatures.SimpleQuadruple : (TimeSignatures)int.Parse(split[2]);
|
||||||
|
|
||||||
|
LegacySampleBank sampleSet = defaultSampleBank;
|
||||||
|
if (split.Length >= 4)
|
||||||
|
sampleSet = (LegacySampleBank)int.Parse(split[3]);
|
||||||
|
|
||||||
|
//SampleBank sampleBank = SampleBank.Default;
|
||||||
|
//if (split.Length >= 5)
|
||||||
|
// sampleBank = (SampleBank)int.Parse(split[4]);
|
||||||
|
|
||||||
|
int sampleVolume = defaultSampleVolume;
|
||||||
|
if (split.Length >= 6)
|
||||||
|
sampleVolume = int.Parse(split[5]);
|
||||||
|
|
||||||
|
bool timingChange = true;
|
||||||
|
if (split.Length >= 7)
|
||||||
|
timingChange = split[6][0] == '1';
|
||||||
|
|
||||||
|
bool kiaiMode = false;
|
||||||
|
bool omitFirstBarSignature = false;
|
||||||
|
if (split.Length >= 8)
|
||||||
{
|
{
|
||||||
int effectFlags = split.Length > 7 ? Convert.ToInt32(split[7], NumberFormatInfo.InvariantInfo) : 0;
|
int effectFlags = int.Parse(split[7]);
|
||||||
double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo);
|
kiaiMode = (effectFlags & 1) > 0;
|
||||||
cp = new ControlPoint
|
omitFirstBarSignature = (effectFlags & 8) > 0;
|
||||||
{
|
|
||||||
Time = double.Parse(split[0].Trim(), NumberFormatInfo.InvariantInfo),
|
|
||||||
BeatLength = beatLength > 0 ? beatLength : 0,
|
|
||||||
SpeedMultiplier = beatLength < 0 ? -beatLength / 100.0 : 1,
|
|
||||||
TimingChange = split.Length <= 6 || split[6][0] == '1',
|
|
||||||
KiaiMode = (effectFlags & 1) > 0,
|
|
||||||
OmitFirstBarLine = (effectFlags & 8) > 0,
|
|
||||||
TimeSignature = (TimeSignatures)int.Parse(split[2])
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cp != null)
|
string stringSampleSet = sampleSet.ToString().ToLower();
|
||||||
beatmap.TimingInfo.ControlPoints.Add(cp);
|
if (stringSampleSet == @"none")
|
||||||
|
stringSampleSet = @"normal";
|
||||||
|
|
||||||
|
beatmap.TimingInfo.ControlPoints.Add(new ControlPoint
|
||||||
|
{
|
||||||
|
Time = time,
|
||||||
|
BeatLength = beatLength,
|
||||||
|
SpeedMultiplier = beatLength < 0 ? -beatLength / 100.0 : 1,
|
||||||
|
TimingChange = timingChange,
|
||||||
|
TimeSignature = timeSignature,
|
||||||
|
SampleBank = stringSampleSet,
|
||||||
|
SampleVolume = sampleVolume,
|
||||||
|
KiaiMode = kiaiMode,
|
||||||
|
OmitFirstBarLine = omitFirstBarSignature
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleColours(Beatmap beatmap, string key, string val, ref bool hasCustomColours)
|
private void handleColours(Beatmap beatmap, string key, string val, ref bool hasCustomColours)
|
||||||
@ -271,7 +304,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
{
|
{
|
||||||
beatmap.BeatmapInfo.BeatmapVersion = beatmapVersion;
|
beatmap.BeatmapInfo.BeatmapVersion = beatmapVersion;
|
||||||
|
|
||||||
HitObjectParser parser = null;
|
HitObjectParser parser = new LegacyHitObjectParser();
|
||||||
|
|
||||||
Section section = Section.None;
|
Section section = Section.None;
|
||||||
bool hasCustomColours = false;
|
bool hasCustomColours = false;
|
||||||
@ -305,7 +338,6 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
{
|
{
|
||||||
case Section.General:
|
case Section.General:
|
||||||
handleGeneral(beatmap, key, val);
|
handleGeneral(beatmap, key, val);
|
||||||
parser = new LegacyHitObjectParser();
|
|
||||||
break;
|
break;
|
||||||
case Section.Editor:
|
case Section.Editor:
|
||||||
handleEditor(beatmap, key, val);
|
handleEditor(beatmap, key, val);
|
||||||
@ -326,7 +358,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
handleColours(beatmap, key, val, ref hasCustomColours);
|
handleColours(beatmap, key, val, ref hasCustomColours);
|
||||||
break;
|
break;
|
||||||
case Section.HitObjects:
|
case Section.HitObjects:
|
||||||
var obj = parser?.Parse(val);
|
var obj = parser.Parse(val);
|
||||||
|
|
||||||
if (obj != null)
|
if (obj != null)
|
||||||
beatmap.HitObjects.Add(obj);
|
beatmap.HitObjects.Add(obj);
|
||||||
@ -335,5 +367,13 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal enum LegacySampleBank
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Normal = 1,
|
||||||
|
Soft = 2,
|
||||||
|
Drum = 3
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Samples
|
|
||||||
{
|
|
||||||
public class HitSampleInfo : SampleInfo
|
|
||||||
{
|
|
||||||
public SampleType Type { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Samples
|
|
||||||
{
|
|
||||||
public enum SampleBank
|
|
||||||
{
|
|
||||||
Default = 0,
|
|
||||||
Custom1 = 1,
|
|
||||||
Custom2 = 2
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Samples
|
|
||||||
{
|
|
||||||
public class SampleInfo
|
|
||||||
{
|
|
||||||
public SampleBank Bank;
|
|
||||||
public SampleSet Set;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Samples
|
|
||||||
{
|
|
||||||
public enum SampleSet
|
|
||||||
{
|
|
||||||
None = 0,
|
|
||||||
Normal = 1,
|
|
||||||
Soft = 2,
|
|
||||||
Drum = 3
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Samples
|
|
||||||
{
|
|
||||||
[Flags]
|
|
||||||
public enum SampleType
|
|
||||||
{
|
|
||||||
None = 0,
|
|
||||||
Normal = 1,
|
|
||||||
Whistle = 2,
|
|
||||||
Finish = 4,
|
|
||||||
Clap = 8
|
|
||||||
};
|
|
||||||
}
|
|
@ -5,6 +5,8 @@ namespace osu.Game.Beatmaps.Timing
|
|||||||
{
|
{
|
||||||
public class ControlPoint
|
public class ControlPoint
|
||||||
{
|
{
|
||||||
|
public string SampleBank;
|
||||||
|
public int SampleVolume;
|
||||||
public TimeSignatures TimeSignature;
|
public TimeSignatures TimeSignature;
|
||||||
public double Time;
|
public double Time;
|
||||||
public double BeatLength = 500;
|
public double BeatLength = 500;
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Timing
|
|
||||||
{
|
|
||||||
public class SampleChange : ControlPoint
|
|
||||||
{
|
|
||||||
public SampleInfo Sample;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Timing
|
|
||||||
{
|
|
||||||
internal class TimingChange : ControlPoint
|
|
||||||
{
|
|
||||||
public TimingChange(double beatLength)
|
|
||||||
{
|
|
||||||
BeatLength = beatLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double BPM => 60000 / BeatLength;
|
|
||||||
}
|
|
||||||
}
|
|
@ -40,7 +40,7 @@ namespace osu.Game.Beatmaps
|
|||||||
protected abstract Beatmap GetBeatmap();
|
protected abstract Beatmap GetBeatmap();
|
||||||
protected abstract Texture GetBackground();
|
protected abstract Texture GetBackground();
|
||||||
protected abstract Track GetTrack();
|
protected abstract Track GetTrack();
|
||||||
|
|
||||||
private Beatmap beatmap;
|
private Beatmap beatmap;
|
||||||
private readonly object beatmapLock = new object();
|
private readonly object beatmapLock = new object();
|
||||||
public Beatmap Beatmap
|
public Beatmap Beatmap
|
||||||
@ -53,7 +53,7 @@ namespace osu.Game.Beatmaps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly object backgroundLock = new object();
|
private readonly object backgroundLock = new object();
|
||||||
private Texture background;
|
private Texture background;
|
||||||
public Texture Background
|
public Texture Background
|
||||||
@ -87,7 +87,7 @@ namespace osu.Game.Beatmaps
|
|||||||
if (track != null && BeatmapInfo.AudioEquals(other.BeatmapInfo))
|
if (track != null && BeatmapInfo.AudioEquals(other.BeatmapInfo))
|
||||||
other.track = track;
|
other.track = track;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Dispose()
|
public virtual void Dispose()
|
||||||
{
|
{
|
||||||
track?.Dispose();
|
track?.Dispose();
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Configuration
|
|||||||
protected override void InitialiseDefaults()
|
protected override void InitialiseDefaults()
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0612 // Type or member is obsolete
|
#pragma warning disable CS0612 // Type or member is obsolete
|
||||||
|
|
||||||
Set(OsuConfig.Username, string.Empty);
|
Set(OsuConfig.Username, string.Empty);
|
||||||
Set(OsuConfig.Token, string.Empty);
|
Set(OsuConfig.Token, string.Empty);
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Beatmaps.Samples;
|
using Newtonsoft.Json;
|
||||||
|
using osu.Game.IO.Serialization;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
using SQLite.Net.Attributes;
|
using SQLite.Net.Attributes;
|
||||||
using SQLiteNetExtensions.Attributes;
|
using SQLiteNetExtensions.Attributes;
|
||||||
@ -10,7 +11,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
public class BeatmapInfo : IEquatable<BeatmapInfo>
|
public class BeatmapInfo : IEquatable<BeatmapInfo>, IJsonSerializable
|
||||||
{
|
{
|
||||||
[PrimaryKey, AutoIncrement]
|
[PrimaryKey, AutoIncrement]
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
@ -47,7 +48,6 @@ namespace osu.Game.Database
|
|||||||
// General
|
// General
|
||||||
public int AudioLeadIn { get; set; }
|
public int AudioLeadIn { get; set; }
|
||||||
public bool Countdown { get; set; }
|
public bool Countdown { get; set; }
|
||||||
public SampleSet SampleSet { get; set; }
|
|
||||||
public float StackLeniency { get; set; }
|
public float StackLeniency { get; set; }
|
||||||
public bool SpecialStyle { get; set; }
|
public bool SpecialStyle { get; set; }
|
||||||
public PlayMode Mode { get; set; }
|
public PlayMode Mode { get; set; }
|
||||||
@ -57,17 +57,13 @@ namespace osu.Game.Database
|
|||||||
// Editor
|
// Editor
|
||||||
// This bookmarks stuff is necessary because DB doesn't know how to store int[]
|
// This bookmarks stuff is necessary because DB doesn't know how to store int[]
|
||||||
public string StoredBookmarks { get; internal set; }
|
public string StoredBookmarks { get; internal set; }
|
||||||
|
|
||||||
[Ignore]
|
[Ignore]
|
||||||
|
[JsonIgnore]
|
||||||
public int[] Bookmarks
|
public int[] Bookmarks
|
||||||
{
|
{
|
||||||
get
|
get { return StoredBookmarks.Split(',').Select(int.Parse).ToArray(); }
|
||||||
{
|
set { StoredBookmarks = string.Join(",", value); }
|
||||||
return StoredBookmarks.Split(',').Select(int.Parse).ToArray();
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
StoredBookmarks = string.Join(",", value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double DistanceSpacing { get; set; }
|
public double DistanceSpacing { get; set; }
|
||||||
@ -86,7 +82,7 @@ namespace osu.Game.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
public bool AudioEquals(BeatmapInfo other) => other != null && BeatmapSet != null && other.BeatmapSet != null &&
|
public bool AudioEquals(BeatmapInfo other) => other != null && BeatmapSet != null && other.BeatmapSet != null &&
|
||||||
BeatmapSet.Path == other.BeatmapSet.Path &&
|
BeatmapSet.Path == other.BeatmapSet.Path &&
|
||||||
(Metadata ?? BeatmapSet.Metadata).AudioFile == (other.Metadata ?? other.BeatmapSet.Metadata).AudioFile;
|
(Metadata ?? BeatmapSet.Metadata).AudioFile == (other.Metadata ?? other.BeatmapSet.Metadata).AudioFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ namespace osu.Game.Database
|
|||||||
score.Replay = score.CreateReplay(reader);
|
score.Replay = score.CreateReplay(reader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (parallaxEnabled)
|
if (parallaxEnabled)
|
||||||
{
|
{
|
||||||
Vector2 offset = input.CurrentState.Mouse == null ? Vector2.Zero : ToLocalSpace(input.CurrentState.Mouse.NativeState.Position) - DrawSize / 2;
|
Vector2 offset = input.CurrentState.Mouse == null ? Vector2.Zero : ToLocalSpace(input.CurrentState.Mouse.NativeState.Position) - DrawSize / 2;
|
||||||
content.MoveTo(offset * ParallaxAmount, firstUpdate ? 0 : 1000, EasingTypes.OutQuint);
|
content.MoveTo(offset * ParallaxAmount, firstUpdate ? 0 : 1000, EasingTypes.OutQuint);
|
||||||
content.Scale = new Vector2(1 + ParallaxAmount);
|
content.Scale = new Vector2(1 + ParallaxAmount);
|
||||||
|
29
osu.Game/IO/Serialization/IJsonSerializable.cs
Normal file
29
osu.Game/IO/Serialization/IJsonSerializable.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace osu.Game.IO.Serialization
|
||||||
|
{
|
||||||
|
public interface IJsonSerializable
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class JsonSerializableExtensions
|
||||||
|
{
|
||||||
|
public static string Serialize(this IJsonSerializable obj)
|
||||||
|
{
|
||||||
|
return JsonConvert.SerializeObject(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static T Deserialize<T>(string objString)
|
||||||
|
{
|
||||||
|
return JsonConvert.DeserializeObject<T>(objString);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static T DeepClone<T>(this IJsonSerializable obj)
|
||||||
|
{
|
||||||
|
return Deserialize<T>(Serialize(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -17,10 +17,7 @@ namespace osu.Game.Modes.Judgements
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public double TimeOffset;
|
public double TimeOffset;
|
||||||
|
|
||||||
/// <summary>
|
public virtual bool AffectsCombo => true;
|
||||||
/// The combo after this judgement was processed.
|
|
||||||
/// </summary>
|
|
||||||
public int ComboAtHit;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The string representation for the result achieved.
|
/// The string representation for the result achieved.
|
||||||
|
@ -109,7 +109,7 @@ namespace osu.Game.Modes.Objects
|
|||||||
|
|
||||||
// "toFlatten" contains all the curves which are not yet approximated well enough.
|
// "toFlatten" contains all the curves which are not yet approximated well enough.
|
||||||
// We use a stack to emulate recursion without the risk of running into a stack overflow.
|
// We use a stack to emulate recursion without the risk of running into a stack overflow.
|
||||||
// (More specifically, we iteratively and adaptively refine our curve with a
|
// (More specifically, we iteratively and adaptively refine our curve with a
|
||||||
// <a href="https://en.wikipedia.org/wiki/Depth-first_search">Depth-first search</a>
|
// <a href="https://en.wikipedia.org/wiki/Depth-first_search">Depth-first search</a>
|
||||||
// over the tree resulting from the subdivisions we make.)
|
// over the tree resulting from the subdivisions we make.)
|
||||||
toFlatten.Push(controlPoints.ToArray());
|
toFlatten.Push(controlPoints.ToArray());
|
||||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Modes.Objects
|
|||||||
double dir = 1;
|
double dir = 1;
|
||||||
double thetaRange = thetaEnd - thetaStart;
|
double thetaRange = thetaEnd - thetaStart;
|
||||||
|
|
||||||
// Decide in which direction to draw the circle, depending on which side of
|
// Decide in which direction to draw the circle, depending on which side of
|
||||||
// AC B lies.
|
// AC B lies.
|
||||||
Vector2 orthoAtoC = c - a;
|
Vector2 orthoAtoC = c - a;
|
||||||
orthoAtoC = new Vector2(orthoAtoC.Y, -orthoAtoC.X);
|
orthoAtoC = new Vector2(orthoAtoC.Y, -orthoAtoC.X);
|
||||||
|
@ -7,11 +7,11 @@ using osu.Framework;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
using osu.Game.Modes.Judgements;
|
using osu.Game.Modes.Judgements;
|
||||||
using Container = osu.Framework.Graphics.Containers.Container;
|
using Container = osu.Framework.Graphics.Containers.Container;
|
||||||
using osu.Game.Modes.Objects.Types;
|
using osu.Game.Modes.Objects.Types;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
using osu.Game.Audio;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Objects.Drawables
|
namespace osu.Game.Modes.Objects.Drawables
|
||||||
{
|
{
|
||||||
@ -45,15 +45,15 @@ namespace osu.Game.Modes.Objects.Drawables
|
|||||||
UpdateState(state);
|
UpdateState(state);
|
||||||
|
|
||||||
if (State == ArmedState.Hit)
|
if (State == ArmedState.Hit)
|
||||||
PlaySample();
|
PlaySamples();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SampleChannel Sample;
|
protected List<SampleChannel> Samples = new List<SampleChannel>();
|
||||||
|
|
||||||
protected virtual void PlaySample()
|
protected void PlaySamples()
|
||||||
{
|
{
|
||||||
Sample?.Play();
|
Samples.ForEach(s => s?.Play());
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -156,13 +156,16 @@ namespace osu.Game.Modes.Objects.Drawables
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
SampleType type = HitObject.Sample?.Type ?? SampleType.None;
|
foreach (SampleInfo sample in HitObject.Samples)
|
||||||
if (type == SampleType.None)
|
{
|
||||||
type = SampleType.Normal;
|
SampleChannel channel = audio.Sample.Get($@"Gameplay/{sample.Bank}-{sample.Name}");
|
||||||
|
|
||||||
SampleSet sampleSet = HitObject.Sample?.Set ?? SampleSet.Normal;
|
if (channel == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
Sample = audio.Sample.Get($@"Gameplay/{sampleSet.ToString().ToLower()}-hit{type.ToString().ToLower()}");
|
channel.Volume.Value = sample.Volume;
|
||||||
|
Samples.Add(channel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<DrawableHitObject<TObject, TJudgement>> nestedHitObjects;
|
private List<DrawableHitObject<TObject, TJudgement>> nestedHitObjects;
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Beatmaps.Samples;
|
using osu.Game.Audio;
|
||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Objects
|
namespace osu.Game.Modes.Objects
|
||||||
{
|
{
|
||||||
@ -21,15 +22,31 @@ namespace osu.Game.Modes.Objects
|
|||||||
public double StartTime { get; set; }
|
public double StartTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The sample to be played when this HitObject is hit.
|
/// The samples to be played when this hit object is hit.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public HitSampleInfo Sample { get; set; }
|
public List<SampleInfo> Samples = new List<SampleInfo>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies default values to this HitObject.
|
/// Applies default values to this HitObject.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="difficulty">The difficulty settings to use.</param>
|
/// <param name="difficulty">The difficulty settings to use.</param>
|
||||||
/// <param name="timing">The timing settings to use.</param>
|
/// <param name="timing">The timing settings to use.</param>
|
||||||
public virtual void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) { }
|
public virtual void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
|
||||||
|
{
|
||||||
|
ControlPoint overridePoint;
|
||||||
|
ControlPoint timingPoint = timing.TimingPointAt(StartTime, out overridePoint);
|
||||||
|
|
||||||
|
foreach (var sample in Samples)
|
||||||
|
{
|
||||||
|
if (sample.Volume == 0)
|
||||||
|
sample.Volume = (overridePoint ?? timingPoint)?.SampleVolume ?? 0;
|
||||||
|
|
||||||
|
// If the bank is not assigned a name, assign it from the control point
|
||||||
|
if (!string.IsNullOrEmpty(sample.Bank))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
sample.Bank = (overridePoint ?? timingPoint)?.SampleBank ?? @"normal";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Game.Beatmaps.Samples;
|
|
||||||
using osu.Game.Modes.Objects.Types;
|
using osu.Game.Modes.Objects.Types;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using osu.Game.Modes.Objects.Legacy;
|
using osu.Game.Modes.Objects.Legacy;
|
||||||
|
using osu.Game.Beatmaps.Formats;
|
||||||
|
using osu.Game.Audio;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Objects
|
namespace osu.Game.Modes.Objects
|
||||||
{
|
{
|
||||||
@ -20,6 +21,10 @@ namespace osu.Game.Modes.Objects
|
|||||||
bool combo = type.HasFlag(LegacyHitObjectType.NewCombo);
|
bool combo = type.HasFlag(LegacyHitObjectType.NewCombo);
|
||||||
type &= ~LegacyHitObjectType.NewCombo;
|
type &= ~LegacyHitObjectType.NewCombo;
|
||||||
|
|
||||||
|
int sampleVolume = 0;
|
||||||
|
string normalSampleBank = null;
|
||||||
|
string addSampleBank = null;
|
||||||
|
|
||||||
HitObject result;
|
HitObject result;
|
||||||
|
|
||||||
if ((type & LegacyHitObjectType.Circle) > 0)
|
if ((type & LegacyHitObjectType.Circle) > 0)
|
||||||
@ -29,6 +34,9 @@ namespace osu.Game.Modes.Objects
|
|||||||
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])),
|
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])),
|
||||||
NewCombo = combo
|
NewCombo = combo
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (split.Length > 5)
|
||||||
|
readCustomSampleBanks(split[5], ref normalSampleBank, ref addSampleBank, ref sampleVolume);
|
||||||
}
|
}
|
||||||
else if ((type & LegacyHitObjectType.Slider) > 0)
|
else if ((type & LegacyHitObjectType.Slider) > 0)
|
||||||
{
|
{
|
||||||
@ -84,6 +92,9 @@ namespace osu.Game.Modes.Objects
|
|||||||
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])),
|
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])),
|
||||||
NewCombo = combo
|
NewCombo = combo
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (split.Length > 10)
|
||||||
|
readCustomSampleBanks(split[10], ref normalSampleBank, ref addSampleBank, ref sampleVolume);
|
||||||
}
|
}
|
||||||
else if ((type & LegacyHitObjectType.Spinner) > 0)
|
else if ((type & LegacyHitObjectType.Spinner) > 0)
|
||||||
{
|
{
|
||||||
@ -91,10 +102,17 @@ namespace osu.Game.Modes.Objects
|
|||||||
{
|
{
|
||||||
EndTime = Convert.ToDouble(split[5], CultureInfo.InvariantCulture)
|
EndTime = Convert.ToDouble(split[5], CultureInfo.InvariantCulture)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (split.Length > 6)
|
||||||
|
readCustomSampleBanks(split[6], ref normalSampleBank, ref addSampleBank, ref sampleVolume);
|
||||||
}
|
}
|
||||||
else if ((type & LegacyHitObjectType.Hold) > 0)
|
else if ((type & LegacyHitObjectType.Hold) > 0)
|
||||||
{
|
{
|
||||||
// Note: Hold is generated by BMS converts
|
// Note: Hold is generated by BMS converts
|
||||||
|
|
||||||
|
// Todo: Apparently end time is determined by samples??
|
||||||
|
// Shouldn't need implementation until mania
|
||||||
|
|
||||||
result = new LegacyHold
|
result = new LegacyHold
|
||||||
{
|
{
|
||||||
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])),
|
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])),
|
||||||
@ -105,15 +123,82 @@ namespace osu.Game.Modes.Objects
|
|||||||
throw new InvalidOperationException($@"Unknown hit object type {type}");
|
throw new InvalidOperationException($@"Unknown hit object type {type}");
|
||||||
|
|
||||||
result.StartTime = Convert.ToDouble(split[2], CultureInfo.InvariantCulture);
|
result.StartTime = Convert.ToDouble(split[2], CultureInfo.InvariantCulture);
|
||||||
result.Sample = new HitSampleInfo
|
|
||||||
{
|
|
||||||
Type = (SampleType)int.Parse(split[4]),
|
|
||||||
Set = SampleSet.Soft,
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: "addition" field
|
var soundType = (LegacySoundType)int.Parse(split[4]);
|
||||||
|
|
||||||
|
result.Samples.Add(new SampleInfo
|
||||||
|
{
|
||||||
|
Bank = normalSampleBank,
|
||||||
|
Name = SampleInfo.HIT_NORMAL,
|
||||||
|
Volume = sampleVolume
|
||||||
|
});
|
||||||
|
|
||||||
|
if ((soundType & LegacySoundType.Finish) > 0)
|
||||||
|
{
|
||||||
|
result.Samples.Add(new SampleInfo
|
||||||
|
{
|
||||||
|
Bank = addSampleBank,
|
||||||
|
Name = SampleInfo.HIT_FINISH,
|
||||||
|
Volume = sampleVolume
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((soundType & LegacySoundType.Whistle) > 0)
|
||||||
|
{
|
||||||
|
result.Samples.Add(new SampleInfo
|
||||||
|
{
|
||||||
|
Bank = addSampleBank,
|
||||||
|
Name = SampleInfo.HIT_WHISTLE,
|
||||||
|
Volume = sampleVolume
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((soundType & LegacySoundType.Clap) > 0)
|
||||||
|
{
|
||||||
|
result.Samples.Add(new SampleInfo
|
||||||
|
{
|
||||||
|
Bank = addSampleBank,
|
||||||
|
Name = SampleInfo.HIT_CLAP,
|
||||||
|
Volume = sampleVolume
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void readCustomSampleBanks(string str, ref string normalSampleBank, ref string addSampleBank, ref int sampleVolume)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(str))
|
||||||
|
return;
|
||||||
|
|
||||||
|
string[] split = str.Split(':');
|
||||||
|
|
||||||
|
var bank = (OsuLegacyDecoder.LegacySampleBank)Convert.ToInt32(split[0]);
|
||||||
|
var addbank = (OsuLegacyDecoder.LegacySampleBank)Convert.ToInt32(split[1]);
|
||||||
|
|
||||||
|
// Let's not implement this for now, because this doesn't fit nicely into the bank structure
|
||||||
|
//string sampleFile = split2.Length > 4 ? split2[4] : string.Empty;
|
||||||
|
|
||||||
|
string stringBank = bank.ToString().ToLower();
|
||||||
|
if (stringBank == @"none")
|
||||||
|
stringBank = null;
|
||||||
|
string stringAddBank = addbank.ToString().ToLower();
|
||||||
|
if (stringAddBank == @"none")
|
||||||
|
stringAddBank = null;
|
||||||
|
|
||||||
|
normalSampleBank = stringBank;
|
||||||
|
addSampleBank = stringAddBank;
|
||||||
|
sampleVolume = split.Length > 3 ? int.Parse(split[3]) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
private enum LegacySoundType
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Normal = 1,
|
||||||
|
Whistle = 2,
|
||||||
|
Finish = 4,
|
||||||
|
Clap = 8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Modes.Judgements;
|
using osu.Game.Modes.Judgements;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
using osu.Game.Modes.UI;
|
using osu.Game.Modes.UI;
|
||||||
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Scoring
|
namespace osu.Game.Modes.Scoring
|
||||||
{
|
{
|
||||||
@ -145,10 +146,21 @@ namespace osu.Game.Modes.Scoring
|
|||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
|
if (judgement.AffectsCombo)
|
||||||
|
{
|
||||||
|
switch (judgement.Result)
|
||||||
|
{
|
||||||
|
case HitResult.Miss:
|
||||||
|
Combo.Value = 0;
|
||||||
|
break;
|
||||||
|
case HitResult.Hit:
|
||||||
|
Combo.Value++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Judgements.Add(judgement);
|
Judgements.Add(judgement);
|
||||||
OnNewJudgement(judgement);
|
OnNewJudgement(judgement);
|
||||||
|
|
||||||
judgement.ComboAtHit = Combo.Value;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
OnJudgementChanged(judgement);
|
OnJudgementChanged(judgement);
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Modes.UI
|
|||||||
reapplySize();
|
reapplySize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public new Color4 Colour
|
public new Color4 Colour
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -38,7 +38,7 @@ namespace osu.Game.Modes.UI
|
|||||||
background.Colour = value;
|
background.Colour = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FontAwesome Icon
|
public FontAwesome Icon
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -70,7 +70,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Options.Sections.General
|
|||||||
public class LanguageOptions : OptionsSubsection
|
public class LanguageOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Language";
|
protected override string Header => "Language";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
|||||||
public class SongSelectGraphicsOptions : OptionsSubsection
|
public class SongSelectGraphicsOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Song Select";
|
protected override string Header => "Song Select";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Options.Sections.Online
|
|||||||
public class NotificationsOptions : OptionsSubsection
|
public class NotificationsOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Notifications";
|
protected override string Header => "Notifications";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Options.Sections.Online
|
|||||||
public class PrivacyOptions : OptionsSubsection
|
public class PrivacyOptions : OptionsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Privacy";
|
protected override string Header => "Privacy";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Options.Sections
|
|||||||
{
|
{
|
||||||
public override string Header => "Skin";
|
public override string Header => "Skin";
|
||||||
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
|
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledDelegate expandEvent;
|
private ScheduledDelegate expandEvent;
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
expandEvent = Scheduler.AddDelayed(() =>
|
expandEvent = Scheduler.AddDelayed(() =>
|
||||||
@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
}, 750);
|
}, 750);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
expandEvent?.Cancel();
|
expandEvent?.Cancel();
|
||||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Overlays
|
|||||||
public const float SIDEBAR_WIDTH = Sidebar.DEFAULT_WIDTH;
|
public const float SIDEBAR_WIDTH = Sidebar.DEFAULT_WIDTH;
|
||||||
|
|
||||||
private const float width = 400;
|
private const float width = 400;
|
||||||
|
|
||||||
private const float sidebar_padding = 10;
|
private const float sidebar_padding = 10;
|
||||||
|
|
||||||
private ScrollContainer scrollContainer;
|
private ScrollContainer scrollContainer;
|
||||||
@ -118,7 +118,7 @@ namespace osu.Game.Overlays
|
|||||||
).ToArray()
|
).ToArray()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
scrollContainer.Padding = new MarginPadding { Top = game?.Toolbar.DrawHeight ?? 0 };
|
scrollContainer.Padding = new MarginPadding { Top = game?.Toolbar.DrawHeight ?? 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
private ToolbarModeButton activeButton;
|
private ToolbarModeButton activeButton;
|
||||||
|
|
||||||
public Action<PlayMode> OnPlayModeChange;
|
public Action<PlayMode> OnPlayModeChange;
|
||||||
|
|
||||||
public ToolbarModeSelector()
|
public ToolbarModeSelector()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("osu!main")]
|
[assembly: AssemblyTitle("osu!main")]
|
||||||
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
|
|||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Framework.Screens;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Screens.Backgrounds;
|
|
||||||
using OpenTK;
|
|
||||||
using OpenTK.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
|
||||||
{
|
|
||||||
internal class FailDialog : OsuScreen
|
|
||||||
{
|
|
||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap);
|
|
||||||
|
|
||||||
private static readonly Vector2 background_blur = new Vector2(20);
|
|
||||||
|
|
||||||
public FailDialog()
|
|
||||||
{
|
|
||||||
Add(new OsuSpriteText
|
|
||||||
{
|
|
||||||
Text = "You failed!",
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
TextSize = 50
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnEntering(Screen last)
|
|
||||||
{
|
|
||||||
base.OnEntering(last);
|
|
||||||
Background.Schedule(() => (Background as BackgroundScreenBeatmap)?.BlurTo(background_blur, 1000));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnExiting(Screen next)
|
|
||||||
{
|
|
||||||
Background.Schedule(() => Background.FadeColour(Color4.White, 500));
|
|
||||||
return base.OnExiting(next);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
37
osu.Game/Screens/Play/FailOverlay.cs
Normal file
37
osu.Game/Screens/Play/FailOverlay.cs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
using OpenTK.Input;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.Play
|
||||||
|
{
|
||||||
|
public class FailOverlay : MenuOverlay
|
||||||
|
{
|
||||||
|
|
||||||
|
public override string Header => "failed";
|
||||||
|
public override string Description => "you're dead, try again?";
|
||||||
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
|
{
|
||||||
|
if (args.Key == Key.Escape)
|
||||||
|
{
|
||||||
|
if (State == Visibility.Hidden) return false;
|
||||||
|
OnQuit();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.OnKeyDown(state, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
AddButton("Retry", colours.YellowDark, OnRetry);
|
||||||
|
AddButton("Quit", new Color4(170, 27, 39, 255), OnQuit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
194
osu.Game/Screens/Play/MenuOverlay.cs
Normal file
194
osu.Game/Screens/Play/MenuOverlay.cs
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Screens.Play.Pause;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.Play
|
||||||
|
{
|
||||||
|
public abstract class MenuOverlay : OverlayContainer
|
||||||
|
{
|
||||||
|
private const int transition_duration = 200;
|
||||||
|
private const int button_height = 70;
|
||||||
|
private const float background_alpha = 0.75f;
|
||||||
|
|
||||||
|
protected override bool HideOnEscape => false;
|
||||||
|
|
||||||
|
public Action OnRetry;
|
||||||
|
public Action OnQuit;
|
||||||
|
|
||||||
|
public abstract string Header { get; }
|
||||||
|
public abstract string Description { get; }
|
||||||
|
|
||||||
|
private FillFlowContainer buttons;
|
||||||
|
|
||||||
|
public int Retries
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (retryCounterContainer != null)
|
||||||
|
{
|
||||||
|
// "You've retried 1,065 times in this session"
|
||||||
|
// "You've retried 1 time in this session"
|
||||||
|
|
||||||
|
retryCounterContainer.Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = "You've retried ",
|
||||||
|
Shadow = true,
|
||||||
|
ShadowColour = new Color4(0, 0, 0, 0.25f),
|
||||||
|
TextSize = 18
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = $"{value:n0}",
|
||||||
|
Font = @"Exo2.0-Bold",
|
||||||
|
Shadow = true,
|
||||||
|
ShadowColour = new Color4(0, 0, 0, 0.25f),
|
||||||
|
TextSize = 18
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = $" time{(value == 1 ? "" : "s")} in this session",
|
||||||
|
Shadow = true,
|
||||||
|
ShadowColour = new Color4(0, 0, 0, 0.25f),
|
||||||
|
TextSize = 18
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private FillFlowContainer retryCounterContainer;
|
||||||
|
|
||||||
|
public override bool HandleInput => State == Visibility.Visible;
|
||||||
|
|
||||||
|
protected override void PopIn() => FadeIn(transition_duration, EasingTypes.In);
|
||||||
|
protected override void PopOut() => FadeOut(transition_duration, EasingTypes.In);
|
||||||
|
|
||||||
|
// Don't let mouse down events through the overlay or people can click circles while paused.
|
||||||
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||||
|
|
||||||
|
protected override bool OnMouseMove(InputState state) => true;
|
||||||
|
|
||||||
|
protected void AddButton(string text, Color4 colour, Action action)
|
||||||
|
{
|
||||||
|
buttons.Add(new PauseButton
|
||||||
|
{
|
||||||
|
Text = text,
|
||||||
|
ButtonColour = colour,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Height = button_height,
|
||||||
|
Action = delegate {
|
||||||
|
action?.Invoke();
|
||||||
|
Hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Black,
|
||||||
|
Alpha = background_alpha,
|
||||||
|
},
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(0, 50),
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(0, 20),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = Header,
|
||||||
|
Font = @"Exo2.0-Medium",
|
||||||
|
Spacing = new Vector2(5, 0),
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
TextSize = 30,
|
||||||
|
Colour = colours.Yellow,
|
||||||
|
Shadow = true,
|
||||||
|
ShadowColour = new Color4(0, 0, 0, 0.25f)
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Text = Description,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Shadow = true,
|
||||||
|
ShadowColour = new Color4(0, 0, 0, 0.25f)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttons = new FillFlowContainer
|
||||||
|
{
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Masking = true,
|
||||||
|
EdgeEffect = new EdgeEffect
|
||||||
|
{
|
||||||
|
Type = EdgeEffectType.Shadow,
|
||||||
|
Colour = Color4.Black.Opacity(0.6f),
|
||||||
|
Radius = 50
|
||||||
|
},
|
||||||
|
},
|
||||||
|
retryCounterContainer = new FillFlowContainer
|
||||||
|
{
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new PauseProgressBar
|
||||||
|
{
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
Anchor = Anchor.BottomCentre,
|
||||||
|
Width = 1f
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Retries = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected MenuOverlay()
|
||||||
|
{
|
||||||
|
AlwaysReceiveInput = true;
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,23 +4,16 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using OpenTK.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.Pause
|
namespace osu.Game.Screens.Play.Pause
|
||||||
{
|
{
|
||||||
public class QuitButton : DialogButton
|
public class PauseButton : DialogButton
|
||||||
{
|
{
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
ButtonColour = new Color4(170, 27, 39, 255); // The red from the design isn't in the palette so it's used directly
|
|
||||||
SampleHover = audio.Sample.Get(@"Menu/menuclick");
|
SampleHover = audio.Sample.Get(@"Menu/menuclick");
|
||||||
SampleClick = audio.Sample.Get(@"Menu/menuback");
|
SampleClick = audio.Sample.Get(@"Menu/menuback");
|
||||||
}
|
}
|
||||||
|
|
||||||
public QuitButton()
|
|
||||||
{
|
|
||||||
Text = @"Quit to Main Menu";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,26 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Audio;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.Pause
|
|
||||||
{
|
|
||||||
public class ResumeButton : DialogButton
|
|
||||||
{
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(AudioManager audio, OsuColour colours)
|
|
||||||
{
|
|
||||||
ButtonColour = colours.Green;
|
|
||||||
SampleHover = audio.Sample.Get(@"Menu/menuclick");
|
|
||||||
SampleClick = audio.Sample.Get(@"Menu/menuback");
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResumeButton()
|
|
||||||
{
|
|
||||||
Text = @"Continue";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Audio;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.Pause
|
|
||||||
{
|
|
||||||
public class RetryButton : DialogButton
|
|
||||||
{
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(AudioManager audio, OsuColour colours)
|
|
||||||
{
|
|
||||||
ButtonColour = colours.YellowDark;
|
|
||||||
SampleHover = audio.Sample.Get(@"Menu/menuclick");
|
|
||||||
SampleClick = audio.Sample.Get(@"Menu/menu-play-click");
|
|
||||||
}
|
|
||||||
|
|
||||||
public RetryButton()
|
|
||||||
{
|
|
||||||
Text = @"Retry";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,89 +2,28 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Screens.Play.Pause;
|
|
||||||
using OpenTK;
|
|
||||||
using OpenTK.Graphics;
|
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
public class PauseOverlay : OverlayContainer
|
public class PauseOverlay : MenuOverlay
|
||||||
{
|
{
|
||||||
private const int transition_duration = 200;
|
|
||||||
private const int button_height = 70;
|
|
||||||
private const float background_alpha = 0.75f;
|
|
||||||
|
|
||||||
protected override bool HideOnEscape => false;
|
|
||||||
|
|
||||||
public Action OnResume;
|
public Action OnResume;
|
||||||
public Action OnRetry;
|
|
||||||
public Action OnQuit;
|
|
||||||
|
|
||||||
public int Retries
|
public override string Header => "paused";
|
||||||
{
|
public override string Description => "you're not going to do what i think you're going to do, are ya?";
|
||||||
set
|
|
||||||
{
|
|
||||||
if (retryCounterContainer != null)
|
|
||||||
{
|
|
||||||
// "You've retried 1,065 times in this session"
|
|
||||||
// "You've retried 1 time in this session"
|
|
||||||
|
|
||||||
retryCounterContainer.Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Text = "You've retried ",
|
|
||||||
Shadow = true,
|
|
||||||
ShadowColour = new Color4(0, 0, 0, 0.25f),
|
|
||||||
TextSize = 18
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Text = $"{value:n0}",
|
|
||||||
Font = @"Exo2.0-Bold",
|
|
||||||
Shadow = true,
|
|
||||||
ShadowColour = new Color4(0, 0, 0, 0.25f),
|
|
||||||
TextSize = 18
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Text = $" time{(value == 1 ? "" : "s")} in this session",
|
|
||||||
Shadow = true,
|
|
||||||
ShadowColour = new Color4(0, 0, 0, 0.25f),
|
|
||||||
TextSize = 18
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private FillFlowContainer retryCounterContainer;
|
|
||||||
|
|
||||||
public override bool HandleInput => State == Visibility.Visible;
|
|
||||||
|
|
||||||
protected override void PopIn() => FadeIn(transition_duration, EasingTypes.In);
|
|
||||||
protected override void PopOut() => FadeOut(transition_duration, EasingTypes.In);
|
|
||||||
|
|
||||||
// Don't let mouse down events through the overlay or people can click circles while paused.
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
|
||||||
|
|
||||||
protected override bool OnMouseMove(InputState state) => true;
|
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.Key == Key.Escape)
|
if (args.Key == Key.Escape)
|
||||||
{
|
{
|
||||||
if (State == Visibility.Hidden) return false;
|
if (State == Visibility.Hidden) return false;
|
||||||
resume();
|
OnResume();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,131 +33,10 @@ namespace osu.Game.Screens.Play
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
AddButton("Continue", colours.Green, OnResume);
|
||||||
{
|
AddButton("Retry", colours.YellowDark, OnRetry);
|
||||||
new Box
|
AddButton("Quit", new Color4(170, 27, 39, 255), OnQuit);
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = Color4.Black,
|
|
||||||
Alpha = background_alpha,
|
|
||||||
},
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
Spacing = new Vector2(0, 50),
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
Spacing = new Vector2(0, 20),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Text = @"paused",
|
|
||||||
Font = @"Exo2.0-Medium",
|
|
||||||
Spacing = new Vector2(5, 0),
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
TextSize = 30,
|
|
||||||
Colour = colours.Yellow,
|
|
||||||
Shadow = true,
|
|
||||||
ShadowColour = new Color4(0, 0, 0, 0.25f)
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Text = @"you're not going to do what i think you're going to do, are ya?",
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Shadow = true,
|
|
||||||
ShadowColour = new Color4(0, 0, 0, 0.25f)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new FillFlowContainer
|
|
||||||
{
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Masking = true,
|
|
||||||
EdgeEffect = new EdgeEffect
|
|
||||||
{
|
|
||||||
Type = EdgeEffectType.Shadow,
|
|
||||||
Colour = Color4.Black.Opacity(0.6f),
|
|
||||||
Radius = 50
|
|
||||||
},
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new ResumeButton
|
|
||||||
{
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Height = button_height,
|
|
||||||
Action = resume
|
|
||||||
},
|
|
||||||
new RetryButton
|
|
||||||
{
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Height = button_height,
|
|
||||||
Action = delegate
|
|
||||||
{
|
|
||||||
OnRetry?.Invoke();
|
|
||||||
Hide();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new QuitButton
|
|
||||||
{
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Height = button_height,
|
|
||||||
Action = delegate
|
|
||||||
{
|
|
||||||
OnQuit?.Invoke();
|
|
||||||
Hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
retryCounterContainer = new FillFlowContainer
|
|
||||||
{
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new PauseProgressBar
|
|
||||||
{
|
|
||||||
Origin = Anchor.BottomCentre,
|
|
||||||
Anchor = Anchor.BottomCentre,
|
|
||||||
Width = 1f
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Retries = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void resume()
|
|
||||||
{
|
|
||||||
OnResume?.Invoke();
|
|
||||||
Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
public PauseOverlay()
|
|
||||||
{
|
|
||||||
AlwaysReceiveInput = true;
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,6 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Track;
|
using osu.Framework.Audio.Track;
|
||||||
@ -31,12 +30,14 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
internal override bool ShowOverlays => false;
|
internal override bool ShowOverlays => false;
|
||||||
|
|
||||||
internal override bool HasLocalCursorDisplayed => !IsPaused && HitRenderer.ProvidingUserCursor;
|
internal override bool HasLocalCursorDisplayed => !IsPaused && !HasFailed && HitRenderer.ProvidingUserCursor;
|
||||||
|
|
||||||
public BeatmapInfo BeatmapInfo;
|
public BeatmapInfo BeatmapInfo;
|
||||||
|
|
||||||
public bool IsPaused { get; private set; }
|
public bool IsPaused { get; private set; }
|
||||||
|
|
||||||
|
public bool HasFailed { get; private set; }
|
||||||
|
|
||||||
public int RestartCount;
|
public int RestartCount;
|
||||||
|
|
||||||
private const double pause_cooldown = 1000;
|
private const double pause_cooldown = 1000;
|
||||||
@ -56,6 +57,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private HudOverlay hudOverlay;
|
private HudOverlay hudOverlay;
|
||||||
private PauseOverlay pauseOverlay;
|
private PauseOverlay pauseOverlay;
|
||||||
|
private FailOverlay failOverlay;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuConfigManager config)
|
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuConfigManager config)
|
||||||
@ -116,20 +118,6 @@ namespace osu.Game.Screens.Play
|
|||||||
hudOverlay = new StandardHudOverlay();
|
hudOverlay = new StandardHudOverlay();
|
||||||
hudOverlay.KeyCounter.Add(ruleset.CreateGameplayKeys());
|
hudOverlay.KeyCounter.Add(ruleset.CreateGameplayKeys());
|
||||||
hudOverlay.BindProcessor(scoreProcessor);
|
hudOverlay.BindProcessor(scoreProcessor);
|
||||||
|
|
||||||
pauseOverlay = new PauseOverlay
|
|
||||||
{
|
|
||||||
Depth = -1,
|
|
||||||
OnResume = delegate
|
|
||||||
{
|
|
||||||
Delay(400);
|
|
||||||
Schedule(Resume);
|
|
||||||
},
|
|
||||||
OnRetry = Restart,
|
|
||||||
OnQuit = Exit
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
hudOverlay.BindHitRenderer(HitRenderer);
|
hudOverlay.BindHitRenderer(HitRenderer);
|
||||||
|
|
||||||
//bind HitRenderer to ScoreProcessor and ourselves (for a pass situation)
|
//bind HitRenderer to ScoreProcessor and ourselves (for a pass situation)
|
||||||
@ -154,7 +142,21 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
hudOverlay,
|
hudOverlay,
|
||||||
pauseOverlay
|
pauseOverlay = new PauseOverlay
|
||||||
|
{
|
||||||
|
OnResume = delegate
|
||||||
|
{
|
||||||
|
Delay(400);
|
||||||
|
Schedule(Resume);
|
||||||
|
},
|
||||||
|
OnRetry = Restart,
|
||||||
|
OnQuit = Exit,
|
||||||
|
},
|
||||||
|
failOverlay = new FailOverlay
|
||||||
|
{
|
||||||
|
OnRetry = Restart,
|
||||||
|
OnQuit = Exit,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,15 +256,13 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void onFail()
|
private void onFail()
|
||||||
{
|
{
|
||||||
Content.FadeColour(Color4.Red, 500);
|
|
||||||
sourceClock.Stop();
|
sourceClock.Stop();
|
||||||
|
|
||||||
Delay(500);
|
Delay(500);
|
||||||
Schedule(delegate
|
|
||||||
{
|
HasFailed = true;
|
||||||
ValidForResume = false;
|
failOverlay.Retries = RestartCount;
|
||||||
Push(new FailDialog());
|
failOverlay.Show();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnEntering(Screen last)
|
protected override void OnEntering(Screen last)
|
||||||
|
@ -71,9 +71,10 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Audio\SampleInfo.cs" />
|
||||||
<Compile Include="Beatmaps\Drawables\BeatmapBackgroundSprite.cs" />
|
<Compile Include="Beatmaps\Drawables\BeatmapBackgroundSprite.cs" />
|
||||||
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
|
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
|
||||||
<Compile Include="Beatmaps\IBeatmapCoverter.cs" />
|
<Compile Include="Beatmaps\IBeatmapConverter.cs" />
|
||||||
<Compile Include="Beatmaps\IBeatmapProcessor.cs" />
|
<Compile Include="Beatmaps\IBeatmapProcessor.cs" />
|
||||||
<Compile Include="Beatmaps\Legacy\LegacyBeatmap.cs" />
|
<Compile Include="Beatmaps\Legacy\LegacyBeatmap.cs" />
|
||||||
<Compile Include="Beatmaps\Timing\TimeSignatures.cs" />
|
<Compile Include="Beatmaps\Timing\TimeSignatures.cs" />
|
||||||
@ -97,6 +98,7 @@
|
|||||||
<Compile Include="IO\Legacy\ILegacySerializable.cs" />
|
<Compile Include="IO\Legacy\ILegacySerializable.cs" />
|
||||||
<Compile Include="IO\Legacy\SerializationReader.cs" />
|
<Compile Include="IO\Legacy\SerializationReader.cs" />
|
||||||
<Compile Include="IO\Legacy\SerializationWriter.cs" />
|
<Compile Include="IO\Legacy\SerializationWriter.cs" />
|
||||||
|
<Compile Include="IO\Serialization\IJsonSerializable.cs" />
|
||||||
<Compile Include="IPC\ScoreIPCChannel.cs" />
|
<Compile Include="IPC\ScoreIPCChannel.cs" />
|
||||||
<Compile Include="Modes\Replays\Replay.cs" />
|
<Compile Include="Modes\Replays\Replay.cs" />
|
||||||
<Compile Include="Modes\Judgements\DrawableJudgement.cs" />
|
<Compile Include="Modes\Judgements\DrawableJudgement.cs" />
|
||||||
@ -148,14 +150,7 @@
|
|||||||
<Compile Include="Beatmaps\Drawables\Panel.cs" />
|
<Compile Include="Beatmaps\Drawables\Panel.cs" />
|
||||||
<Compile Include="Modes\Objects\Drawables\DrawableHitObject.cs" />
|
<Compile Include="Modes\Objects\Drawables\DrawableHitObject.cs" />
|
||||||
<Compile Include="Modes\Objects\HitObject.cs" />
|
<Compile Include="Modes\Objects\HitObject.cs" />
|
||||||
<Compile Include="Beatmaps\Samples\HitSampleInfo.cs" />
|
|
||||||
<Compile Include="Beatmaps\Samples\SampleBank.cs" />
|
|
||||||
<Compile Include="Beatmaps\Samples\SampleInfo.cs" />
|
|
||||||
<Compile Include="Beatmaps\Samples\SampleSet.cs" />
|
|
||||||
<Compile Include="Beatmaps\Samples\SampleType.cs" />
|
|
||||||
<Compile Include="Beatmaps\Timing\ControlPoint.cs" />
|
<Compile Include="Beatmaps\Timing\ControlPoint.cs" />
|
||||||
<Compile Include="Beatmaps\Timing\SampleChange.cs" />
|
|
||||||
<Compile Include="Beatmaps\Timing\TimingChange.cs" />
|
|
||||||
<Compile Include="Configuration\OsuConfigManager.cs" />
|
<Compile Include="Configuration\OsuConfigManager.cs" />
|
||||||
<Compile Include="Overlays\Notifications\IHasCompletionTarget.cs" />
|
<Compile Include="Overlays\Notifications\IHasCompletionTarget.cs" />
|
||||||
<Compile Include="Overlays\Notifications\Notification.cs" />
|
<Compile Include="Overlays\Notifications\Notification.cs" />
|
||||||
@ -185,7 +180,7 @@
|
|||||||
<Compile Include="Screens\Backgrounds\BackgroundScreenEmpty.cs" />
|
<Compile Include="Screens\Backgrounds\BackgroundScreenEmpty.cs" />
|
||||||
<Compile Include="Screens\Charts\ChartInfo.cs" />
|
<Compile Include="Screens\Charts\ChartInfo.cs" />
|
||||||
<Compile Include="Screens\Edit\Editor.cs" />
|
<Compile Include="Screens\Edit\Editor.cs" />
|
||||||
<Compile Include="Screens\GameScreenWhiteBox.cs" />
|
<Compile Include="Screens\ScreenWhiteBox.cs" />
|
||||||
<Compile Include="Screens\Loader.cs" />
|
<Compile Include="Screens\Loader.cs" />
|
||||||
<Compile Include="Screens\Menu\Button.cs" />
|
<Compile Include="Screens\Menu\Button.cs" />
|
||||||
<Compile Include="Screens\Menu\Disclaimer.cs" />
|
<Compile Include="Screens\Menu\Disclaimer.cs" />
|
||||||
@ -198,8 +193,11 @@
|
|||||||
<Compile Include="Screens\Multiplayer\Lobby.cs" />
|
<Compile Include="Screens\Multiplayer\Lobby.cs" />
|
||||||
<Compile Include="Screens\Multiplayer\Match.cs" />
|
<Compile Include="Screens\Multiplayer\Match.cs" />
|
||||||
<Compile Include="Screens\Multiplayer\MatchCreate.cs" />
|
<Compile Include="Screens\Multiplayer\MatchCreate.cs" />
|
||||||
<Compile Include="Screens\Play\FailDialog.cs" />
|
<Compile Include="Screens\Play\FailOverlay.cs" />
|
||||||
|
<Compile Include="Screens\Play\MenuOverlay.cs" />
|
||||||
<Compile Include="Screens\Play\KeyConversionInputManager.cs" />
|
<Compile Include="Screens\Play\KeyConversionInputManager.cs" />
|
||||||
|
<Compile Include="Screens\Play\PauseOverlay.cs" />
|
||||||
|
<Compile Include="Screens\Play\Pause\PauseButton.cs" />
|
||||||
<Compile Include="Screens\Play\PlayerInputManager.cs" />
|
<Compile Include="Screens\Play\PlayerInputManager.cs" />
|
||||||
<Compile Include="Screens\Play\PlayerLoader.cs" />
|
<Compile Include="Screens\Play\PlayerLoader.cs" />
|
||||||
<Compile Include="Screens\Play\ReplayPlayer.cs" />
|
<Compile Include="Screens\Play\ReplayPlayer.cs" />
|
||||||
@ -212,7 +210,7 @@
|
|||||||
<Compile Include="Screens\Select\Filter\GroupMode.cs" />
|
<Compile Include="Screens\Select\Filter\GroupMode.cs" />
|
||||||
<Compile Include="Screens\Select\Filter\SortMode.cs" />
|
<Compile Include="Screens\Select\Filter\SortMode.cs" />
|
||||||
<Compile Include="Screens\Select\MatchSongSelect.cs" />
|
<Compile Include="Screens\Select\MatchSongSelect.cs" />
|
||||||
<Compile Include="Screens\OsuGameScreen.cs" />
|
<Compile Include="Screens\OsuScreen.cs" />
|
||||||
<Compile Include="Beatmaps\Drawables\BeatmapGroup.cs" />
|
<Compile Include="Beatmaps\Drawables\BeatmapGroup.cs" />
|
||||||
<Compile Include="Beatmaps\Drawables\BeatmapPanel.cs" />
|
<Compile Include="Beatmaps\Drawables\BeatmapPanel.cs" />
|
||||||
<Compile Include="Screens\Play\Player.cs" />
|
<Compile Include="Screens\Play\Player.cs" />
|
||||||
@ -286,7 +284,7 @@
|
|||||||
<Compile Include="Database\BeatmapSetInfo.cs" />
|
<Compile Include="Database\BeatmapSetInfo.cs" />
|
||||||
<Compile Include="Database\BeatmapMetadata.cs" />
|
<Compile Include="Database\BeatmapMetadata.cs" />
|
||||||
<Compile Include="Database\BeatmapInfo.cs" />
|
<Compile Include="Database\BeatmapInfo.cs" />
|
||||||
<Compile Include="Database\BaseDifficulty.cs" />
|
<Compile Include="Database\BeatmapDifficulty.cs" />
|
||||||
<Compile Include="Database\DatabaseWorkingBeatmap.cs" />
|
<Compile Include="Database\DatabaseWorkingBeatmap.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuButton.cs" />
|
<Compile Include="Graphics\UserInterface\OsuButton.cs" />
|
||||||
<Compile Include="Overlays\Options\Sections\MaintenanceSection.cs" />
|
<Compile Include="Overlays\Options\Sections\MaintenanceSection.cs" />
|
||||||
@ -338,12 +336,8 @@
|
|||||||
<Compile Include="Screens\Select\SearchTextBox.cs" />
|
<Compile Include="Screens\Select\SearchTextBox.cs" />
|
||||||
<Compile Include="Screens\Select\FooterButton.cs" />
|
<Compile Include="Screens\Select\FooterButton.cs" />
|
||||||
<Compile Include="Screens\Select\Footer.cs" />
|
<Compile Include="Screens\Select\Footer.cs" />
|
||||||
<Compile Include="Screens\Play\PauseOverlay.cs" />
|
|
||||||
<Compile Include="Screens\Play\Pause\PauseProgressBar.cs" />
|
<Compile Include="Screens\Play\Pause\PauseProgressBar.cs" />
|
||||||
<Compile Include="Screens\Play\Pause\PauseProgressGraph.cs" />
|
<Compile Include="Screens\Play\Pause\PauseProgressGraph.cs" />
|
||||||
<Compile Include="Screens\Play\Pause\ResumeButton.cs" />
|
|
||||||
<Compile Include="Screens\Play\Pause\RetryButton.cs" />
|
|
||||||
<Compile Include="Screens\Play\Pause\QuitButton.cs" />
|
|
||||||
<Compile Include="Overlays\Mods\ModSelectOverlay.cs" />
|
<Compile Include="Overlays\Mods\ModSelectOverlay.cs" />
|
||||||
<Compile Include="Modes\Mods\Mod.cs" />
|
<Compile Include="Modes\Mods\Mod.cs" />
|
||||||
<Compile Include="Overlays\Mods\ModButton.cs" />
|
<Compile Include="Overlays\Mods\ModButton.cs" />
|
||||||
@ -354,7 +348,7 @@
|
|||||||
<Compile Include="Overlays\Dialog\PopupDialog.cs" />
|
<Compile Include="Overlays\Dialog\PopupDialog.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\DialogButton.cs" />
|
<Compile Include="Graphics\UserInterface\DialogButton.cs" />
|
||||||
<Compile Include="Overlays\Dialog\PopupDialogButton.cs" />
|
<Compile Include="Overlays\Dialog\PopupDialogButton.cs" />
|
||||||
<Compile Include="Overlays\Dialog\PopupDialogOKButton.cs" />
|
<Compile Include="Overlays\Dialog\PopupDialogOkButton.cs" />
|
||||||
<Compile Include="Overlays\Dialog\PopupDialogCancelButton.cs" />
|
<Compile Include="Overlays\Dialog\PopupDialogCancelButton.cs" />
|
||||||
<Compile Include="Screens\Select\BeatmapDeleteDialog.cs" />
|
<Compile Include="Screens\Select\BeatmapDeleteDialog.cs" />
|
||||||
<Compile Include="Overlays\DialogOverlay.cs" />
|
<Compile Include="Overlays\DialogOverlay.cs" />
|
||||||
@ -371,7 +365,7 @@
|
|||||||
<Compile Include="Screens\Select\Leaderboards\DrawableRank.cs" />
|
<Compile Include="Screens\Select\Leaderboards\DrawableRank.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuTabControl.cs" />
|
<Compile Include="Graphics\UserInterface\OsuTabControl.cs" />
|
||||||
<Compile Include="Screens\Select\BeatmapDetailArea.cs" />
|
<Compile Include="Screens\Select\BeatmapDetailArea.cs" />
|
||||||
<Compile Include="Graphics\UserInterface\OsuTabControlCheckBox.cs" />
|
<Compile Include="Graphics\UserInterface\OsuTabControlCheckbox.cs" />
|
||||||
<Compile Include="Screens\Select\BeatmapDetailAreaTabControl.cs" />
|
<Compile Include="Screens\Select\BeatmapDetailAreaTabControl.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user