1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 17:13:20 +08:00

Update screen padding and colouring to better match new designs

This commit is contained in:
Dean Herbert 2022-05-24 16:15:24 +09:00
parent a2bfd0ba41
commit 17206bbebf
4 changed files with 22 additions and 33 deletions

View File

@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Edit
{ {
AddInternal(RightSideToolboxContainer = new ExpandingToolboxContainer(130, 250) AddInternal(RightSideToolboxContainer = new ExpandingToolboxContainer(130, 250)
{ {
Padding = new MarginPadding { Right = 10 }, Padding = new MarginPadding(10),
Alpha = DistanceSpacingMultiplier.Disabled ? 0 : 1, Alpha = DistanceSpacingMultiplier.Disabled ? 0 : 1,
Anchor = Anchor.TopRight, Anchor = Anchor.TopRight,
Origin = Anchor.TopRight, Origin = Anchor.TopRight,

View File

@ -114,9 +114,9 @@ namespace osu.Game.Rulesets.Edit
.WithChild(BlueprintContainer = CreateBlueprintContainer()) .WithChild(BlueprintContainer = CreateBlueprintContainer())
} }
}, },
new ExpandingToolboxContainer(80, 200) new ExpandingToolboxContainer(90, 200)
{ {
Padding = new MarginPadding { Left = 10 }, Padding = new MarginPadding(10),
Children = new Drawable[] Children = new Drawable[]
{ {
new EditorToolboxGroup("toolbox (1-9)") new EditorToolboxGroup("toolbox (1-9)")

View File

@ -3,14 +3,13 @@
using JetBrains.Annotations; using JetBrains.Annotations;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays;
using osu.Game.Screens.Edit.Compose.Components; using osu.Game.Screens.Edit.Compose.Components;
using osu.Game.Screens.Edit.Compose.Components.Timeline; using osu.Game.Screens.Edit.Compose.Components.Timeline;
using osuTK.Graphics;
namespace osu.Game.Screens.Edit namespace osu.Game.Screens.Edit
{ {
@ -33,7 +32,7 @@ namespace osu.Game.Screens.Edit
private LoadingSpinner spinner; private LoadingSpinner spinner;
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]
private void load([CanBeNull] BindableBeatDivisor beatDivisor) private void load(OverlayColourProvider colourProvider, [CanBeNull] BindableBeatDivisor beatDivisor)
{ {
if (beatDivisor != null) if (beatDivisor != null)
this.beatDivisor.BindTo(beatDivisor); this.beatDivisor.BindTo(beatDivisor);
@ -60,7 +59,7 @@ namespace osu.Game.Screens.Edit
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4.Black.Opacity(0.5f) Colour = colourProvider.Background4
}, },
new Container new Container
{ {
@ -106,12 +105,6 @@ namespace osu.Game.Screens.Edit
Name = "Main content", Name = "Main content",
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Depth = float.MaxValue, Depth = float.MaxValue,
Padding = new MarginPadding
{
Horizontal = horizontal_margins,
Top = vertical_margins,
Bottom = vertical_margins
},
Child = spinner = new LoadingSpinner(true) Child = spinner = new LoadingSpinner(true)
{ {
State = { Value = Visibility.Visible }, State = { Value = Visibility.Visible },

View File

@ -16,7 +16,7 @@ using osuTK;
namespace osu.Game.Screens.Edit.Timing namespace osu.Game.Screens.Edit.Timing
{ {
public class TimingScreen : EditorRoundedScreen public class TimingScreen : EditorScreenWithTimeline
{ {
[Cached] [Cached]
private Bindable<ControlPointGroup> selectedGroup = new Bindable<ControlPointGroup>(); private Bindable<ControlPointGroup> selectedGroup = new Bindable<ControlPointGroup>();
@ -26,27 +26,23 @@ namespace osu.Game.Screens.Edit.Timing
{ {
} }
[BackgroundDependencyLoader] protected override Drawable CreateMainContent() => new GridContainer
private void load()
{ {
Add(new GridContainer RelativeSizeAxes = Axes.Both,
ColumnDimensions = new[]
{ {
RelativeSizeAxes = Axes.Both, new Dimension(),
ColumnDimensions = new[] new Dimension(GridSizeMode.Absolute, 350),
},
Content = new[]
{
new Drawable[]
{ {
new Dimension(), new ControlPointList(),
new Dimension(GridSizeMode.Absolute, 350), new ControlPointSettings(),
}, },
Content = new[] }
{ };
new Drawable[]
{
new ControlPointList(),
new ControlPointSettings(),
},
}
});
}
public class ControlPointList : CompositeDrawable public class ControlPointList : CompositeDrawable
{ {
@ -77,12 +73,12 @@ namespace osu.Game.Screens.Edit.Timing
{ {
new Box new Box
{ {
Colour = colours.Background3, Colour = colours.Background4,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, },
new Box new Box
{ {
Colour = colours.Background2, Colour = colours.Background3,
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = ControlPointTable.TIMING_COLUMN_WIDTH + margins, Width = ControlPointTable.TIMING_COLUMN_WIDTH + margins,
}, },