mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Add rankings overlay to the game
This commit is contained in:
@ -65,6 +65,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
private DirectOverlay direct;
|
private DirectOverlay direct;
|
||||||
|
|
||||||
|
private RankingsOverlay rankings;
|
||||||
|
|
||||||
private SocialOverlay social;
|
private SocialOverlay social;
|
||||||
|
|
||||||
private UserProfileOverlay userProfile;
|
private UserProfileOverlay userProfile;
|
||||||
@ -600,6 +602,7 @@ namespace osu.Game
|
|||||||
//overlay elements
|
//overlay elements
|
||||||
loadComponentSingleFile(direct = new DirectOverlay(), overlayContent.Add, true);
|
loadComponentSingleFile(direct = new DirectOverlay(), overlayContent.Add, true);
|
||||||
loadComponentSingleFile(social = new SocialOverlay(), overlayContent.Add, true);
|
loadComponentSingleFile(social = new SocialOverlay(), overlayContent.Add, true);
|
||||||
|
loadComponentSingleFile(rankings = new RankingsOverlay(), overlayContent.Add, true);
|
||||||
loadComponentSingleFile(channelManager = new ChannelManager(), AddInternal, true);
|
loadComponentSingleFile(channelManager = new ChannelManager(), AddInternal, true);
|
||||||
loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add, true);
|
loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add, true);
|
||||||
loadComponentSingleFile(Settings = new SettingsOverlay { GetToolbarHeight = () => ToolbarOffset }, leftFloatingOverlayContent.Add, true);
|
loadComponentSingleFile(Settings = new SettingsOverlay { GetToolbarHeight = () => ToolbarOffset }, leftFloatingOverlayContent.Add, true);
|
||||||
@ -643,7 +646,7 @@ namespace osu.Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eventually informational overlays should be displayed in a stack, but for now let's only allow one to stay open at a time.
|
// eventually informational overlays should be displayed in a stack, but for now let's only allow one to stay open at a time.
|
||||||
var informationalOverlays = new OverlayContainer[] { beatmapSetOverlay, userProfile };
|
var informationalOverlays = new OverlayContainer[] { beatmapSetOverlay, userProfile, rankings };
|
||||||
|
|
||||||
foreach (var overlay in informationalOverlays)
|
foreach (var overlay in informationalOverlays)
|
||||||
{
|
{
|
||||||
|
@ -70,6 +70,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new ToolbarChangelogButton(),
|
new ToolbarChangelogButton(),
|
||||||
|
new ToolbarRankingsButton(),
|
||||||
new ToolbarDirectButton(),
|
new ToolbarDirectButton(),
|
||||||
new ToolbarChatButton(),
|
new ToolbarChatButton(),
|
||||||
new ToolbarSocialButton(),
|
new ToolbarSocialButton(),
|
||||||
|
22
osu.Game/Overlays/Toolbar/ToolbarRankingsButton.cs
Normal file
22
osu.Game/Overlays/Toolbar/ToolbarRankingsButton.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user