mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:33:21 +08:00
Add chat toggle button.
This commit is contained in:
parent
c7246fd2ac
commit
093abd6872
@ -194,6 +194,7 @@ namespace osu.Game
|
||||
};
|
||||
|
||||
Dependencies.Cache(options);
|
||||
Dependencies.Cache(chat);
|
||||
Dependencies.Cache(musicController);
|
||||
Dependencies.Cache(notificationManager);
|
||||
Dependencies.Cache(dialogOverlay);
|
||||
|
@ -72,6 +72,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
AutoSizeAxes = Axes.X,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ToolbarChatButton(),
|
||||
new ToolbarMusicButton(),
|
||||
new ToolbarButton
|
||||
{
|
||||
|
23
osu.Game/Overlays/Toolbar/ToolbarChatButton.cs
Normal file
23
osu.Game/Overlays/Toolbar/ToolbarChatButton.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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" />
|
||||
|
Loading…
Reference in New Issue
Block a user