1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-13 02:07:45 +08:00

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
2.0 KiB
C#
Raw Normal View History

// 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 osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
{
2020-12-25 13:38:11 +09:00
public partial class MultiplayerMatchFooter : CompositeDrawable
{
2021-04-07 17:35:18 +09:00
private const float ready_button_width = 600;
private const float spectate_button_width = 200;
public required Bindable<PlaylistItem?> SelectedItem
{
get => selectedItem;
set => selectedItem.Current = value;
}
private readonly BindableWithCurrent<PlaylistItem?> selectedItem = new BindableWithCurrent<PlaylistItem?>();
2020-12-25 13:38:11 +09:00
public MultiplayerMatchFooter()
{
2021-08-18 20:21:29 +09:00
RelativeSizeAxes = Axes.Both;
2021-08-18 20:21:29 +09:00
InternalChild = new GridContainer
{
2021-08-18 20:21:29 +09:00
RelativeSizeAxes = Axes.Both,
Content = new[]
{
new Drawable?[]
2021-04-07 17:35:18 +09:00
{
2021-08-18 20:21:29 +09:00
null,
new MultiplayerSpectateButton
2021-04-07 17:35:18 +09:00
{
2021-08-18 20:21:29 +09:00
RelativeSizeAxes = Axes.Both,
SelectedItem = selectedItem
2021-08-18 20:21:29 +09:00
},
null,
2022-03-23 10:37:53 +09:00
new MatchStartControl
2021-08-18 20:21:29 +09:00
{
RelativeSizeAxes = Axes.Both,
SelectedItem = selectedItem
2021-08-18 20:21:29 +09:00
},
null
2021-04-07 17:35:18 +09:00
}
2021-08-18 20:21:29 +09:00
},
ColumnDimensions = new[]
{
new Dimension(),
new Dimension(maxSize: spectate_button_width),
new Dimension(GridSizeMode.Absolute, 5),
2021-08-18 20:21:29 +09:00
new Dimension(maxSize: ready_button_width),
new Dimension()
}
};
}
}
}