mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +08:00
Update bottom bar components to new design language (mostly)
This commit is contained in:
parent
8791e3b9ef
commit
2c61a9d3d1
@ -50,22 +50,9 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
new Drawable[]
|
||||
{
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Right = 10 },
|
||||
Child = new TimeInfoContainer { RelativeSizeAxes = Axes.Both },
|
||||
},
|
||||
new SummaryTimeline
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = 10 },
|
||||
Child = new PlaybackControl { RelativeSizeAxes = Axes.Both },
|
||||
},
|
||||
new TimeInfoContainer { RelativeSizeAxes = Axes.Both },
|
||||
new SummaryTimeline { RelativeSizeAxes = Axes.Both },
|
||||
new PlaybackControl { RelativeSizeAxes = Axes.Both },
|
||||
TestGameplayButton = new TestGameplayButton
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
|
@ -8,20 +8,19 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Components
|
||||
{
|
||||
public class BottomBarContainer : Container
|
||||
{
|
||||
private const float corner_radius = 5;
|
||||
private const float contents_padding = 15;
|
||||
|
||||
protected readonly IBindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
protected readonly IBindable<Track> Track = new Bindable<Track>();
|
||||
|
||||
private readonly Drawable background;
|
||||
protected readonly Drawable Background;
|
||||
private readonly Container content;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
@ -29,11 +28,14 @@ namespace osu.Game.Screens.Edit.Components
|
||||
public BottomBarContainer()
|
||||
{
|
||||
Masking = true;
|
||||
CornerRadius = corner_radius;
|
||||
|
||||
InternalChildren = new[]
|
||||
{
|
||||
background = new Box { RelativeSizeAxes = Axes.Both },
|
||||
Background = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Transparent,
|
||||
},
|
||||
content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -43,12 +45,10 @@ namespace osu.Game.Screens.Edit.Components
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(IBindable<WorkingBeatmap> beatmap, OsuColour colours, EditorClock clock)
|
||||
private void load(IBindable<WorkingBeatmap> beatmap, EditorClock clock)
|
||||
{
|
||||
Beatmap.BindTo(beatmap);
|
||||
Track.BindTo(clock.Track);
|
||||
|
||||
background.Colour = colours.Gray1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Components
|
||||
@ -155,10 +156,10 @@ namespace osu.Game.Screens.Edit.Components
|
||||
private Color4 normalColour;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
text.Colour = normalColour = colours.YellowDarker;
|
||||
textBold.Colour = hoveredColour = colours.Yellow;
|
||||
text.Colour = normalColour = colourProvider.Light3;
|
||||
textBold.Colour = hoveredColour = colourProvider.Content1;
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
|
@ -6,18 +6,22 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Extensions;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Components
|
||||
{
|
||||
public class TimeInfoContainer : BottomBarContainer
|
||||
{
|
||||
private readonly OsuSpriteText trackTimer;
|
||||
private OsuSpriteText trackTimer;
|
||||
|
||||
[Resolved]
|
||||
private EditorClock editorClock { get; set; }
|
||||
|
||||
public TimeInfoContainer()
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
Background.Colour = colourProvider.Background5;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
trackTimer = new OsuSpriteText
|
||||
|
@ -1,13 +1,13 @@
|
||||
// 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.
|
||||
|
||||
using osuTK;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Edit.Components.Timelines.Summary.Parts;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
||||
{
|
||||
@ -17,8 +17,10 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
||||
public class SummaryTimeline : BottomBarContainer
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
Background.Colour = colourProvider.Background6;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new MarkerPart { RelativeSizeAxes = Axes.Both },
|
||||
@ -41,7 +43,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
||||
{
|
||||
Name = "centre line",
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colours.Gray5,
|
||||
Colour = colourProvider.Background2,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Circle
|
||||
|
@ -28,6 +28,8 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary
|
||||
BackgroundColour = colours.Orange1;
|
||||
SpriteText.Colour = colourProvider.Background6;
|
||||
|
||||
Content.CornerRadius = 0;
|
||||
|
||||
Text = "Test!";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user