2017-11-17 17:26:13 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
2017-11-18 13:24:09 +08:00
|
|
|
|
using osu.Framework.Audio.Track;
|
2017-11-17 18:35:41 +08:00
|
|
|
|
using osu.Framework.Configuration;
|
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;
|
2017-11-17 17:26:13 +08:00
|
|
|
|
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;
|
|
|
|
|
|
2017-11-22 09:54:33 +08:00
|
|
|
|
public readonly Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
2017-11-18 13:24:09 +08:00
|
|
|
|
protected Track Track => Beatmap.Value.Track;
|
2017-11-17 18:35:41 +08:00
|
|
|
|
|
2017-11-17 17:26:13 +08:00
|
|
|
|
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]
|
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
|
{
|
|
|
|
|
background.Colour = colours.Gray1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|