1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Merge branch 'master' into use-loading-inbeatmap-listing

This commit is contained in:
Dean Herbert 2020-02-21 19:59:04 +09:00 committed by GitHub
commit 22a28751d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 38 additions and 7 deletions

View File

@ -54,6 +54,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.221.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2020.218.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2020.221.0" />
</ItemGroup>
</Project>

View File

@ -598,6 +598,7 @@ namespace osu.Game
//overlay elements
loadComponentSingleFile(direct = new DirectOverlay(), overlayContent.Add, true);
loadComponentSingleFile(social = new SocialOverlay(), overlayContent.Add, true);
var rankingsOverlay = loadComponentSingleFile(new RankingsOverlay(), overlayContent.Add, true);
loadComponentSingleFile(channelManager = new ChannelManager(), AddInternal, true);
loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add, true);
loadComponentSingleFile(Settings = new SettingsOverlay { GetToolbarHeight = () => ToolbarOffset }, leftFloatingOverlayContent.Add, true);
@ -654,7 +655,7 @@ namespace osu.Game
}
// ensure only one of these overlays are open at once.
var singleDisplayOverlays = new OverlayContainer[] { chatOverlay, social, direct, changelogOverlay };
var singleDisplayOverlays = new OverlayContainer[] { chatOverlay, social, direct, changelogOverlay, rankingsOverlay };
foreach (var overlay in singleDisplayOverlays)
{

View File

@ -27,6 +27,8 @@ namespace osu.Game.Overlays.Rankings
protected override Drawable CreateContent() => countryFilter = new CountryFilter();
protected override Drawable CreateBackground() => new OverlayHeaderBackground(@"Headers/rankings");
private class RankingsTitle : ScreenTitle
{
public readonly Bindable<RankingsScope> Scope = new Bindable<RankingsScope>();

View File

@ -23,8 +23,6 @@ namespace osu.Game.Overlays
protected Bindable<RankingsScope> Scope => header.Current;
private Bindable<RulesetInfo> ruleset => header.Ruleset;
private readonly BasicScrollContainer scrollFlow;
private readonly Container contentContainer;
private readonly LoadingLayer loading;
@ -92,10 +90,15 @@ namespace osu.Game.Overlays
background.Colour = ColourProvider.Background5;
}
[Resolved]
private Bindable<RulesetInfo> ruleset { get; set; }
protected override void LoadComplete()
{
base.LoadComplete();
header.Ruleset.BindTo(ruleset);
Country.BindValueChanged(_ =>
{
// if a country is requested, force performance scope.
@ -121,6 +124,8 @@ namespace osu.Game.Overlays
Scheduler.AddOnce(loadNewContent);
});
Scheduler.AddOnce(loadNewContent);
}
public void ShowCountry(Country requested)

View File

@ -70,6 +70,7 @@ namespace osu.Game.Overlays.Toolbar
Children = new Drawable[]
{
new ToolbarChangelogButton(),
new ToolbarRankingsButton(),
new ToolbarDirectButton(),
new ToolbarChatButton(),
new ToolbarSocialButton(),

View File

@ -0,0 +1,22 @@
// 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.Allocation;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Overlays.Toolbar
{
public class ToolbarRankingsButton : ToolbarOverlayToggleButton
{
public ToolbarRankingsButton()
{
SetIcon(FontAwesome.Regular.ChartBar);
}
[BackgroundDependencyLoader(true)]
private void load(RankingsOverlay rankings)
{
StateContainer = rankings;
}
}
}

View File

@ -23,7 +23,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.221.0" />
<PackageReference Include="ppy.osu.Framework" Version="2020.218.0" />
<PackageReference Include="ppy.osu.Framework" Version="2020.221.0" />
<PackageReference Include="Sentry" Version="2.0.3" />
<PackageReference Include="SharpCompress" Version="0.24.0" />
<PackageReference Include="NUnit" Version="3.12.0" />

View File

@ -74,7 +74,7 @@
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="ppy.osu.Game.Resources" Version="2020.221.0" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2020.218.0" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2020.221.0" />
</ItemGroup>
<!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. -->
<ItemGroup Label="Transitive Dependencies">
@ -82,7 +82,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="ppy.osu.Framework" Version="2020.218.0" />
<PackageReference Include="ppy.osu.Framework" Version="2020.221.0" />
<PackageReference Include="SharpCompress" Version="0.24.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="SharpRaven" Version="2.4.0" />