-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #964 from andy840119/remove-old-manager
Remove lyric manager.
- Loading branch information
Showing
28 changed files
with
282 additions
and
753 deletions.
There are no files selected for viewing
152 changes: 0 additions & 152 deletions
152
osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneLyricEditor.cs
This file was deleted.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneLyricEditorScreen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using NUnit.Framework; | ||
using osu.Framework.Allocation; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Containers; | ||
using osu.Game.Overlays; | ||
using osu.Game.Rulesets.Karaoke.Configuration; | ||
using osu.Game.Rulesets.Karaoke.Edit.Checker; | ||
using osu.Game.Rulesets.Karaoke.Edit.Lyrics; | ||
using osu.Game.Rulesets.Karaoke.Graphics.UserInterface; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Tests.Editor | ||
{ | ||
public class TestSceneLyricEditorScreen : KaraokeEditorScreenTestScene<LyricEditorScreen> | ||
{ | ||
protected override Container<Drawable> Content { get; } = new Container { RelativeSizeAxes = Axes.Both }; | ||
|
||
protected override LyricEditorScreen CreateEditorScreen() => new(); | ||
|
||
private DialogOverlay dialogOverlay; | ||
private LanguageSelectionDialog languageSelectionDialog; | ||
private LyricCheckerManager lyricCheckManager; | ||
private KaraokeRulesetLyricEditorConfigManager lyricEditorConfigManager; | ||
|
||
[BackgroundDependencyLoader] | ||
private void load() | ||
{ | ||
base.Content.AddRange(new Drawable[] | ||
{ | ||
Content, | ||
dialogOverlay = new DialogOverlay(), | ||
languageSelectionDialog = new LanguageSelectionDialog(), | ||
lyricCheckManager = new LyricCheckerManager(), | ||
}); | ||
|
||
Dependencies.Cache(dialogOverlay); | ||
Dependencies.Cache(languageSelectionDialog); | ||
Dependencies.Cache(lyricCheckManager); | ||
Dependencies.Cache(lyricEditorConfigManager = new KaraokeRulesetLyricEditorConfigManager()); | ||
} | ||
|
||
[TestCase(LyricEditorMode.View)] | ||
[TestCase(LyricEditorMode.Manage)] | ||
[TestCase(LyricEditorMode.Typing)] | ||
[TestCase(LyricEditorMode.Language)] | ||
[TestCase(LyricEditorMode.EditRuby)] | ||
[TestCase(LyricEditorMode.EditRomaji)] | ||
[TestCase(LyricEditorMode.CreateTimeTag)] | ||
[TestCase(LyricEditorMode.EditNote)] | ||
[TestCase(LyricEditorMode.Layout)] | ||
[TestCase(LyricEditorMode.Singer)] | ||
public void TestSwitchMode(LyricEditorMode mode) | ||
{ | ||
AddStep($"switch to mode {Enum.GetName(typeof(LyricEditorMode), mode)}", () => | ||
{ | ||
lyricEditorConfigManager.SetValue(KaraokeRulesetLyricEditorSetting.LyricEditorMode, mode); | ||
}); | ||
AddWaitStep("wait for switch to new mode", 5); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.