mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Add match footer
This commit is contained in:
parent
d0b7b7f53a
commit
929eb4f035
@ -11,7 +11,6 @@ using osu.Game.Online.Multiplayer;
|
|||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Multi.Match;
|
using osu.Game.Screens.Multi.Match;
|
||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Screens.Select;
|
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Multiplayer
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
|
53
osu.Game/Screens/Multi/Match/Components/Footer.cs
Normal file
53
osu.Game/Screens/Multi/Match/Components/Footer.cs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
// 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.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online.Multiplayer;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
|
{
|
||||||
|
public class Footer : CompositeDrawable
|
||||||
|
{
|
||||||
|
public const float HEIGHT = 100;
|
||||||
|
|
||||||
|
public Action OnStart;
|
||||||
|
public readonly Bindable<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>();
|
||||||
|
|
||||||
|
private readonly Drawable background;
|
||||||
|
private readonly OsuButton startButton;
|
||||||
|
|
||||||
|
public Footer()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
Height = HEIGHT;
|
||||||
|
|
||||||
|
InternalChildren = new[]
|
||||||
|
{
|
||||||
|
background = new Box { RelativeSizeAxes = Axes.Both },
|
||||||
|
startButton = new ReadyButton
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Size = new Vector2(600, 50),
|
||||||
|
SelectedItem = { BindTarget = SelectedItem },
|
||||||
|
Action = () => OnStart?.Invoke()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
background.Colour = OsuColour.FromHex(@"28242d");
|
||||||
|
startButton.BackgroundColour = colours.Green;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user