1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 19:57:36 +08:00
osu-lazer/osu.Game/Screens/Edit/BottomBar.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

80 lines
2.7 KiB
C#
Raw Normal View History

2022-05-25 22:10:58 +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.
2022-06-17 15:37:17 +08:00
#nullable disable
2022-05-25 22:10:58 +08:00
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
2022-05-25 22:10:58 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
2022-05-25 22:10:58 +08:00
using osu.Framework.Graphics.Shapes;
using osu.Game.Overlays;
using osu.Game.Rulesets.Edit;
2022-05-25 22:10:58 +08:00
using osu.Game.Screens.Edit.Components;
using osu.Game.Screens.Edit.Components.Timelines.Summary;
using osuTK;
using osuTK.Graphics;
2022-05-25 22:10:58 +08:00
namespace osu.Game.Screens.Edit
{
internal partial class BottomBar : CompositeDrawable
{
public TestGameplayButton TestGameplayButton { get; private set; }
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider, Editor editor)
{
Anchor = Anchor.BottomLeft;
Origin = Anchor.BottomLeft;
RelativeSizeAxes = Axes.X;
Height = 60;
Masking = true;
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.2f),
Type = EdgeEffectType.Shadow,
Radius = 10f,
};
2022-05-25 22:10:58 +08:00
InternalChildren = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colourProvider.Background4,
},
new GridContainer
2022-05-25 22:10:58 +08:00
{
RelativeSizeAxes = Axes.Both,
ColumnDimensions = new[]
2022-05-25 22:10:58 +08:00
{
new Dimension(GridSizeMode.Absolute, 170),
new Dimension(),
new Dimension(GridSizeMode.Absolute, 220),
new Dimension(GridSizeMode.Absolute, HitObjectComposer.TOOLBOX_CONTRACTED_SIZE_RIGHT),
},
Content = new[]
{
new Drawable[]
2022-05-25 22:10:58 +08:00
{
new TimeInfoContainer { RelativeSizeAxes = Axes.Both },
new SummaryTimeline { RelativeSizeAxes = Axes.Both },
new PlaybackControl { RelativeSizeAxes = Axes.Both },
TestGameplayButton = new TestGameplayButton
2022-05-25 22:10:58 +08:00
{
RelativeSizeAxes = Axes.Both,
Size = new Vector2(1),
Action = editor.TestGameplay,
}
},
}
2022-05-25 22:10:58 +08:00
}
};
}
}
}