2020-02-14 19:35:52 +08:00
|
|
|
// 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;
|
2020-03-11 09:18:41 +08:00
|
|
|
using osu.Framework.Extensions.Color4Extensions;
|
2020-02-14 19:35:52 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
using osu.Game.Graphics;
|
2020-12-25 23:50:00 +08:00
|
|
|
using osu.Game.Screens.OnlinePlay.Playlists;
|
2020-02-14 19:35:52 +08:00
|
|
|
using osuTK;
|
|
|
|
|
2020-12-25 23:50:00 +08:00
|
|
|
namespace osu.Game.Screens.OnlinePlay.Match.Components
|
2020-02-14 19:35:52 +08:00
|
|
|
{
|
|
|
|
public class Footer : CompositeDrawable
|
|
|
|
{
|
2020-07-07 16:38:42 +08:00
|
|
|
public const float HEIGHT = 50;
|
2020-02-14 19:35:52 +08:00
|
|
|
|
|
|
|
public Action OnStart;
|
|
|
|
|
|
|
|
private readonly Drawable background;
|
|
|
|
|
|
|
|
public Footer()
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X;
|
|
|
|
Height = HEIGHT;
|
|
|
|
|
|
|
|
InternalChildren = new[]
|
|
|
|
{
|
|
|
|
background = new Box { RelativeSizeAxes = Axes.Both },
|
2020-12-25 12:11:21 +08:00
|
|
|
new PlaylistsReadyButton
|
2020-02-14 19:35:52 +08:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Size = new Vector2(600, 50),
|
|
|
|
Action = () => OnStart?.Invoke()
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
{
|
2020-03-11 09:18:41 +08:00
|
|
|
background.Colour = Color4Extensions.FromHex(@"28242d");
|
2020-02-14 19:35:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|