mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 05:42:54 +08:00
56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
// 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 System;
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Bindables;
|
|
using osu.Framework.Extensions.Color4Extensions;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Framework.Graphics.Shapes;
|
|
using osu.Game.Graphics;
|
|
using osu.Game.Online.Rooms;
|
|
using osuTK;
|
|
|
|
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|
{
|
|
public class MultiplayerMatchFooter : CompositeDrawable
|
|
{
|
|
public const float HEIGHT = 50;
|
|
|
|
public readonly Bindable<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>();
|
|
|
|
public Action OnReadyClick
|
|
{
|
|
set => readyButton.OnReadyClick = value;
|
|
}
|
|
|
|
private readonly Drawable background;
|
|
private readonly MultiplayerReadyButton readyButton;
|
|
|
|
public MultiplayerMatchFooter()
|
|
{
|
|
RelativeSizeAxes = Axes.X;
|
|
Height = HEIGHT;
|
|
|
|
InternalChildren = new[]
|
|
{
|
|
background = new Box { RelativeSizeAxes = Axes.Both },
|
|
readyButton = new MultiplayerReadyButton
|
|
{
|
|
Anchor = Anchor.Centre,
|
|
Origin = Anchor.Centre,
|
|
Size = new Vector2(600, 50),
|
|
SelectedItem = { BindTarget = SelectedItem }
|
|
}
|
|
};
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load(OsuColour colours)
|
|
{
|
|
background.Colour = Color4Extensions.FromHex(@"28242d");
|
|
}
|
|
}
|
|
}
|