2019-01-24 08:43:03 +00: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 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Audio.Track;
|
2019-02-21 10:04:31 +00:00
|
|
|
|
using osu.Framework.Bindables;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit.Components
|
|
|
|
|
{
|
|
|
|
|
public class BottomBarContainer : Container
|
|
|
|
|
{
|
|
|
|
|
private const float corner_radius = 5;
|
|
|
|
|
private const float contents_padding = 15;
|
|
|
|
|
|
2018-05-23 08:37:39 +00:00
|
|
|
|
protected readonly IBindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
2018-04-13 09:19:50 +00:00
|
|
|
|
protected Track Track => Beatmap.Value.Track;
|
|
|
|
|
|
|
|
|
|
private readonly Drawable background;
|
|
|
|
|
private readonly Container content;
|
|
|
|
|
|
|
|
|
|
protected override Container<Drawable> Content => content;
|
|
|
|
|
|
|
|
|
|
public BottomBarContainer()
|
|
|
|
|
{
|
|
|
|
|
Masking = true;
|
|
|
|
|
CornerRadius = corner_radius;
|
|
|
|
|
|
|
|
|
|
InternalChildren = new[]
|
|
|
|
|
{
|
|
|
|
|
background = new Box { RelativeSizeAxes = Axes.Both },
|
|
|
|
|
content = new Container
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Padding = new MarginPadding { Horizontal = contents_padding },
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2019-02-01 06:42:15 +00:00
|
|
|
|
private void load(IBindable<WorkingBeatmap> beatmap, OsuColour colours)
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2018-05-23 08:37:39 +00:00
|
|
|
|
Beatmap.BindTo(beatmap);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
background.Colour = colours.Gray1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|