From 44e02917371cbb6bf27d39f3946e6ccd90f808b8 Mon Sep 17 00:00:00 2001 From: Joehu Date: Tue, 19 Mar 2019 20:47:12 -0700 Subject: [PATCH 1/4] Remove specified depths of overlays --- osu.Game/OsuGame.cs | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index cf231f19ce..9f314c6bdf 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -403,7 +403,7 @@ namespace osu.Game { RelativeSizeAxes = Axes.Both, }, - floatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both, Depth = float.MinValue }, + floatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, idleTracker = new GameIdleTracker(6000) }); @@ -421,7 +421,6 @@ namespace osu.Game loadComponentSingleFile(Toolbar = new Toolbar { - Depth = -5, OnHome = delegate { CloseAllOverlays(false); @@ -435,20 +434,15 @@ namespace osu.Game loadComponentSingleFile(screenshotManager, Add); //overlay elements - loadComponentSingleFile(direct = new DirectOverlay { Depth = -1 }, overlayContent.Add); - loadComponentSingleFile(social = new SocialOverlay { Depth = -1 }, overlayContent.Add); + loadComponentSingleFile(direct = new DirectOverlay(), overlayContent.Add); + loadComponentSingleFile(social = new SocialOverlay(), overlayContent.Add); loadComponentSingleFile(channelManager = new ChannelManager(), AddInternal); - loadComponentSingleFile(chatOverlay = new ChatOverlay { Depth = -1 }, overlayContent.Add); - loadComponentSingleFile(settings = new MainSettings - { - GetToolbarHeight = () => ToolbarOffset, - Depth = -1 - }, floatingOverlayContent.Add); - loadComponentSingleFile(userProfile = new UserProfileOverlay { Depth = -2 }, overlayContent.Add); - loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay { Depth = -3 }, overlayContent.Add); + loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add); + loadComponentSingleFile(settings = new MainSettings { GetToolbarHeight = () => ToolbarOffset }, floatingOverlayContent.Add); + loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add); + loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add); loadComponentSingleFile(musicController = new MusicController { - Depth = -5, Position = new Vector2(0, Toolbar.HEIGHT), Anchor = Anchor.TopRight, Origin = Anchor.TopRight, @@ -457,25 +451,15 @@ namespace osu.Game loadComponentSingleFile(notifications = new NotificationOverlay { GetToolbarHeight = () => ToolbarOffset, - Depth = -4, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, }, floatingOverlayContent.Add); - loadComponentSingleFile(accountCreation = new AccountCreationOverlay - { - Depth = -6, - }, floatingOverlayContent.Add); + loadComponentSingleFile(accountCreation = new AccountCreationOverlay(), floatingOverlayContent.Add); - loadComponentSingleFile(dialogOverlay = new DialogOverlay - { - Depth = -7, - }, floatingOverlayContent.Add); + loadComponentSingleFile(dialogOverlay = new DialogOverlay(), floatingOverlayContent.Add); - loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener - { - Depth = -8, - }, floatingOverlayContent.Add); + loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener(), floatingOverlayContent.Add); dependencies.CacheAs(idleTracker); dependencies.Cache(settings); From a39648edbc2b9496a3b2cb9d5e573d42196242e2 Mon Sep 17 00:00:00 2001 From: Joehu Date: Tue, 19 Mar 2019 20:51:43 -0700 Subject: [PATCH 2/4] Normalize format of single line curly brackets --- osu.Game/OsuGame.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 9f314c6bdf..facc616136 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -399,10 +399,7 @@ namespace osu.Game logoContainer = new Container { RelativeSizeAxes = Axes.Both }, } }, - overlayContent = new Container - { - RelativeSizeAxes = Axes.Both, - }, + overlayContent = new Container { RelativeSizeAxes = Axes.Both }, floatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, idleTracker = new GameIdleTracker(6000) }); @@ -414,10 +411,7 @@ namespace osu.Game loadComponentSingleFile(osuLogo, logoContainer.Add); - loadComponentSingleFile(new Loader - { - RelativeSizeAxes = Axes.Both - }, screenStack.Push); + loadComponentSingleFile(new Loader { RelativeSizeAxes = Axes.Both }, screenStack.Push); loadComponentSingleFile(Toolbar = new Toolbar { From 1f95abf7c79efb99a885357f04390c1eb7e4a8c5 Mon Sep 17 00:00:00 2001 From: Joehu Date: Tue, 19 Mar 2019 21:30:24 -0700 Subject: [PATCH 3/4] Fix regressions caused by removing specified depths - urgentOverlayContent is added so toolbar can be loaded first --- osu.Game/OsuGame.cs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index facc616136..f952f92f81 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -401,6 +401,7 @@ namespace osu.Game }, overlayContent = new Container { RelativeSizeAxes = Axes.Both }, floatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, + urgentOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, idleTracker = new GameIdleTracker(6000) }); @@ -420,7 +421,7 @@ namespace osu.Game CloseAllOverlays(false); menuScreen?.MakeCurrent(); }, - }, floatingOverlayContent.Add); + }, urgentOverlayContent.Add); loadComponentSingleFile(volume = new VolumeOverlay(), floatingOverlayContent.Add); loadComponentSingleFile(onscreenDisplay = new OnScreenDisplay(), Add); @@ -435,13 +436,6 @@ namespace osu.Game loadComponentSingleFile(settings = new MainSettings { GetToolbarHeight = () => ToolbarOffset }, floatingOverlayContent.Add); loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add); loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add); - loadComponentSingleFile(musicController = new MusicController - { - Position = new Vector2(0, Toolbar.HEIGHT), - Anchor = Anchor.TopRight, - Origin = Anchor.TopRight, - }, floatingOverlayContent.Add); - loadComponentSingleFile(notifications = new NotificationOverlay { GetToolbarHeight = () => ToolbarOffset, @@ -449,11 +443,18 @@ namespace osu.Game Origin = Anchor.TopRight, }, floatingOverlayContent.Add); - loadComponentSingleFile(accountCreation = new AccountCreationOverlay(), floatingOverlayContent.Add); + loadComponentSingleFile(musicController = new MusicController + { + Position = new Vector2(0, Toolbar.HEIGHT), + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight, + }, floatingOverlayContent.Add); - loadComponentSingleFile(dialogOverlay = new DialogOverlay(), floatingOverlayContent.Add); + loadComponentSingleFile(accountCreation = new AccountCreationOverlay(), urgentOverlayContent.Add); - loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener(), floatingOverlayContent.Add); + loadComponentSingleFile(dialogOverlay = new DialogOverlay(), urgentOverlayContent.Add); + + loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener(), urgentOverlayContent.Add); dependencies.CacheAs(idleTracker); dependencies.Cache(settings); @@ -699,6 +700,8 @@ namespace osu.Game private Container floatingOverlayContent; + private Container urgentOverlayContent; + private FrameworkConfigManager frameworkConfig; private ScalingContainer screenContainer; From d5272a83cfef5bc12ae9d52abf701d20389e4e4c Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Thu, 21 Mar 2019 11:16:10 -0700 Subject: [PATCH 4/4] Rename "urgent" to "topMost" --- osu.Game/OsuGame.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index f952f92f81..b1ba2cae03 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -401,7 +401,7 @@ namespace osu.Game }, overlayContent = new Container { RelativeSizeAxes = Axes.Both }, floatingOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, - urgentOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, + topMostOverlayContent = new Container { RelativeSizeAxes = Axes.Both }, idleTracker = new GameIdleTracker(6000) }); @@ -421,7 +421,7 @@ namespace osu.Game CloseAllOverlays(false); menuScreen?.MakeCurrent(); }, - }, urgentOverlayContent.Add); + }, topMostOverlayContent.Add); loadComponentSingleFile(volume = new VolumeOverlay(), floatingOverlayContent.Add); loadComponentSingleFile(onscreenDisplay = new OnScreenDisplay(), Add); @@ -450,11 +450,11 @@ namespace osu.Game Origin = Anchor.TopRight, }, floatingOverlayContent.Add); - loadComponentSingleFile(accountCreation = new AccountCreationOverlay(), urgentOverlayContent.Add); + loadComponentSingleFile(accountCreation = new AccountCreationOverlay(), topMostOverlayContent.Add); - loadComponentSingleFile(dialogOverlay = new DialogOverlay(), urgentOverlayContent.Add); + loadComponentSingleFile(dialogOverlay = new DialogOverlay(), topMostOverlayContent.Add); - loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener(), urgentOverlayContent.Add); + loadComponentSingleFile(externalLinkOpener = new ExternalLinkOpener(), topMostOverlayContent.Add); dependencies.CacheAs(idleTracker); dependencies.Cache(settings); @@ -700,7 +700,7 @@ namespace osu.Game private Container floatingOverlayContent; - private Container urgentOverlayContent; + private Container topMostOverlayContent; private FrameworkConfigManager frameworkConfig; private ScalingContainer screenContainer;