Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove BeatmapEditorRoundedScreen #2105

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -17,7 +18,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;
Expand All @@ -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<Drawable>
Children = new Drawable[]
{
FixedHeader = new SingerScreenHeader(),
RelativeSizeAxes = Axes.Both,
Children = new[]
new Box
{
new SingerEditSection
Colour = colourProvider.Background3,
RelativeSizeAxes = Axes.Both,
},
new FixedSectionsContainer<Drawable>
{
FixedHeader = new SingerScreenHeader(),
RelativeSizeAxes = Axes.Both,
Children = new[]
{
RelativeSizeAxes = Axes.Both,
new SingerEditSection
{
RelativeSizeAxes = Axes.Both,
},
},
},
});
};
}

protected override void LoadComplete()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
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;
using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Lyrics;

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;
Expand All @@ -27,21 +28,29 @@ public TranslateScreen()
}

[BackgroundDependencyLoader]
private void load()
private void load(OverlayColourProvider colourProvider)
{
Add(new SectionsContainer<Container>
Children = new Drawable[]
{
FixedHeader = new TranslateScreenHeader(),
RelativeSizeAxes = Axes.Both,
Children = new Container[]
new Box
{
new TranslateEditSection
Colour = colourProvider.Background3,
RelativeSizeAxes = Axes.Both,
},
new SectionsContainer<Container>
{
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
Expand Down
13 changes: 0 additions & 13 deletions osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditorScreen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. 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;
Expand All @@ -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);
}
}