mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 04:23:21 +08:00
Merge branch 'master' into disable-own-replays
This commit is contained in:
commit
b54c0176eb
@ -11,7 +11,7 @@
|
|||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
<AndroidApplication>True</AndroidApplication>
|
<AndroidApplication>True</AndroidApplication>
|
||||||
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
|
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
|
||||||
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
|
||||||
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
|
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
@ -52,7 +52,6 @@
|
|||||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)\osu.Android\lib\**\*.so">
|
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)\osu.Android\lib\**\*.so">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</AndroidNativeLibrary>
|
</AndroidNativeLibrary>
|
||||||
<Content Include="$(MSBuildThisFileDirectory)\osu.Android\bass.dll" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
@ -64,6 +63,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2019.703.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2019.704.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" package="ppy.osu.lazer" android:installLocation="auto" android:versionName="0.1.0">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" package="sh.ppy.osulazer" android:installLocation="auto" android:versionName="0.1.0">
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
Binary file not shown.
@ -14,6 +14,11 @@
|
|||||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||||
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a</AndroidSupportedAbis>
|
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a</AndroidSupportedAbis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<MandroidI18n>cjk;mideast;other;rare;west</MandroidI18n>
|
||||||
|
<AndroidDexTool>d8</AndroidDexTool>
|
||||||
|
<AndroidLinkTool>r8</AndroidLinkTool>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="OsuGameActivity.cs" />
|
<Compile Include="OsuGameActivity.cs" />
|
||||||
<Compile Include="OsuGameAndroid.cs" />
|
<Compile Include="OsuGameAndroid.cs" />
|
||||||
|
@ -129,7 +129,7 @@ namespace osu.Desktop.Updater
|
|||||||
Activated = () =>
|
Activated = () =>
|
||||||
{
|
{
|
||||||
updateManager.PrepareUpdateAsync()
|
updateManager.PrepareUpdateAsync()
|
||||||
.ContinueWith(_ => Schedule(() => game.GracefullyExit()));
|
.ContinueWith(_ => updateManager.Schedule(() => game.GracefullyExit()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Rulesets.Catch.Tests.Android" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Rulesets.Catch.Tests.Android" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
|
||||||
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!catch Test" />
|
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!catch Test" />
|
||||||
</manifest>
|
</manifest>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Rulesets.Mania.Tests.Android" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Rulesets.Mania.Tests.Android" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
|
||||||
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!mania Test" />
|
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!mania Test" />
|
||||||
</manifest>
|
</manifest>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Rulesets.Osu.Tests.Android" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Rulesets.Osu.Tests.Android" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
|
||||||
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!standard Test" />
|
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!standard Test" />
|
||||||
</manifest>
|
</manifest>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Rulesets.Taiko.Tests.Android" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Rulesets.Taiko.Tests.Android" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
|
||||||
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!taiko Test" />
|
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!taiko Test" />
|
||||||
</manifest>
|
</manifest>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Tests.Android" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="osu.Game.Tests.Android" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
|
||||||
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!visual Test" />
|
<application android:allowBackup="true" android:supportsRtl="true" android:label="osu!visual Test" />
|
||||||
</manifest>
|
</manifest>
|
@ -3,10 +3,8 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Rulesets;
|
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
@ -14,7 +12,6 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
public class TestSceneDirectOverlay : OsuTestScene
|
public class TestSceneDirectOverlay : OsuTestScene
|
||||||
{
|
{
|
||||||
private DirectOverlay direct;
|
private DirectOverlay direct;
|
||||||
private RulesetStore rulesets;
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
@ -25,18 +22,11 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
|
|
||||||
AddStep(@"toggle", direct.ToggleVisibility);
|
AddStep(@"toggle", direct.ToggleVisibility);
|
||||||
AddStep(@"result counts", () => direct.ResultAmounts = new DirectOverlay.ResultCounts(1, 4, 13));
|
AddStep(@"result counts", () => direct.ResultAmounts = new DirectOverlay.ResultCounts(1, 4, 13));
|
||||||
}
|
AddStep(@"trigger disabled", () => Ruleset.Disabled = !Ruleset.Disabled);
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(RulesetStore rulesets)
|
|
||||||
{
|
|
||||||
this.rulesets = rulesets;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void newBeatmaps()
|
private void newBeatmaps()
|
||||||
{
|
{
|
||||||
var ruleset = rulesets.GetRuleset(0);
|
|
||||||
|
|
||||||
direct.BeatmapSets = new[]
|
direct.BeatmapSets = new[]
|
||||||
{
|
{
|
||||||
new BeatmapSetInfo
|
new BeatmapSetInfo
|
||||||
@ -65,7 +55,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 5.35f,
|
StarDifficulty = 5.35f,
|
||||||
Metadata = new BeatmapMetadata(),
|
Metadata = new BeatmapMetadata(),
|
||||||
},
|
},
|
||||||
@ -97,7 +87,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 5.81f,
|
StarDifficulty = 5.81f,
|
||||||
Metadata = new BeatmapMetadata(),
|
Metadata = new BeatmapMetadata(),
|
||||||
},
|
},
|
||||||
@ -129,23 +119,23 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 0.9f,
|
StarDifficulty = 0.9f,
|
||||||
Metadata = new BeatmapMetadata(),
|
Metadata = new BeatmapMetadata(),
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 1.1f,
|
StarDifficulty = 1.1f,
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 2.02f,
|
StarDifficulty = 2.02f,
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 3.49f,
|
StarDifficulty = 3.49f,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -176,43 +166,43 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 1.26f,
|
StarDifficulty = 1.26f,
|
||||||
Metadata = new BeatmapMetadata(),
|
Metadata = new BeatmapMetadata(),
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 2.01f,
|
StarDifficulty = 2.01f,
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 2.87f,
|
StarDifficulty = 2.87f,
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 3.76f,
|
StarDifficulty = 3.76f,
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 3.93f,
|
StarDifficulty = 3.93f,
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 4.37f,
|
StarDifficulty = 4.37f,
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 5.13f,
|
StarDifficulty = 5.13f,
|
||||||
},
|
},
|
||||||
new BeatmapInfo
|
new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = ruleset,
|
Ruleset = Ruleset.Value,
|
||||||
StarDifficulty = 5.42f,
|
StarDifficulty = 5.42f,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -176,6 +176,8 @@ namespace osu.Game.Beatmaps
|
|||||||
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
|
if (beatmapInfo?.BeatmapSet == null || beatmapInfo == DefaultBeatmap?.BeatmapInfo)
|
||||||
return DefaultBeatmap;
|
return DefaultBeatmap;
|
||||||
|
|
||||||
|
lock (workingCache)
|
||||||
|
{
|
||||||
var cached = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
var cached = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
||||||
|
|
||||||
if (cached != null)
|
if (cached != null)
|
||||||
@ -191,6 +193,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
return working;
|
return working;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Perform a lookup query on available <see cref="BeatmapSetInfo"/>s.
|
/// Perform a lookup query on available <see cref="BeatmapSetInfo"/>s.
|
||||||
|
@ -114,6 +114,7 @@ namespace osu.Game.Database
|
|||||||
|
|
||||||
lock (imported)
|
lock (imported)
|
||||||
{
|
{
|
||||||
|
if (model != null)
|
||||||
imported.Add(model);
|
imported.Add(model);
|
||||||
current++;
|
current++;
|
||||||
|
|
||||||
@ -140,7 +141,7 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
notification.CompletionText = imported.Count == 1
|
notification.CompletionText = imported.Count == 1
|
||||||
? $"Imported {imported.First()}!"
|
? $"Imported {imported.First()}!"
|
||||||
: $"Imported {current} {HumanisedModelName}s!";
|
: $"Imported {imported.Count} {HumanisedModelName}s!";
|
||||||
|
|
||||||
if (imported.Count > 0 && PresentImport != null)
|
if (imported.Count > 0 && PresentImport != null)
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ using osu.Game.Overlays;
|
|||||||
|
|
||||||
namespace osu.Game.Graphics.Containers
|
namespace osu.Game.Graphics.Containers
|
||||||
{
|
{
|
||||||
public class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrackOwner, IKeyBindingHandler<GlobalAction>
|
public abstract class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrackOwner, IKeyBindingHandler<GlobalAction>
|
||||||
{
|
{
|
||||||
private SampleChannel samplePopIn;
|
private SampleChannel samplePopIn;
|
||||||
private SampleChannel samplePopOut;
|
private SampleChannel samplePopOut;
|
||||||
|
@ -29,6 +29,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
protected override Container<Drawable> Content => contentContainer;
|
protected override Container<Drawable> Content => contentContainer;
|
||||||
|
|
||||||
|
protected override bool StartHidden => true;
|
||||||
|
|
||||||
public Color4 FirstWaveColour
|
public Color4 FirstWaveColour
|
||||||
{
|
{
|
||||||
get => firstWave.Colour;
|
get => firstWave.Colour;
|
||||||
@ -95,6 +97,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
AddInternal(contentContainer = new Container
|
AddInternal(contentContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
RelativePositionAxes = Axes.Both,
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomCentre,
|
Origin = Anchor.BottomCentre,
|
||||||
});
|
});
|
||||||
@ -105,21 +108,15 @@ namespace osu.Game.Graphics.Containers
|
|||||||
foreach (var w in wavesContainer.Children)
|
foreach (var w in wavesContainer.Children)
|
||||||
w.Show();
|
w.Show();
|
||||||
|
|
||||||
this.FadeIn(100, Easing.OutQuint);
|
|
||||||
contentContainer.MoveToY(0, APPEAR_DURATION, Easing.OutQuint);
|
contentContainer.MoveToY(0, APPEAR_DURATION, Easing.OutQuint);
|
||||||
|
|
||||||
this.FadeIn(100, Easing.OutQuint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint);
|
|
||||||
contentContainer.MoveToY(DrawHeight * 2f, DISAPPEAR_DURATION, Easing.In);
|
|
||||||
|
|
||||||
foreach (var w in wavesContainer.Children)
|
foreach (var w in wavesContainer.Children)
|
||||||
w.Hide();
|
w.Hide();
|
||||||
|
|
||||||
this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint);
|
contentContainer.MoveToY(2, DISAPPEAR_DURATION, Easing.In);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateAfterChildren()
|
protected override void UpdateAfterChildren()
|
||||||
@ -128,7 +125,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
// This is done as an optimization, such that invisible parts of the waves
|
// This is done as an optimization, such that invisible parts of the waves
|
||||||
// are masked away, and thus do not consume fill rate.
|
// are masked away, and thus do not consume fill rate.
|
||||||
wavesContainer.Height = Math.Max(0, DrawHeight - (contentContainer.DrawHeight - contentContainer.Y));
|
// todo: revert https://github.com/ppy/osu/commit/aff9e3617da0c8fe252169fae287e39b44575b5e after FTB is fixed on iOS.
|
||||||
|
wavesContainer.Height = Math.Max(0, DrawHeight - (contentContainer.DrawHeight - contentContainer.Y * DrawHeight));
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Wave : VisibilityContainer
|
private class Wave : VisibilityContainer
|
||||||
|
@ -37,6 +37,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
text.Colour = AccentColour;
|
text.Colour = AccentColour;
|
||||||
icon.Colour = AccentColour;
|
icon.Colour = AccentColour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateFade();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,39 +50,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
private const float transition_length = 500;
|
private const float transition_length = 500;
|
||||||
|
|
||||||
private void fadeIn()
|
|
||||||
{
|
|
||||||
box.FadeIn(transition_length, Easing.OutQuint);
|
|
||||||
text.FadeColour(Color4.White, transition_length, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void fadeOut()
|
|
||||||
{
|
|
||||||
box.FadeOut(transition_length, Easing.OutQuint);
|
|
||||||
text.FadeColour(AccentColour, transition_length, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
|
||||||
{
|
|
||||||
fadeIn();
|
|
||||||
return base.OnHover(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
|
||||||
{
|
|
||||||
if (!Current.Value)
|
|
||||||
fadeOut();
|
|
||||||
|
|
||||||
base.OnHoverLost(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OsuColour colours)
|
|
||||||
{
|
|
||||||
if (accentColour == null)
|
|
||||||
AccentColour = colours.Blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public OsuTabControlCheckbox()
|
public OsuTabControlCheckbox()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
@ -115,19 +84,34 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Current.ValueChanged += selected =>
|
Current.ValueChanged += selected => { icon.Icon = selected.NewValue ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.Circle; };
|
||||||
{
|
|
||||||
if (selected.NewValue)
|
|
||||||
{
|
|
||||||
fadeIn();
|
|
||||||
icon.Icon = FontAwesome.Regular.CheckCircle;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
fadeOut();
|
if (accentColour == null)
|
||||||
icon.Icon = FontAwesome.Regular.Circle;
|
AccentColour = colours.Blue;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
protected override bool OnHover(HoverEvent e)
|
||||||
|
{
|
||||||
|
updateFade();
|
||||||
|
return base.OnHover(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
|
{
|
||||||
|
if (!Current.Value)
|
||||||
|
updateFade();
|
||||||
|
|
||||||
|
base.OnHoverLost(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateFade()
|
||||||
|
{
|
||||||
|
box.FadeTo(IsHovered ? 1 : 0, transition_length, Easing.OutQuint);
|
||||||
|
text.FadeColour(IsHovered ? Color4.White : AccentColour, transition_length, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,10 @@ namespace osu.Game.Online.API.Requests
|
|||||||
private void onSuccess(APILegacyScores r)
|
private void onSuccess(APILegacyScores r)
|
||||||
{
|
{
|
||||||
foreach (APILegacyScoreInfo score in r.Scores)
|
foreach (APILegacyScoreInfo score in r.Scores)
|
||||||
|
{
|
||||||
score.Beatmap = beatmap;
|
score.Beatmap = beatmap;
|
||||||
|
score.Ruleset = ruleset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override WebRequest CreateWebRequest()
|
protected override WebRequest CreateWebRequest()
|
||||||
|
@ -116,17 +116,6 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
[JsonProperty(@"mods")]
|
[JsonProperty(@"mods")]
|
||||||
private string[] modStrings { get; set; }
|
private string[] modStrings { get; set; }
|
||||||
|
|
||||||
public override BeatmapInfo Beatmap
|
|
||||||
{
|
|
||||||
get => base.Beatmap;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
base.Beatmap = value;
|
|
||||||
if (Beatmap.Ruleset != null)
|
|
||||||
Ruleset = value.Ruleset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override RulesetInfo Ruleset
|
public override RulesetInfo Ruleset
|
||||||
{
|
{
|
||||||
get => base.Ruleset;
|
get => base.Ruleset;
|
||||||
|
@ -11,7 +11,7 @@ using osu.Game.Online.API;
|
|||||||
namespace osu.Game.Online
|
namespace osu.Game.Online
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A component which tracks a beatmap through potential download/import/deletion.
|
/// A component which tracks a <see cref="TModel"/> through potential download/import/deletion.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class DownloadTrackingComposite<TModel, TModelManager> : CompositeDrawable
|
public abstract class DownloadTrackingComposite<TModel, TModelManager> : CompositeDrawable
|
||||||
where TModel : class, IEquatable<TModel>
|
where TModel : class, IEquatable<TModel>
|
||||||
@ -22,7 +22,7 @@ namespace osu.Game.Online
|
|||||||
private TModelManager manager;
|
private TModelManager manager;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Holds the current download state of the beatmap, whether is has already been downloaded, is in progress, or is not downloaded.
|
/// Holds the current download state of the <see cref="TModel"/>, whether is has already been downloaded, is in progress, or is not downloaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected readonly Bindable<DownloadState> State = new Bindable<DownloadState>();
|
protected readonly Bindable<DownloadState> State = new Bindable<DownloadState>();
|
||||||
|
|
||||||
|
@ -231,12 +231,6 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
if (getScoresRequest == null)
|
if (getScoresRequest == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (api?.IsLoggedIn != true)
|
|
||||||
{
|
|
||||||
PlaceholderState = PlaceholderState.NotLoggedIn;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
getScoresRequest.Failure += e => Schedule(() =>
|
getScoresRequest.Failure += e => Schedule(() =>
|
||||||
{
|
{
|
||||||
if (e is OperationCanceledException)
|
if (e is OperationCanceledException)
|
||||||
|
88
osu.Game/Overlays/Direct/DirectRulesetSelector.cs
Normal file
88
osu.Game/Overlays/Direct/DirectRulesetSelector.cs
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Overlays.Direct
|
||||||
|
{
|
||||||
|
public class DirectRulesetSelector : RulesetSelector
|
||||||
|
{
|
||||||
|
public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput;
|
||||||
|
|
||||||
|
public override bool HandlePositionalInput => !Current.Disabled && base.HandlePositionalInput;
|
||||||
|
|
||||||
|
public override bool PropagatePositionalInputSubTree => !Current.Disabled && base.PropagatePositionalInputSubTree;
|
||||||
|
|
||||||
|
public DirectRulesetSelector()
|
||||||
|
{
|
||||||
|
TabContainer.Masking = false;
|
||||||
|
TabContainer.Spacing = new Vector2(10, 0);
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Current.DisabledChanged += value => SelectedTab.FadeColour(value ? Color4.DarkGray : Color4.White, 200, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override TabItem<RulesetInfo> CreateTabItem(RulesetInfo value) => new DirectRulesetTabItem(value);
|
||||||
|
|
||||||
|
protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer
|
||||||
|
{
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
};
|
||||||
|
|
||||||
|
private class DirectRulesetTabItem : TabItem<RulesetInfo>
|
||||||
|
{
|
||||||
|
private readonly ConstrainedIconContainer iconContainer;
|
||||||
|
|
||||||
|
public DirectRulesetTabItem(RulesetInfo value)
|
||||||
|
: base(value)
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
iconContainer = new ConstrainedIconContainer
|
||||||
|
{
|
||||||
|
Icon = value.CreateInstance().CreateIcon(),
|
||||||
|
Size = new Vector2(32),
|
||||||
|
},
|
||||||
|
new HoverClickSounds()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
updateState();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnHover(HoverEvent e)
|
||||||
|
{
|
||||||
|
base.OnHover(e);
|
||||||
|
updateState();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
|
{
|
||||||
|
base.OnHoverLost(e);
|
||||||
|
updateState();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnActivated() => updateState();
|
||||||
|
|
||||||
|
protected override void OnDeactivated() => updateState();
|
||||||
|
|
||||||
|
private void updateState() => iconContainer.FadeColour(IsHovered || Active.Value ? Color4.White : Color4.Gray, 120, Easing.InQuad);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,105 +4,30 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Overlays.SearchableList;
|
using osu.Game.Overlays.SearchableList;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osuTK;
|
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Direct
|
namespace osu.Game.Overlays.Direct
|
||||||
{
|
{
|
||||||
public class FilterControl : SearchableListFilterControl<DirectSortCriteria, BeatmapSearchCategory>
|
public class FilterControl : SearchableListFilterControl<DirectSortCriteria, BeatmapSearchCategory>
|
||||||
{
|
{
|
||||||
public readonly Bindable<RulesetInfo> Ruleset = new Bindable<RulesetInfo>();
|
private DirectRulesetSelector rulesetSelector;
|
||||||
private FillFlowContainer<RulesetToggleButton> modeButtons;
|
|
||||||
|
|
||||||
protected override Color4 BackgroundColour => OsuColour.FromHex(@"384552");
|
protected override Color4 BackgroundColour => OsuColour.FromHex(@"384552");
|
||||||
protected override DirectSortCriteria DefaultTab => DirectSortCriteria.Ranked;
|
protected override DirectSortCriteria DefaultTab => DirectSortCriteria.Ranked;
|
||||||
|
|
||||||
protected override Drawable CreateSupplementaryControls()
|
protected override Drawable CreateSupplementaryControls() => rulesetSelector = new DirectRulesetSelector();
|
||||||
{
|
|
||||||
modeButtons = new FillFlowContainer<RulesetToggleButton>
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Spacing = new Vector2(10f, 0f),
|
|
||||||
};
|
|
||||||
|
|
||||||
return modeButtons;
|
public Bindable<RulesetInfo> Ruleset => rulesetSelector.Current;
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(RulesetStore rulesets, OsuColour colours, Bindable<RulesetInfo> ruleset)
|
private void load(OsuColour colours, Bindable<RulesetInfo> ruleset)
|
||||||
{
|
{
|
||||||
DisplayStyleControl.Dropdown.AccentColour = colours.BlueDark;
|
DisplayStyleControl.Dropdown.AccentColour = colours.BlueDark;
|
||||||
|
rulesetSelector.Current.BindTo(ruleset);
|
||||||
Ruleset.Value = ruleset.Value ?? rulesets.GetRuleset(0);
|
|
||||||
foreach (var r in rulesets.AvailableRulesets)
|
|
||||||
modeButtons.Add(new RulesetToggleButton(Ruleset, r));
|
|
||||||
}
|
|
||||||
|
|
||||||
private class RulesetToggleButton : OsuClickableContainer
|
|
||||||
{
|
|
||||||
private Drawable icon
|
|
||||||
{
|
|
||||||
get => iconContainer.Icon;
|
|
||||||
set => iconContainer.Icon = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private RulesetInfo ruleset;
|
|
||||||
|
|
||||||
public RulesetInfo Ruleset
|
|
||||||
{
|
|
||||||
get => ruleset;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
ruleset = value;
|
|
||||||
icon = Ruleset.CreateInstance().CreateIcon();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly Bindable<RulesetInfo> bindable;
|
|
||||||
|
|
||||||
private readonly ConstrainedIconContainer iconContainer;
|
|
||||||
|
|
||||||
private void Bindable_ValueChanged(ValueChangedEvent<RulesetInfo> e)
|
|
||||||
{
|
|
||||||
iconContainer.FadeTo(Ruleset.ID == e.NewValue?.ID ? 1f : 0.5f, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool HandleNonPositionalInput => !bindable.Disabled && base.HandleNonPositionalInput;
|
|
||||||
public override bool HandlePositionalInput => !bindable.Disabled && base.HandlePositionalInput;
|
|
||||||
|
|
||||||
public RulesetToggleButton(Bindable<RulesetInfo> bindable, RulesetInfo ruleset)
|
|
||||||
{
|
|
||||||
this.bindable = bindable;
|
|
||||||
AutoSizeAxes = Axes.Both;
|
|
||||||
|
|
||||||
Children = new[]
|
|
||||||
{
|
|
||||||
iconContainer = new ConstrainedIconContainer
|
|
||||||
{
|
|
||||||
Origin = Anchor.TopLeft,
|
|
||||||
Anchor = Anchor.TopLeft,
|
|
||||||
Size = new Vector2(32),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Ruleset = ruleset;
|
|
||||||
bindable.ValueChanged += Bindable_ValueChanged;
|
|
||||||
Bindable_ValueChanged(new ValueChangedEvent<RulesetInfo>(bindable.Value, bindable.Value));
|
|
||||||
Action = () => bindable.Value = Ruleset;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
|
||||||
{
|
|
||||||
if (bindable != null)
|
|
||||||
bindable.ValueChanged -= Bindable_ValueChanged;
|
|
||||||
base.Dispose(isDisposing);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Overlays
|
|||||||
protected override bool BlockNonPositionalInput => true;
|
protected override bool BlockNonPositionalInput => true;
|
||||||
protected override Container<Drawable> Content => Waves;
|
protected override Container<Drawable> Content => Waves;
|
||||||
|
|
||||||
|
protected override bool StartHidden => true;
|
||||||
|
|
||||||
protected WaveOverlayContainer()
|
protected WaveOverlayContainer()
|
||||||
{
|
{
|
||||||
AddInternal(Waves = new WaveContainer
|
AddInternal(Waves = new WaveContainer
|
||||||
@ -25,13 +27,17 @@ namespace osu.Game.Overlays
|
|||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
|
||||||
Waves.Show();
|
Waves.Show();
|
||||||
|
this.FadeIn(100, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
|
||||||
Waves.Hide();
|
Waves.Hide();
|
||||||
|
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,13 +33,18 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBlack();
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBlack();
|
||||||
|
|
||||||
|
private readonly BindableDouble exitingVolumeFade = new BindableDouble(1);
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private AudioManager audio { get; set; }
|
||||||
|
|
||||||
private Bindable<bool> menuVoice;
|
private Bindable<bool> menuVoice;
|
||||||
private Bindable<bool> menuMusic;
|
private Bindable<bool> menuMusic;
|
||||||
private Track track;
|
private Track track;
|
||||||
private WorkingBeatmap introBeatmap;
|
private WorkingBeatmap introBeatmap;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
private void load(OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
||||||
{
|
{
|
||||||
menuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
|
menuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
|
||||||
menuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
|
menuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
|
||||||
@ -161,7 +166,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
else
|
else
|
||||||
fadeOutTime = 500;
|
fadeOutTime = 500;
|
||||||
|
|
||||||
Scheduler.AddDelayed(this.Exit, fadeOutTime);
|
audio.AddAdjustment(AdjustableProperty.Volume, exitingVolumeFade);
|
||||||
|
this.TransformBindableTo(exitingVolumeFade, 0, fadeOutTime).OnComplete(_ => this.Exit());
|
||||||
|
|
||||||
//don't want to fade out completely else we will stop running updates.
|
//don't want to fade out completely else we will stop running updates.
|
||||||
Game.FadeTo(0.01f, fadeOutTime);
|
Game.FadeTo(0.01f, fadeOutTime);
|
||||||
|
@ -131,7 +131,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
Scheduler.AddDelayed(updateAmplitudes, time_between_updates, true);
|
var delayed = Scheduler.AddDelayed(updateAmplitudes, time_between_updates, true);
|
||||||
|
delayed.PerformRepeatCatchUpExecutions = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using osu.Framework.Screens;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
|
||||||
{
|
|
||||||
public class EditSongSelect : SongSelect
|
|
||||||
{
|
|
||||||
protected override bool ShowFooter => false;
|
|
||||||
|
|
||||||
protected override bool OnStart()
|
|
||||||
{
|
|
||||||
this.Exit();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -55,11 +55,19 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
{
|
{
|
||||||
if (Scope == BeatmapLeaderboardScope.Local)
|
if (Scope == BeatmapLeaderboardScope.Local)
|
||||||
{
|
{
|
||||||
Scores = scoreManager.QueryScores(s => !s.DeletePending && s.Beatmap.ID == Beatmap.ID).OrderByDescending(s => s.TotalScore).ToArray();
|
Scores = scoreManager
|
||||||
|
.QueryScores(s => !s.DeletePending && s.Beatmap.ID == Beatmap.ID && s.Ruleset.ID == ruleset.Value.ID)
|
||||||
|
.OrderByDescending(s => s.TotalScore).ToArray();
|
||||||
PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores;
|
PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (api?.IsLoggedIn != true)
|
||||||
|
{
|
||||||
|
PlaceholderState = PlaceholderState.NotLoggedIn;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (Beatmap?.OnlineBeatmapID == null)
|
if (Beatmap?.OnlineBeatmapID == null)
|
||||||
{
|
{
|
||||||
PlaceholderState = PlaceholderState.Unavailable;
|
PlaceholderState = PlaceholderState.Unavailable;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.4" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2019.703.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2019.704.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.23.0" />
|
<PackageReference Include="SharpCompress" Version="0.23.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
|
@ -105,8 +105,8 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.702.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2019.703.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2019.704.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.703.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2019.704.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
<PackageReference Include="SharpCompress" Version="0.22.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||||
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
<PackageReference Include="SharpRaven" Version="2.4.0" />
|
||||||
|
Loading…
Reference in New Issue
Block a user