From 7ac20c354530da66c50ce1ae4098ead412a3500d Mon Sep 17 00:00:00 2001 From: ProgrammaticNajel Date: Thu, 24 Jan 2019 16:11:24 +0800 Subject: [PATCH 1/7] 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. --- .../SearchableList/SearchableListFilterControl.cs | 12 +++++++++++- osu.Game/Screens/Multi/Header.cs | 2 +- .../Multi/Lounge/Components/FilterControl.cs | 2 ++ osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs | 4 ++-- osu.Game/Screens/Multi/Multiplayer.cs | 13 ++++++++++++- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/SearchableList/SearchableListFilterControl.cs b/osu.Game/Overlays/SearchableList/SearchableListFilterControl.cs index bd03ff9734..803ec2b27b 100644 --- a/osu.Game/Overlays/SearchableList/SearchableListFilterControl.cs +++ b/osu.Game/Overlays/SearchableList/SearchableListFilterControl.cs @@ -28,6 +28,12 @@ namespace osu.Game.Overlays.SearchableList protected abstract T DefaultTab { get; } protected virtual Drawable CreateSupplementaryControls() => null; + /// + /// Add padding to internal components of the control. + /// This does not affect the background and the tab strip. + /// + protected virtual float InternalPadding => 0; + protected SearchableListFilterControl() { if (!typeof(T).IsEnum) @@ -62,7 +68,11 @@ namespace osu.Game.Overlays.SearchableList { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding { Top = padding, Horizontal = SearchableListOverlay.WIDTH_PADDING }, + Padding = new MarginPadding + { + Top = padding, + Horizontal = SearchableListOverlay.WIDTH_PADDING + InternalPadding + }, Children = new Drawable[] { Search = new FilterSearchTextBox diff --git a/osu.Game/Screens/Multi/Header.cs b/osu.Game/Screens/Multi/Header.cs index 2849fd89e0..874a58f26e 100644 --- a/osu.Game/Screens/Multi/Header.cs +++ b/osu.Game/Screens/Multi/Header.cs @@ -37,7 +37,7 @@ namespace osu.Game.Screens.Multi new Container { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING }, + Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + Multiplayer.OVERFLOW_PADDING }, Children = new Drawable[] { new FillFlowContainer diff --git a/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs b/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs index 286a4c18b0..c0a439a31a 100644 --- a/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs +++ b/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs @@ -13,6 +13,8 @@ namespace osu.Game.Screens.Multi.Lounge.Components protected override Color4 BackgroundColour => OsuColour.FromHex(@"362e42"); protected override PrimaryFilter DefaultTab => PrimaryFilter.Open; + protected override float InternalPadding => Multiplayer.OVERFLOW_PADDING; + public FilterControl() { DisplayStyleControl.Hide(); diff --git a/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs b/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs index d9633218eb..dae556b3fb 100644 --- a/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs +++ b/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs @@ -91,8 +91,8 @@ namespace osu.Game.Screens.Multi.Lounge content.Padding = new MarginPadding { Top = Filter.DrawHeight, - Left = SearchableListOverlay.WIDTH_PADDING - DrawableRoom.SELECTION_BORDER_WIDTH, - Right = SearchableListOverlay.WIDTH_PADDING, + Left = SearchableListOverlay.WIDTH_PADDING - DrawableRoom.SELECTION_BORDER_WIDTH + Multiplayer.OVERFLOW_PADDING, + Right = SearchableListOverlay.WIDTH_PADDING + Multiplayer.OVERFLOW_PADDING, }; } diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index ce0eddbee3..5715c315f4 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -26,6 +26,11 @@ namespace osu.Game.Screens.Multi [Cached] public class Multiplayer : OsuScreen, IOnlineComponent { + /// + ///How much this container should overflow the sides of the screen to account for parallax shifting. + /// + 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 From e4084b7d5db8746388a3cfe2524f36b7b8f0ddd5 Mon Sep 17 00:00:00 2001 From: ProgrammaticNajel Date: Thu, 24 Jan 2019 17:40:48 +0800 Subject: [PATCH 2/7] Add overflow padding in other multiplayer screen components Added overflow padding in room selection screen (Header, Room Info, Leaderboards, and Room Chat) --- osu.Game/Screens/Multi/Match/Components/Header.cs | 2 +- osu.Game/Screens/Multi/Match/Components/Info.cs | 2 +- osu.Game/Screens/Multi/Match/MatchSubScreen.cs | 14 ++++++++++++-- osu.Game/Screens/Multi/Multiplayer.cs | 6 +----- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/osu.Game/Screens/Multi/Match/Components/Header.cs b/osu.Game/Screens/Multi/Match/Components/Header.cs index 4cb6d7a4e0..0483156322 100644 --- a/osu.Game/Screens/Multi/Match/Components/Header.cs +++ b/osu.Game/Screens/Multi/Match/Components/Header.cs @@ -70,7 +70,7 @@ namespace osu.Game.Screens.Multi.Match.Components new Container { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING }, + Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + Multiplayer.OVERFLOW_PADDING }, Children = new Drawable[] { new FillFlowContainer diff --git a/osu.Game/Screens/Multi/Match/Components/Info.cs b/osu.Game/Screens/Multi/Match/Components/Info.cs index 0aabc014c9..c0da522290 100644 --- a/osu.Game/Screens/Multi/Match/Components/Info.cs +++ b/osu.Game/Screens/Multi/Match/Components/Info.cs @@ -41,7 +41,7 @@ namespace osu.Game.Screens.Multi.Match.Components { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING }, + Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + Multiplayer.OVERFLOW_PADDING }, Children = new Drawable[] { new FillFlowContainer diff --git a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs index a7932e1131..5ed1d367a0 100644 --- a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs +++ b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs @@ -75,13 +75,23 @@ namespace osu.Game.Screens.Multi.Match { leaderboard = new MatchLeaderboard { - Padding = new MarginPadding(10), + Padding = new MarginPadding + { + Left = 10 + Multiplayer.OVERFLOW_PADDING, + Right = 10, + Vertical = 10, + }, RelativeSizeAxes = Axes.Both, Room = room }, new Container { - Padding = new MarginPadding(10), + Padding = new MarginPadding + { + Left = 10, + Right = 10 + Multiplayer.OVERFLOW_PADDING, + Vertical = 10, + }, RelativeSizeAxes = Axes.Both, Child = chat = new MatchChatDisplay(room) { diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index 5715c315f4..96529dd039 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -53,11 +53,7 @@ namespace osu.Game.Screens.Multi RelativeSizeAxes = Axes.Both, }; - Padding = new MarginPadding - { - Left = -OVERFLOW_PADDING, - Right = -OVERFLOW_PADDING - }; + Padding = new MarginPadding { Horizontal = -OVERFLOW_PADDING }; waves.AddRange(new Drawable[] { From 9fcefa7d69200f8b73b6c35d7d621ce1484fb21b Mon Sep 17 00:00:00 2001 From: ProgrammaticNajel Date: Thu, 24 Jan 2019 18:18:32 +0800 Subject: [PATCH 3/7] Typo fix --- osu.Game/Screens/Multi/Multiplayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index 96529dd039..9580397984 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -27,7 +27,7 @@ namespace osu.Game.Screens.Multi public class Multiplayer : OsuScreen, IOnlineComponent { /// - ///How much this container should overflow the sides of the screen to account for parallax shifting. + /// How much this container should overflow the sides of the screen to account for parallax shifting. /// public const float OVERFLOW_PADDING = 50; From 593e0b36f5c57e0e78f80d9d5dd53d64aa0d0b0f Mon Sep 17 00:00:00 2001 From: ProgrammaticNajel Date: Thu, 24 Jan 2019 19:42:35 +0800 Subject: [PATCH 4/7] Add overflow padding in other multiplayer screen components Added padding to Room Creation and Beatmap Selection in Multiplayer. --- .../Screens/Multi/Match/Components/MatchSettingsOverlay.cs | 7 ++++++- osu.Game/Screens/Multi/Match/MatchSubScreen.cs | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs b/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs index 69ca4b1deb..9a9bf59a07 100644 --- a/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs +++ b/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs @@ -79,7 +79,11 @@ namespace osu.Game.Screens.Multi.Match.Components { new ScrollContainer { - Padding = new MarginPadding { Vertical = 10 }, + Padding = new MarginPadding + { + Horizontal = Multiplayer.OVERFLOW_PADDING, + Vertical = 10 + }, RelativeSizeAxes = Axes.Both, Children = new[] { @@ -210,6 +214,7 @@ namespace osu.Game.Screens.Multi.Match.Components Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding { Vertical = 20 }, + Padding = new MarginPadding { Horizontal = Multiplayer.OVERFLOW_PADDING }, Children = new Drawable[] { ApplyButton = new CreateRoomButton diff --git a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs index 5ed1d367a0..4bdf5fecd7 100644 --- a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs +++ b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs @@ -118,7 +118,11 @@ namespace osu.Game.Screens.Multi.Match }, }; - header.OnRequestSelectBeatmap = () => Push(new MatchSongSelect { Selected = addPlaylistItem }); + header.OnRequestSelectBeatmap = () => Push(new MatchSongSelect + { + Selected = addPlaylistItem, + Padding = new MarginPadding { Horizontal = Multiplayer.OVERFLOW_PADDING } + }); header.Tabs.Current.ValueChanged += t => { const float fade_duration = 500; From 787d4da15335c569db83ebe1cf1fe0b28829633d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 25 Jan 2019 14:10:59 +0900 Subject: [PATCH 5/7] Combine constant --- osu.Game/Overlays/Mods/ModSelectOverlay.cs | 24 ++++--------------- osu.Game/Screens/Multi/Header.cs | 2 +- .../Multi/Lounge/Components/FilterControl.cs | 2 +- .../Screens/Multi/Lounge/LoungeSubScreen.cs | 4 ++-- .../Screens/Multi/Match/Components/Header.cs | 2 +- .../Screens/Multi/Match/Components/Info.cs | 2 +- .../Match/Components/MatchSettingsOverlay.cs | 4 ++-- .../Screens/Multi/Match/MatchSubScreen.cs | 7 +++--- osu.Game/Screens/Multi/Multiplayer.cs | 9 ++----- osu.Game/Screens/OsuScreen.cs | 6 +++++ 10 files changed, 25 insertions(+), 37 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index 56cda6a9b5..4619b5748d 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -22,16 +22,12 @@ using osu.Game.Graphics.Containers; using osu.Game.Rulesets; using osu.Game.Graphics.UserInterface; using osu.Game.Overlays.Mods.Sections; +using osu.Game.Screens; namespace osu.Game.Overlays.Mods { public class ModSelectOverlay : WaveOverlayContainer { - /// - /// How much this container should overflow the sides of the screen to account for parallax shifting. - /// - private const float overflow_padding = 50; - private const float content_width = 0.8f; protected Color4 LowMultiplierColour, HighMultiplierColour; @@ -203,11 +199,7 @@ namespace osu.Game.Overlays.Mods Waves.FourthWaveColour = OsuColour.FromHex(@"003a4e"); Height = 510; - Padding = new MarginPadding - { - Left = -overflow_padding, - Right = -overflow_padding - }; + Padding = new MarginPadding { Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING }; Children = new Drawable[] { @@ -267,11 +259,7 @@ namespace osu.Game.Overlays.Mods AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Width = content_width, - Padding = new MarginPadding - { - Left = overflow_padding, - Right = overflow_padding - }, + Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { new OsuSpriteText @@ -312,8 +300,7 @@ namespace osu.Game.Overlays.Mods Padding = new MarginPadding { Vertical = 10, - Left = overflow_padding, - Right = overflow_padding + Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Child = ModSectionsContainer = new FillFlowContainer { @@ -361,8 +348,7 @@ namespace osu.Game.Overlays.Mods Padding = new MarginPadding { Vertical = 15, - Left = overflow_padding, - Right = overflow_padding + Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { diff --git a/osu.Game/Screens/Multi/Header.cs b/osu.Game/Screens/Multi/Header.cs index 5ab94d4b2e..3448a23ac8 100644 --- a/osu.Game/Screens/Multi/Header.cs +++ b/osu.Game/Screens/Multi/Header.cs @@ -37,7 +37,7 @@ namespace osu.Game.Screens.Multi new Container { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + Multiplayer.OVERFLOW_PADDING }, + Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { new FillFlowContainer diff --git a/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs b/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs index c982a26a58..64b9959f57 100644 --- a/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs +++ b/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs @@ -13,7 +13,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components protected override Color4 BackgroundColour => OsuColour.FromHex(@"362e42"); protected override PrimaryFilter DefaultTab => PrimaryFilter.Open; - protected override float InternalPadding => Multiplayer.OVERFLOW_PADDING; + protected override float InternalPadding => OsuScreen.HORIZONTAL_OVERFLOW_PADDING; public FilterControl() { diff --git a/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs b/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs index 10b778fdd5..db0f105e0e 100644 --- a/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs +++ b/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs @@ -91,8 +91,8 @@ namespace osu.Game.Screens.Multi.Lounge content.Padding = new MarginPadding { Top = Filter.DrawHeight, - Left = SearchableListOverlay.WIDTH_PADDING - DrawableRoom.SELECTION_BORDER_WIDTH + Multiplayer.OVERFLOW_PADDING, - Right = SearchableListOverlay.WIDTH_PADDING + Multiplayer.OVERFLOW_PADDING, + Left = SearchableListOverlay.WIDTH_PADDING - DrawableRoom.SELECTION_BORDER_WIDTH + HORIZONTAL_OVERFLOW_PADDING, + Right = SearchableListOverlay.WIDTH_PADDING + HORIZONTAL_OVERFLOW_PADDING, }; } diff --git a/osu.Game/Screens/Multi/Match/Components/Header.cs b/osu.Game/Screens/Multi/Match/Components/Header.cs index 98ade5764e..29546f9b06 100644 --- a/osu.Game/Screens/Multi/Match/Components/Header.cs +++ b/osu.Game/Screens/Multi/Match/Components/Header.cs @@ -70,7 +70,7 @@ namespace osu.Game.Screens.Multi.Match.Components new Container { RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + Multiplayer.OVERFLOW_PADDING }, + Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { new FillFlowContainer diff --git a/osu.Game/Screens/Multi/Match/Components/Info.cs b/osu.Game/Screens/Multi/Match/Components/Info.cs index e767ae7f98..7894385afb 100644 --- a/osu.Game/Screens/Multi/Match/Components/Info.cs +++ b/osu.Game/Screens/Multi/Match/Components/Info.cs @@ -41,7 +41,7 @@ namespace osu.Game.Screens.Multi.Match.Components { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + Multiplayer.OVERFLOW_PADDING }, + Padding = new MarginPadding { Horizontal = SearchableListOverlay.WIDTH_PADDING + OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { new FillFlowContainer diff --git a/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs b/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs index d75f297389..5b9402683e 100644 --- a/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs +++ b/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs @@ -81,7 +81,7 @@ namespace osu.Game.Screens.Multi.Match.Components { Padding = new MarginPadding { - Horizontal = Multiplayer.OVERFLOW_PADDING, + Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING, Vertical = 10 }, RelativeSizeAxes = Axes.Both, @@ -214,7 +214,7 @@ namespace osu.Game.Screens.Multi.Match.Components Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding { Vertical = 20 }, - Padding = new MarginPadding { Horizontal = Multiplayer.OVERFLOW_PADDING }, + Padding = new MarginPadding { Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Children = new Drawable[] { ApplyButton = new CreateRoomButton diff --git a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs index d1f0d009cc..1b0efbdf09 100644 --- a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs +++ b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs @@ -77,7 +77,7 @@ namespace osu.Game.Screens.Multi.Match { Padding = new MarginPadding { - Left = 10 + Multiplayer.OVERFLOW_PADDING, + Left = 10 + HORIZONTAL_OVERFLOW_PADDING, Right = 10, Vertical = 10, }, @@ -89,7 +89,7 @@ namespace osu.Game.Screens.Multi.Match Padding = new MarginPadding { Left = 10, - Right = 10 + Multiplayer.OVERFLOW_PADDING, + Right = 10 + HORIZONTAL_OVERFLOW_PADDING, Vertical = 10, }, RelativeSizeAxes = Axes.Both, @@ -121,8 +121,9 @@ namespace osu.Game.Screens.Multi.Match header.OnRequestSelectBeatmap = () => Push(new MatchSongSelect { Selected = addPlaylistItem, - Padding = new MarginPadding { Horizontal = Multiplayer.OVERFLOW_PADDING } + Padding = new MarginPadding { Horizontal = HORIZONTAL_OVERFLOW_PADDING } }); + header.Tabs.Current.ValueChanged += t => { const float fade_duration = 500; diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index b2c2b4817d..da15574029 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -26,11 +26,6 @@ namespace osu.Game.Screens.Multi [Cached] public class Multiplayer : OsuScreen, IOnlineComponent { - /// - /// How much this container should overflow the sides of the screen to account for parallax shifting. - /// - public const float OVERFLOW_PADDING = 50; - private readonly MultiplayerWaveContainer waves; public override bool AllowBeatmapRulesetChange => currentSubScreen?.AllowBeatmapRulesetChange ?? base.AllowBeatmapRulesetChange; @@ -53,7 +48,7 @@ namespace osu.Game.Screens.Multi RelativeSizeAxes = Axes.Both, }; - Padding = new MarginPadding { Horizontal = -OVERFLOW_PADDING }; + Padding = new MarginPadding { Horizontal = -HORIZONTAL_OVERFLOW_PADDING }; waves.AddRange(new Drawable[] { @@ -93,7 +88,7 @@ namespace osu.Game.Screens.Multi Margin = new MarginPadding { Top = 10, - Right = 10 + OVERFLOW_PADDING, + Right = 10 + HORIZONTAL_OVERFLOW_PADDING, }, Text = "Create room", Action = () => loungeSubScreen.Push(new Room diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index d65c582eb1..45789d7892 100644 --- a/osu.Game/Screens/OsuScreen.cs +++ b/osu.Game/Screens/OsuScreen.cs @@ -23,6 +23,12 @@ namespace osu.Game.Screens { public abstract class OsuScreen : Screen, IKeyBindingHandler, IHasDescription { + /// + /// The amount of negative padding that should be applied to game background content which touches both the left and right sides of the screen. + /// This allows for the game content to be pushed byt he options/notification overlays without causing black areas to appear. + /// + public const float HORIZONTAL_OVERFLOW_PADDING = 50; + public BackgroundScreen Background { get; private set; } /// From 7ed215c521ad3cf8be34e7530a6a31272147c7bf Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 25 Jan 2019 14:46:45 +0900 Subject: [PATCH 6/7] Make InternalPadding a bit simpler --- .../Overlays/SearchableList/SearchableListFilterControl.cs | 7 +++---- osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/SearchableList/SearchableListFilterControl.cs b/osu.Game/Overlays/SearchableList/SearchableListFilterControl.cs index 1c3cb63995..f679e0186a 100644 --- a/osu.Game/Overlays/SearchableList/SearchableListFilterControl.cs +++ b/osu.Game/Overlays/SearchableList/SearchableListFilterControl.cs @@ -29,10 +29,9 @@ namespace osu.Game.Overlays.SearchableList protected virtual Drawable CreateSupplementaryControls() => null; /// - /// Add padding to internal components of the control. - /// This does not affect the background and the tab strip. + /// The amount of padding added to content (does not affect background or tab control strip). /// - protected virtual float InternalPadding => 0; + protected virtual float ContentHorizontalPadding => SearchableListOverlay.WIDTH_PADDING; protected SearchableListFilterControl() { @@ -71,7 +70,7 @@ namespace osu.Game.Overlays.SearchableList Padding = new MarginPadding { Top = padding, - Horizontal = SearchableListOverlay.WIDTH_PADDING + InternalPadding + Horizontal = ContentHorizontalPadding }, Children = new Drawable[] { diff --git a/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs b/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs index 64b9959f57..a027125bb5 100644 --- a/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs +++ b/osu.Game/Screens/Multi/Lounge/Components/FilterControl.cs @@ -13,7 +13,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components protected override Color4 BackgroundColour => OsuColour.FromHex(@"362e42"); protected override PrimaryFilter DefaultTab => PrimaryFilter.Open; - protected override float InternalPadding => OsuScreen.HORIZONTAL_OVERFLOW_PADDING; + protected override float ContentHorizontalPadding => base.ContentHorizontalPadding + OsuScreen.HORIZONTAL_OVERFLOW_PADDING; public FilterControl() { From a25dce53cdea139c86bf96187304992e4ec7c47b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 25 Jan 2019 15:03:32 +0900 Subject: [PATCH 7/7] Fix logical regression --- osu.Game/Overlays/Mods/ModSelectOverlay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index 4619b5748d..386dd01ebd 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -300,7 +300,7 @@ namespace osu.Game.Overlays.Mods Padding = new MarginPadding { Vertical = 10, - Horizontal = -OsuScreen.HORIZONTAL_OVERFLOW_PADDING + Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING }, Child = ModSectionsContainer = new FillFlowContainer {