mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user