mirror of
https://github.com/ppy/osu.git
synced 2024-12-31 00:42:55 +08:00
57 lines
1.6 KiB
C#
57 lines
1.6 KiB
C#
// 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.
|
|
|
|
#nullable disable
|
|
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Audio.Track;
|
|
using osu.Framework.Bindables;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Framework.Graphics.Shapes;
|
|
using osu.Game.Beatmaps;
|
|
using osuTK.Graphics;
|
|
|
|
namespace osu.Game.Screens.Edit.Components
|
|
{
|
|
public class BottomBarContainer : Container
|
|
{
|
|
private const float contents_padding = 15;
|
|
|
|
protected readonly IBindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
|
|
|
protected readonly IBindable<Track> Track = new Bindable<Track>();
|
|
|
|
protected readonly Drawable Background;
|
|
private readonly Container content;
|
|
|
|
protected override Container<Drawable> Content => content;
|
|
|
|
public BottomBarContainer()
|
|
{
|
|
Masking = true;
|
|
|
|
InternalChildren = new[]
|
|
{
|
|
Background = new Box
|
|
{
|
|
RelativeSizeAxes = Axes.Both,
|
|
Colour = Color4.Transparent,
|
|
},
|
|
content = new Container
|
|
{
|
|
RelativeSizeAxes = Axes.Both,
|
|
Padding = new MarginPadding { Horizontal = contents_padding },
|
|
}
|
|
};
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load(IBindable<WorkingBeatmap> beatmap, EditorClock clock)
|
|
{
|
|
Beatmap.BindTo(beatmap);
|
|
Track.BindTo(clock.Track);
|
|
}
|
|
}
|
|
}
|