Skip to content

Commit

Permalink
Limit the width of first run overlay content
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed May 10, 2022
1 parent 9aadc27 commit bcce9c5
Showing 1 changed file with 41 additions and 26 deletions.
67 changes: 41 additions & 26 deletions osu.Game/Overlays/FirstRunSetupOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class FirstRunSetupOverlay : ShearedOverlayContainer
typeof(ScreenBehaviour),
};

private Container stackContainer = null!;
private Container screenContent = null!;

private Bindable<OverlayActivation>? overlayActivationMode;

Expand All @@ -86,36 +86,51 @@ private void load(OsuColour colours)
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
Padding = new MarginPadding { Bottom = 20, },
Child = new GridContainer()
{
Horizontal = 70 * 1.2f,
Bottom = 20,
},
Child = new InputBlockingContainer
{
Masking = true,
CornerRadius = 14,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
ColumnDimensions = new[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourProvider.Background6,
},
stackContainer = new Container
new Dimension(),
new Dimension(minSize: 640, maxSize: 800),
new Dimension(),
},
Content = new[]
{
new[]
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
Empty(),
new InputBlockingContainer
{
Vertical = 20,
Horizontal = 70,
Masking = true,
CornerRadius = 14,
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourProvider.Background6,
},
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
{
Vertical = 20,
Horizontal = 20,
},
Child = screenContent = new Container { RelativeSizeAxes = Axes.Both, },
},
},
},
}
},
},
Empty(),
},
}
}
},
});

Expand Down Expand Up @@ -268,7 +283,7 @@ private void showFirstStep()
{
Debug.Assert(currentStepIndex == null);

stackContainer.Child = stack = new ScreenStack
screenContent.Child = stack = new ScreenStack
{
RelativeSizeAxes = Axes.Both,
};
Expand Down

0 comments on commit bcce9c5

Please sign in to comment.