mirror of
https://github.com/ppy/osu
synced 2024-12-27 17:32:56 +00:00
Add toolbar button
This commit is contained in:
parent
e9c3f54307
commit
50c440de8d
@ -76,6 +76,8 @@ namespace osu.Game
|
||||
|
||||
private BeatmapSetOverlay beatmapSetOverlay;
|
||||
|
||||
private ChangelogOverlay changelogOverlay;
|
||||
|
||||
[Cached]
|
||||
private readonly ScreenshotManager screenshotManager = new ScreenshotManager();
|
||||
|
||||
@ -448,6 +450,7 @@ namespace osu.Game
|
||||
loadComponentSingleFile(settings = new MainSettings { GetToolbarHeight = () => ToolbarOffset }, leftFloatingOverlayContent.Add);
|
||||
loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add);
|
||||
loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add);
|
||||
loadComponentSingleFile(changelogOverlay = new ChangelogOverlay(), overlayContent.Add);
|
||||
|
||||
loadComponentSingleFile(loginOverlay = new LoginOverlay
|
||||
{
|
||||
@ -480,6 +483,7 @@ namespace osu.Game
|
||||
dependencies.Cache(notifications);
|
||||
dependencies.Cache(loginOverlay);
|
||||
dependencies.Cache(dialogOverlay);
|
||||
dependencies.Cache(changelogOverlay);
|
||||
dependencies.Cache(accountCreation);
|
||||
|
||||
chatOverlay.StateChanged += state => channelManager.HighPollRate.Value = state == Visibility.Visible;
|
||||
|
@ -69,6 +69,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
AutoSizeAxes = Axes.X,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ToolbarChangelogButton(),
|
||||
new ToolbarDirectButton(),
|
||||
new ToolbarChatButton(),
|
||||
new ToolbarSocialButton(),
|
||||
|
22
osu.Game/Overlays/Toolbar/ToolbarChangelogButton.cs
Normal file
22
osu.Game/Overlays/Toolbar/ToolbarChangelogButton.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 ToolbarChangelogButton : ToolbarOverlayToggleButton
|
||||
{
|
||||
public ToolbarChangelogButton()
|
||||
{
|
||||
SetIcon(FontAwesome.Solid.Bullhorn);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(ChangelogOverlay changelog)
|
||||
{
|
||||
StateContainer = changelog;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user