Merge pull request #3220 from smoogipoo/extend-modoverlay

Overflow mod select to account for parallax
This commit is contained in:
Dean Herbert 2018-08-15 09:37:57 +09:00 committed by GitHub
commit 4832a8ff19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,11 @@ namespace osu.Game.Overlays.Mods
{
public class ModSelectOverlay : WaveOverlayContainer
{
/// <summary>
/// How much this container should overflow the sides of the screen to account for parallax shifting.
/// </summary>
private const float overflow_padding = 50;
private const float content_width = 0.8f;
protected Color4 LowMultiplierColour, HighMultiplierColour;
@ -199,6 +204,11 @@ namespace osu.Game.Overlays.Mods
Waves.FourthWaveColour = OsuColour.FromHex(@"003a4e");
Height = 510;
Padding = new MarginPadding
{
Left = -overflow_padding,
Right = -overflow_padding
};
Children = new Drawable[]
{
@ -258,6 +268,11 @@ namespace osu.Game.Overlays.Mods
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Width = content_width,
Padding = new MarginPadding
{
Left = overflow_padding,
Right = overflow_padding
},
Children = new Drawable[]
{
new OsuSpriteText
@ -295,7 +310,12 @@ namespace osu.Game.Overlays.Mods
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Vertical = 10 },
Padding = new MarginPadding
{
Vertical = 10,
Left = overflow_padding,
Right = overflow_padding
},
Child = ModSectionsContainer = new FillFlowContainer<ModSection>
{
Origin = Anchor.TopCentre,
@ -341,7 +361,9 @@ namespace osu.Game.Overlays.Mods
Direction = FillDirection.Horizontal,
Padding = new MarginPadding
{
Vertical = 15
Vertical = 15,
Left = overflow_padding,
Right = overflow_padding
},
Children = new Drawable[]
{