mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:07:29 +08:00
Expose tabs and hide beatmap select button in Header.
This commit is contained in:
parent
9989517ff0
commit
97b473ef30
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -26,18 +27,21 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
|||||||
private readonly Box tabStrip;
|
private readonly Box tabStrip;
|
||||||
private readonly UpdateableBeatmapSetCover cover;
|
private readonly UpdateableBeatmapSetCover cover;
|
||||||
|
|
||||||
public readonly OsuClickableContainer BeatmapButton;
|
public readonly PageTabControl<MatchHeaderPage> Tabs;
|
||||||
|
|
||||||
public BeatmapSetInfo BeatmapSet
|
public BeatmapSetInfo BeatmapSet
|
||||||
{
|
{
|
||||||
set { cover.BeatmapSet = value; }
|
set { cover.BeatmapSet = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Action OnWantsSelectBeatmap;
|
||||||
|
|
||||||
public Header()
|
public Header()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = HEIGHT;
|
Height = HEIGHT;
|
||||||
|
|
||||||
|
BeatmapSelectButton beatmapButton;
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
cover = new UpdateableBeatmapSetCover
|
cover = new UpdateableBeatmapSetCover
|
||||||
@ -70,12 +74,12 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
|||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Width = 200,
|
Width = 200,
|
||||||
Padding = new MarginPadding { Vertical = 5 },
|
Padding = new MarginPadding { Vertical = 5 },
|
||||||
Child = BeatmapButton = new BeatmapSelectButton
|
Child = beatmapButton = new BeatmapSelectButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
new PageTabControl<MatchHeaderPage>
|
Tabs = new PageTabControl<MatchHeaderPage>
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
@ -84,6 +88,8 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
beatmapButton.Action = () => OnWantsSelectBeatmap?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Screens.Multi.Screens.Match
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
header.BeatmapButton.Action = () => Push(new MatchSongSelect());
|
header.OnWantsSelectBeatmap = () => Push(new MatchSongSelect());
|
||||||
nameBind.ValueChanged += n => info.Name = n;
|
nameBind.ValueChanged += n => info.Name = n;
|
||||||
statusBind.ValueChanged += s => info.Status = s;
|
statusBind.ValueChanged += s => info.Status = s;
|
||||||
availabilityBind.ValueChanged += a => info.Availability = a;
|
availabilityBind.ValueChanged += a => info.Availability = a;
|
||||||
|
Loading…
Reference in New Issue
Block a user