2019-01-24 16:43:03 +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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-11-17 17:26:13 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
2017-11-18 13:24:09 +08:00
|
|
|
|
using osu.Framework.Audio.Track;
|
2019-02-21 18:04:31 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
2017-11-17 17:26:13 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
2017-11-17 18:35:41 +08:00
|
|
|
|
using osu.Game.Beatmaps;
|
2022-05-25 22:17:52 +08:00
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-11-17 17:26:13 +08:00
|
|
|
|
namespace osu.Game.Screens.Edit.Components
|
|
|
|
|
{
|
|
|
|
|
public class BottomBarContainer : Container
|
|
|
|
|
{
|
|
|
|
|
private const float contents_padding = 15;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2018-05-23 16:37:39 +08:00
|
|
|
|
protected readonly IBindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
2020-09-24 18:01:28 +08:00
|
|
|
|
|
|
|
|
|
protected readonly IBindable<Track> Track = new Bindable<Track>();
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2022-05-25 22:17:52 +08:00
|
|
|
|
protected readonly Drawable Background;
|
2017-11-17 17:26:13 +08:00
|
|
|
|
private readonly Container content;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-11-17 17:26:13 +08:00
|
|
|
|
protected override Container<Drawable> Content => content;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-11-17 17:26:13 +08:00
|
|
|
|
public BottomBarContainer()
|
|
|
|
|
{
|
|
|
|
|
Masking = true;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-11-17 17:26:13 +08:00
|
|
|
|
InternalChildren = new[]
|
|
|
|
|
{
|
2022-05-25 22:17:52 +08:00
|
|
|
|
Background = new Box
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Colour = Color4.Transparent,
|
|
|
|
|
},
|
2017-11-17 17:26:13 +08:00
|
|
|
|
content = new Container
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Padding = new MarginPadding { Horizontal = contents_padding },
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-11-17 17:26:13 +08:00
|
|
|
|
[BackgroundDependencyLoader]
|
2022-05-25 22:17:52 +08:00
|
|
|
|
private void load(IBindable<WorkingBeatmap> beatmap, EditorClock clock)
|
2017-11-17 17:26:13 +08:00
|
|
|
|
{
|
2018-05-23 16:37:39 +08:00
|
|
|
|
Beatmap.BindTo(beatmap);
|
2020-09-24 18:01:28 +08:00
|
|
|
|
Track.BindTo(clock.Track);
|
2017-11-17 17:26:13 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|