Add overflow padding to account for parallax shifting

Added overflow padding in the Multiplayer screen, and adjusting content (LoungeSubScreen, FilterControl, Header, "Create Room" button) to account for this padding.
This commit is contained in:
ProgrammaticNajel
2019-01-24 16:11:24 +08:00
parent d53386cf4b
commit 7ac20c3545
5 changed files with 28 additions and 5 deletions

View File

@ -26,6 +26,11 @@ namespace osu.Game.Screens.Multi
[Cached]
public class Multiplayer : OsuScreen, IOnlineComponent
{
/// <summary>
///How much this container should overflow the sides of the screen to account for parallax shifting.
/// </summary>
public const float OVERFLOW_PADDING = 50;
private readonly MultiplayerWaveContainer waves;
public override bool AllowBeatmapRulesetChange => currentSubScreen?.AllowBeatmapRulesetChange ?? base.AllowBeatmapRulesetChange;
@ -48,6 +53,12 @@ namespace osu.Game.Screens.Multi
RelativeSizeAxes = Axes.Both,
};
Padding = new MarginPadding
{
Left = -OVERFLOW_PADDING,
Right = -OVERFLOW_PADDING
};
waves.AddRange(new Drawable[]
{
new Container
@ -86,7 +97,7 @@ namespace osu.Game.Screens.Multi
Margin = new MarginPadding
{
Top = 10,
Right = 10,
Right = 10 + OVERFLOW_PADDING,
},
Text = "Create room",
Action = () => loungeSubScreen.Push(new Room