1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 17:13:06 +08:00

Add chat toggle button.

This commit is contained in:
Dean Herbert 2017-04-19 19:54:03 +09:00
parent c7246fd2ac
commit 093abd6872
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
4 changed files with 26 additions and 0 deletions

View File

@ -194,6 +194,7 @@ namespace osu.Game
};
Dependencies.Cache(options);
Dependencies.Cache(chat);
Dependencies.Cache(musicController);
Dependencies.Cache(notificationManager);
Dependencies.Cache(dialogOverlay);

View File

@ -72,6 +72,7 @@ namespace osu.Game.Overlays.Toolbar
AutoSizeAxes = Axes.X,
Children = new Drawable[]
{
new ToolbarChatButton(),
new ToolbarMusicButton(),
new ToolbarButton
{

View File

@ -0,0 +1,23 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarChatButton : ToolbarOverlayToggleButton
{
public ToolbarChatButton()
{
Icon = FontAwesome.fa_comments;
}
[BackgroundDependencyLoader]
private void load(ChatOverlay chat)
{
StateContainer = chat;
Action = chat.ToggleVisibility;
}
}
}

View File

@ -73,6 +73,7 @@
<Compile Include="Beatmaps\Drawables\BeatmapBackgroundSprite.cs" />
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
<Compile Include="Online\API\Requests\PostMessageRequest.cs" />
<Compile Include="Overlays\Toolbar\ToolbarChatButton.cs" />
<Compile Include="Rulesets\Beatmaps\BeatmapConverter.cs" />
<Compile Include="Rulesets\Beatmaps\BeatmapProcessor.cs" />
<Compile Include="Beatmaps\Legacy\LegacyBeatmap.cs" />