From a23071bda435a548d613bb96bc8f4f67140776cc Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 28 May 2022 12:58:16 +0800 Subject: [PATCH 1/4] update package to the latest. --- osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj index beff08c29..20c81cf31 100644 --- a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj +++ b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj @@ -13,7 +13,7 @@ - + From 9b2688c34027d58ccf60b2cdabc7f1fc2cbe2ebd Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 28 May 2022 13:06:30 +0800 Subject: [PATCH 2/4] Follow the `EditorScreenSwitcherControl` to make the new design. --- .../Menus/GenericScreenSelectionTabControl.cs | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Components/Menus/GenericScreenSelectionTabControl.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Components/Menus/GenericScreenSelectionTabControl.cs index b40a5e156..28a44eb0e 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Components/Menus/GenericScreenSelectionTabControl.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Components/Menus/GenericScreenSelectionTabControl.cs @@ -2,20 +2,19 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; -using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; +using osu.Game.Overlays; using osu.Game.Screens.Edit.Components.Menus; using osuTK; -using osuTK.Graphics; namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Components.Menus { /// - /// Copied from + /// Copied from /// /// public class GenericScreenSelectionTabControl : OsuTabControl @@ -27,22 +26,19 @@ public GenericScreenSelectionTabControl() TabContainer.RelativeSizeAxes &= ~Axes.X; TabContainer.AutoSizeAxes = Axes.X; - TabContainer.Padding = new MarginPadding(); - - AddInternal(new Box - { - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft, - RelativeSizeAxes = Axes.X, - Height = 1, - Colour = Color4.White.Opacity(0.2f), - }); + TabContainer.Padding = new MarginPadding(10); } [BackgroundDependencyLoader] - private void load(OsuColour colours) + private void load(OverlayColourProvider colourProvider) { - AccentColour = colours.Yellow; + AccentColour = colourProvider.Light3; + + AddInternal(new Box + { + RelativeSizeAxes = Axes.Both, + Colour = colourProvider.Background2, + }); } protected override Dropdown CreateDropdown() => null; @@ -59,6 +55,15 @@ public TabItem(TScreenMode value) Text.Margin = new MarginPadding(); Text.Anchor = Anchor.CentreLeft; Text.Origin = Anchor.CentreLeft; + + Text.Font = OsuFont.TorusAlternate; + + Bar.Expire(); + } + + [BackgroundDependencyLoader] + private void load(OverlayColourProvider colourProvider) + { } protected override void OnActivated() From 3dd7bd1f7668605482814d1deabf19c923e94d4b Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 28 May 2022 13:07:23 +0800 Subject: [PATCH 3/4] Mark the round screen as out-dated. will follow the new design eventually. --- osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorRoundedScreen.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorRoundedScreen.cs b/osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorRoundedScreen.cs index 540b66c07..2731bda11 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorRoundedScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/KaraokeEditorRoundedScreen.cs @@ -6,12 +6,12 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Game.Overlays; -using osu.Game.Screens.Edit; namespace osu.Game.Rulesets.Karaoke.Edit { /// - /// Copied from + /// Copied from EditorRoundedScreen + /// todo: will remove this screen eventually because new editor design not have round screen style. /// public class KaraokeEditorRoundedScreen : KaraokeEditorScreen { From f49b2c8eaad45fc670e522cddd912e75e6996b05 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 28 May 2022 13:39:56 +0800 Subject: [PATCH 4/4] Fix the test case runs failed. --- .../Editor/TestSceneEditorMenuBar.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneEditorMenuBar.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneEditorMenuBar.cs index dde8bcc79..1ceda3684 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneEditorMenuBar.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneEditorMenuBar.cs @@ -8,6 +8,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics.UserInterface; +using osu.Game.Overlays; using osu.Game.Rulesets.Karaoke.Configuration; using osu.Game.Rulesets.Karaoke.Edit.Components.Menus; using osu.Game.Rulesets.Karaoke.Edit.Lyrics; @@ -19,6 +20,9 @@ namespace osu.Game.Rulesets.Karaoke.Tests.Editor [TestFixture] public class TestSceneEditorMenuBar : OsuTestScene { + [Cached] + private readonly OverlayColourProvider overlayColour = new(OverlayColourScheme.Aquamarine); + [BackgroundDependencyLoader] private void load() {