Skip to content

Commit

Permalink
Add slight parallax to centre content
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Aug 27, 2024
1 parent 6f1664f commit 90d06d4
Showing 1 changed file with 33 additions and 25 deletions.
58 changes: 33 additions & 25 deletions osu.Game/Screens/Play/BreakOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,33 +89,41 @@ public BreakOverlay(bool letterboxing, ScoreProcessor scoreProcessor)
},
}
},
remainingTimeAdjustmentBox = new Container
new ParallaxContainer
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Width = 0,
Child = remainingTimeBox = new Circle
RelativeSizeAxes = Axes.Both,
ParallaxAmount = -0.008f,
Children = new Drawable[]
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
Height = 8,
Masking = true,
}
},
remainingTimeCounter = new RemainingTimeCounter
{
Anchor = Anchor.Centre,
Origin = Anchor.BottomCentre,
Y = -vertical_margin,
},
info = new BreakInfo
{
Anchor = Anchor.Centre,
Origin = Anchor.TopCentre,
Y = vertical_margin,
remainingTimeAdjustmentBox = new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Width = 0,
Child = remainingTimeBox = new Circle
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
Height = 8,
Masking = true,
}
},
remainingTimeCounter = new RemainingTimeCounter
{
Anchor = Anchor.Centre,
Origin = Anchor.BottomCentre,
Y = -vertical_margin,
},
info = new BreakInfo
{
Anchor = Anchor.Centre,
Origin = Anchor.TopCentre,
Y = vertical_margin,
},
},
},
breakArrows = new BreakArrows
{
Expand Down

0 comments on commit 90d06d4

Please sign in to comment.