Limit the width of first run overlay content

This commit is contained in:
Dean Herbert 2022-05-10 17:01:36 +09:00
parent 9aadc274bf
commit bcce9c5e67

View File

@ -62,7 +62,7 @@ namespace osu.Game.Overlays
typeof(ScreenBehaviour), typeof(ScreenBehaviour),
}; };
private Container stackContainer = null!; private Container screenContent = null!;
private Bindable<OverlayActivation>? overlayActivationMode; private Bindable<OverlayActivation>? overlayActivationMode;
@ -86,12 +86,24 @@ namespace osu.Game.Overlays
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding Padding = new MarginPadding { Bottom = 20, },
Child = new GridContainer()
{ {
Horizontal = 70 * 1.2f, Anchor = Anchor.Centre,
Bottom = 20, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
ColumnDimensions = new[]
{
new Dimension(),
new Dimension(minSize: 640, maxSize: 800),
new Dimension(),
}, },
Child = new InputBlockingContainer Content = new[]
{
new[]
{
Empty(),
new InputBlockingContainer
{ {
Masking = true, Masking = true,
CornerRadius = 14, CornerRadius = 14,
@ -103,19 +115,22 @@ namespace osu.Game.Overlays
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = ColourProvider.Background6, Colour = ColourProvider.Background6,
}, },
stackContainer = new Container new Container
{ {
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding Padding = new MarginPadding
{ {
Vertical = 20, Vertical = 20,
Horizontal = 70, Horizontal = 20,
},
Child = screenContent = new Container { RelativeSizeAxes = Axes.Both, },
},
},
},
Empty(),
}, },
} }
}, }
},
}, },
}); });
@ -268,7 +283,7 @@ namespace osu.Game.Overlays
{ {
Debug.Assert(currentStepIndex == null); Debug.Assert(currentStepIndex == null);
stackContainer.Child = stack = new ScreenStack screenContent.Child = stack = new ScreenStack
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}; };