mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:03:08 +08:00
Add toolbar button
This commit is contained in:
parent
e9c3f54307
commit
50c440de8d
@ -76,6 +76,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
private BeatmapSetOverlay beatmapSetOverlay;
|
private BeatmapSetOverlay beatmapSetOverlay;
|
||||||
|
|
||||||
|
private ChangelogOverlay changelogOverlay;
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
private readonly ScreenshotManager screenshotManager = new ScreenshotManager();
|
private readonly ScreenshotManager screenshotManager = new ScreenshotManager();
|
||||||
|
|
||||||
@ -448,6 +450,7 @@ namespace osu.Game
|
|||||||
loadComponentSingleFile(settings = new MainSettings { GetToolbarHeight = () => ToolbarOffset }, leftFloatingOverlayContent.Add);
|
loadComponentSingleFile(settings = new MainSettings { GetToolbarHeight = () => ToolbarOffset }, leftFloatingOverlayContent.Add);
|
||||||
loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add);
|
loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add);
|
||||||
loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add);
|
loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add);
|
||||||
|
loadComponentSingleFile(changelogOverlay = new ChangelogOverlay(), overlayContent.Add);
|
||||||
|
|
||||||
loadComponentSingleFile(loginOverlay = new LoginOverlay
|
loadComponentSingleFile(loginOverlay = new LoginOverlay
|
||||||
{
|
{
|
||||||
@ -480,6 +483,7 @@ namespace osu.Game
|
|||||||
dependencies.Cache(notifications);
|
dependencies.Cache(notifications);
|
||||||
dependencies.Cache(loginOverlay);
|
dependencies.Cache(loginOverlay);
|
||||||
dependencies.Cache(dialogOverlay);
|
dependencies.Cache(dialogOverlay);
|
||||||
|
dependencies.Cache(changelogOverlay);
|
||||||
dependencies.Cache(accountCreation);
|
dependencies.Cache(accountCreation);
|
||||||
|
|
||||||
chatOverlay.StateChanged += state => channelManager.HighPollRate.Value = state == Visibility.Visible;
|
chatOverlay.StateChanged += state => channelManager.HighPollRate.Value = state == Visibility.Visible;
|
||||||
|
@ -69,6 +69,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
AutoSizeAxes = Axes.X,
|
AutoSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
new ToolbarChangelogButton(),
|
||||||
new ToolbarDirectButton(),
|
new ToolbarDirectButton(),
|
||||||
new ToolbarChatButton(),
|
new ToolbarChatButton(),
|
||||||
new ToolbarSocialButton(),
|
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