From b5d1d76d009b4d6d386c45d12c3ed592e2820df5 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 25 Aug 2023 21:27:04 -0700 Subject: [PATCH 1/3] Remove `BeatmapEditorRoundedScreen` --- .../Beatmaps/BeatmapEditorRoundedScreen.cs | 56 ------------------- .../Screens/Edit/Beatmaps/Pages/PageScreen.cs | 2 +- .../Edit/Beatmaps/Singers/SingerScreen.cs | 2 +- .../Beatmaps/Translate/TranslateScreen.cs | 2 +- 4 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/BeatmapEditorRoundedScreen.cs diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/BeatmapEditorRoundedScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/BeatmapEditorRoundedScreen.cs deleted file mode 100644 index 392b7b495..000000000 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/BeatmapEditorRoundedScreen.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) andy840119 . Licensed under the GPL Licence. -// See the LICENCE file in the repository root for full licence text. - -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Shapes; -using osu.Game.Overlays; - -namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps; - -/// -/// Copied from EditorRoundedScreen -/// todo: will remove this screen eventually because new editor design not have round screen style. -/// -public partial class BeatmapEditorRoundedScreen : BeatmapEditorScreen -{ - public const int HORIZONTAL_PADDING = 100; - - private Container roundedContent = null!; - - protected override Container Content => roundedContent; - - public BeatmapEditorRoundedScreen(KaraokeBeatmapEditorScreenMode type) - : base(type) - { - } - - [BackgroundDependencyLoader] - private void load(OverlayColourProvider colourProvider) - { - base.Content.Add(new Container - { - RelativeSizeAxes = Axes.Both, - Padding = new MarginPadding(50), - Child = new Container - { - RelativeSizeAxes = Axes.Both, - Masking = true, - CornerRadius = 10, - Children = new Drawable[] - { - new Box - { - Colour = colourProvider.Background3, - RelativeSizeAxes = Axes.Both, - }, - roundedContent = new Container - { - RelativeSizeAxes = Axes.Both, - }, - }, - }, - }); - } -} diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Pages/PageScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Pages/PageScreen.cs index 246649af2..2efbc4843 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Pages/PageScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Pages/PageScreen.cs @@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Pages; [Cached(typeof(IPageStateProvider))] -public partial class PageScreen : BeatmapEditorRoundedScreen, IPageStateProvider +public partial class PageScreen : BeatmapEditorScreen, IPageStateProvider { [Cached(typeof(IBeatmapPagesChangeHandler))] private readonly BeatmapPagesChangeHandler beatmapPagesChangeHandler; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/SingerScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/SingerScreen.cs index 40815e4cf..23301de94 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/SingerScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/SingerScreen.cs @@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Singers; [Cached(typeof(ISingerScreenScrollingInfoProvider))] -public partial class SingerScreen : BeatmapEditorRoundedScreen, ISingerScreenScrollingInfoProvider +public partial class SingerScreen : BeatmapEditorScreen, ISingerScreenScrollingInfoProvider { [Cached(typeof(IBeatmapSingersChangeHandler))] private readonly BeatmapSingersChangeHandler beatmapSingersChangeHandler; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translate/TranslateScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translate/TranslateScreen.cs index 9cf594792..19c442bf7 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translate/TranslateScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translate/TranslateScreen.cs @@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Translate; -public partial class TranslateScreen : BeatmapEditorRoundedScreen +public partial class TranslateScreen : BeatmapEditorScreen { [Cached(typeof(IBeatmapLanguagesChangeHandler))] private readonly BeatmapLanguagesChangeHandler beatmapLanguagesChangeHandler; From 77186ce24af8287103f86cba486835a8e6e9436d Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Sat, 26 Aug 2023 17:22:52 -0700 Subject: [PATCH 2/3] Fix singer and translate screen not having background --- .../Edit/Beatmaps/Singers/SingerScreen.cs | 25 +++++++++++------ .../Beatmaps/Translate/TranslateScreen.cs | 27 ++++++++++++------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/SingerScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/SingerScreen.cs index 23301de94..f3a52b41f 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/SingerScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Singers/SingerScreen.cs @@ -5,6 +5,7 @@ using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; using osu.Game.Graphics.Containers; using osu.Game.Overlays; using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Beatmaps; @@ -43,25 +44,33 @@ public SingerScreen() } [BackgroundDependencyLoader] - private void load(EditorClock editorClock) + private void load(EditorClock editorClock, OverlayColourProvider colourProvider) { // initialize scroll zone. BindableZoom.MaxValue = ZoomableScrollContainerUtils.GetZoomLevelForVisibleMilliseconds(editorClock, 8000); BindableZoom.MinValue = ZoomableScrollContainerUtils.GetZoomLevelForVisibleMilliseconds(editorClock, 80000); BindableZoom.Value = BindableZoom.Default = ZoomableScrollContainerUtils.GetZoomLevelForVisibleMilliseconds(editorClock, 40000); - Add(new FixedSectionsContainer + Children = new Drawable[] { - FixedHeader = new SingerScreenHeader(), - RelativeSizeAxes = Axes.Both, - Children = new[] + new Box { - new SingerEditSection + Colour = colourProvider.Background3, + RelativeSizeAxes = Axes.Both, + }, + new FixedSectionsContainer + { + FixedHeader = new SingerScreenHeader(), + RelativeSizeAxes = Axes.Both, + Children = new[] { - RelativeSizeAxes = Axes.Both, + new SingerEditSection + { + RelativeSizeAxes = Axes.Both, + }, }, }, - }); + }; } protected override void LoadComplete() diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translate/TranslateScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translate/TranslateScreen.cs index 19c442bf7..ac6aa0676 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translate/TranslateScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Translate/TranslateScreen.cs @@ -4,6 +4,7 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; using osu.Game.Graphics.Containers; using osu.Game.Overlays; using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Beatmaps; @@ -27,21 +28,29 @@ public TranslateScreen() } [BackgroundDependencyLoader] - private void load() + private void load(OverlayColourProvider colourProvider) { - Add(new SectionsContainer + Children = new Drawable[] { - FixedHeader = new TranslateScreenHeader(), - RelativeSizeAxes = Axes.Both, - Children = new Container[] + new Box { - new TranslateEditSection + Colour = colourProvider.Background3, + RelativeSizeAxes = Axes.Both, + }, + new SectionsContainer + { + FixedHeader = new TranslateScreenHeader(), + RelativeSizeAxes = Axes.Both, + Children = new Container[] { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, + new TranslateEditSection + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + }, }, }, - }); + }; } internal partial class TranslateScreenHeader : OverlayHeader From 920a5c051da0229f6f6d09ace3cadecf21552abf Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Sat, 26 Aug 2023 17:23:47 -0700 Subject: [PATCH 3/3] Remove custom editor screen animations --- .../Screens/Edit/GenericEditorScreen.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditorScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditorScreen.cs index a5959313a..76879ba64 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditorScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditorScreen.cs @@ -1,7 +1,6 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Framework.Graphics; using osu.Game.Screens.Edit; namespace osu.Game.Rulesets.Karaoke.Screens.Edit; @@ -18,16 +17,4 @@ protected GenericEditorScreen(TType type) { Type = type; } - - protected override void PopIn() - { - this.ScaleTo(1f, 200, Easing.OutQuint) - .FadeIn(200, Easing.OutQuint); - } - - protected override void PopOut() - { - this.ScaleTo(0.98f, 200, Easing.OutQuint) - .FadeOut(200, Easing.OutQuint); - } }