1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 19:27:52 +08:00
osu-lazer/osu.Game/Screens/Edit/Components/BottomBarContainer.cs

57 lines
1.6 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.
2018-04-13 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
2018-04-13 17:19:50 +08:00
using osu.Framework.Allocation;
using osu.Framework.Audio.Track;
2019-02-21 18:04:31 +08:00
using osu.Framework.Bindables;
2018-04-13 17:19:50 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps;
using osuTK.Graphics;
2018-04-13 17:19:50 +08:00
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>();
2018-04-13 17:19:50 +08:00
protected readonly Drawable Background;
2018-04-13 17:19:50 +08:00
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,
},
2018-04-13 17:19:50 +08:00
content = new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Horizontal = contents_padding },
}
};
}
[BackgroundDependencyLoader]
private void load(IBindable<WorkingBeatmap> beatmap, EditorClock clock)
2018-04-13 17:19:50 +08:00
{
Beatmap.BindTo(beatmap);
Track.BindTo(clock.Track);
2018-04-13 17:19:50 +08:00
}
}
}