diff --git a/osu.Game.Rulesets.Karaoke.Tests/Edit/Generator/RubyTags/Ja/JaRubyTagGeneratorTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Edit/Generator/RubyTags/Ja/JaRubyTagGeneratorTest.cs index b687bfdd1..fdfb7cc6e 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Edit/Generator/RubyTags/Ja/JaRubyTagGeneratorTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Edit/Generator/RubyTags/Ja/JaRubyTagGeneratorTest.cs @@ -28,8 +28,8 @@ public void TestCreateRubyTagsWithRubyAsKatakana(string text, string[] ruby) RunRubyCheckTest(text, ruby, config); } - [TestCase("はなび", new string[] { "はな", "び" })] - [TestCase("ハナビ", new string[] { "はなび" })] + [TestCase("はなび", new[] { "はな", "び" })] + [TestCase("ハナビ", new[] { "はなび" })] public void TestCreateRubyTagsWithEnableDuplicatedRuby(string text, string[] ruby) { var config = generatorConfig(nameof(JaRubyTagGeneratorConfig.EnableDuplicatedRuby)); @@ -46,6 +46,7 @@ protected void RunRubyCheckTest(string text, string[] ruby, JaRubyTagGeneratorCo var rubyTags = generator.CreateRubyTags(lyric); Assert.AreEqual(rubyTags.Length, ruby.Length); + foreach (var rubyTag in rubyTags) { Assert.IsTrue(ruby.Contains(rubyTag.Text)); diff --git a/osu.Game.Rulesets.Karaoke.Tests/Edit/TestSceneImportLyric.cs b/osu.Game.Rulesets.Karaoke.Tests/Edit/TestSceneImportLyric.cs index 79d681aa7..11deda5f6 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Edit/TestSceneImportLyric.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Edit/TestSceneImportLyric.cs @@ -62,6 +62,7 @@ public void TestGoToStep() => Schedule(() => Child = screen = new TestImportLyricScreen(new FileInfo(temp)); var steps = (ImportLyricStep[])Enum.GetValues(typeof(ImportLyricStep)); + foreach (var step in steps) { AddStep($"go to step {Enum.GetName(typeof(ImportLyricStep), step)}", () => { screen.GoToStep(step); }); @@ -77,20 +78,21 @@ public TestImportLyricScreen(FileInfo fileInfo) public void GoToStep(ImportLyricStep step) { - if (ScreenStack.CurrentScreen is IImportLyricSubScreen lyricSubScreen) + if (!(ScreenStack.CurrentScreen is IImportLyricSubScreen lyricSubScreen)) + return; + + if (step == lyricSubScreen.Step) + return; + + if (step <= lyricSubScreen.Step) + return; + + var totalSteps = ((ImportLyricStep[])Enum.GetValues(typeof(ImportLyricStep))).Where(x => x > lyricSubScreen.Step && x <= step); + + foreach (var gotoStep in totalSteps) { - if (step == lyricSubScreen.Step) - return; - - if (step <= lyricSubScreen.Step) - return; - - var totalSteps = ((ImportLyricStep[])Enum.GetValues(typeof(ImportLyricStep))).Where(x => x > lyricSubScreen.Step && x <= step); - foreach (var gotoStep in totalSteps) - { - ScreenStack.Push(gotoStep); - } - } + ScreenStack.Push(gotoStep); + } } } } diff --git a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/CultureInfoConverterTest.cs b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/CultureInfoConverterTest.cs index 052e98dc4..225643d5a 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/CultureInfoConverterTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/CultureInfoConverterTest.cs @@ -16,7 +16,7 @@ public class CultureInfoConverterTest [TestCase(null, "null")] public void TestSerialize(int? calId, string json) { - var language = calId != null ? new CultureInfo(calId.Value) : default(CultureInfo); + var language = calId != null ? new CultureInfo(calId.Value) : default; var result = JsonConvert.SerializeObject(language, createSettings()); Assert.AreEqual(result, json); } @@ -33,6 +33,7 @@ public void TestDeserialize(string json, int? calId) public void TestAllCultureInfo() { var cultureInfos = CultureInfo.GetCultures(CultureTypes.AllCultures); + foreach (var cultureInfo in cultureInfos) { // this weird cultureInfo will let test case failed. @@ -40,7 +41,7 @@ public void TestAllCultureInfo() continue; var json = JsonConvert.SerializeObject(cultureInfo, createSettings()); - var deserializedCultureInfo = JsonConvert.DeserializeObject(json, createSettings()); + var deserializedCultureInfo = JsonConvert.DeserializeObject(json, createSettings()); Assert.AreEqual(deserializedCultureInfo, cultureInfo); } } diff --git a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/TimeTagsConverterTest.cs b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/TimeTagsConverterTest.cs index 8c25ad770..b3f0a6612 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/TimeTagsConverterTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/TimeTagsConverterTest.cs @@ -19,7 +19,7 @@ public void TestSerialize() { var rowTimeTag = new[] { - TimeTagsUtils.Create(new TimeTagIndex(0, TimeTagIndex.IndexState.Start), 1000d), + TimeTagsUtils.Create(new TimeTagIndex(0), 1000d), TimeTagsUtils.Create(new TimeTagIndex(0, TimeTagIndex.IndexState.End), 1100d), TimeTagsUtils.Create(new TimeTagIndex(0, TimeTagIndex.IndexState.End), 1200d), }; @@ -35,6 +35,7 @@ public void TestDeserialize() const string json_string = "[\r\n \"0,0,1000\",\r\n \"0,1,1100\",\r\n \"0,1,1200\"\r\n]"; var result = JsonConvert.DeserializeObject[]>(json_string, createSettings()); + Assert.IsNotNull(result); Assert.AreEqual(result.Length, 3); Assert.AreEqual(result[0].Item1.Index, 0); Assert.AreEqual(result[0].Item1.State, TimeTagIndex.IndexState.Start); diff --git a/osu.Game.Rulesets.Karaoke.Tests/Utils/CharUtilsTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Utils/CharUtilsTest.cs index 1321ab90f..0fac62491 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Utils/CharUtilsTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Utils/CharUtilsTest.cs @@ -21,8 +21,8 @@ public class CharUtilsTest [TestCase('1', false)] public void TestIsKana(char c, bool match) { - var isKaka = CharUtils.IsKana(c); - Assert.AreEqual(isKaka, match); + var isKana = CharUtils.IsKana(c); + Assert.AreEqual(isKana, match); } [TestCase('A', true)] @@ -43,7 +43,7 @@ public void TestIsLatin(char c, bool match) [TestCase('#', true)] [TestCase('@', true)] [TestCase('A', false)] - public void TestIsASCIISymbol(char c, bool match) + public void TestIsAsciiSymbol(char c, bool match) { var isAsciiSymbol = CharUtils.IsAsciiSymbol(c); Assert.AreEqual(isAsciiSymbol, match); diff --git a/osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/SingerMetadata.cs b/osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/SingerMetadata.cs index d3ac548a3..5a5e7cce1 100644 --- a/osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/SingerMetadata.cs +++ b/osu.Game.Rulesets.Karaoke/Beatmaps/Metadatas/SingerMetadata.cs @@ -31,7 +31,7 @@ public void RemoveSinger(Singer singer) throw new NullReferenceException("Singer cannot be null."); if (!Singers.Contains(singer)) - throw new ArgumentOutOfRangeException("Singer is not in the list."); + throw new ArgumentOutOfRangeException(nameof(singer)); // Remove sub singers. var subSingers = GetSubSingers(singer); @@ -63,7 +63,7 @@ public void RemoveSubSinger(SubSinger subSinger) throw new NullReferenceException("Sub singer cannot be null."); if (!singers.Contains(subSinger)) - throw new ArgumentOutOfRangeException("Sub singer is not in the list"); + throw new ArgumentOutOfRangeException(nameof(subSinger)); singers.Remove(subSinger); } diff --git a/osu.Game.Rulesets.Karaoke/Edit/Generator/Languages/LanguageDetector.cs b/osu.Game.Rulesets.Karaoke/Edit/Generator/Languages/LanguageDetector.cs index 208a102a0..fb8fee1a1 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Generator/Languages/LanguageDetector.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Generator/Languages/LanguageDetector.cs @@ -1,10 +1,10 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Game.Rulesets.Karaoke.Objects; using System.Collections.Generic; using System.Globalization; using System.Linq; +using osu.Game.Rulesets.Karaoke.Objects; namespace osu.Game.Rulesets.Karaoke.Edit.Generator.Languages { @@ -15,6 +15,7 @@ public class LanguageDetector public LanguageDetector(LanguageDetectorConfig config) { var targetLanguages = config?.AcceptLanguage?.Where(x => x != null).ToList() ?? new List(); + if (targetLanguages.Any()) { detector.AddLanguages(targetLanguages.Select(x => x.Name).ToArray()); diff --git a/osu.Game.Rulesets.Karaoke/Edit/Generator/RubyTags/Ja/JaRubyTagGenerator.cs b/osu.Game.Rulesets.Karaoke/Edit/Generator/RubyTags/Ja/JaRubyTagGenerator.cs index 1131b2aa0..e0b24b95d 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Generator/RubyTags/Ja/JaRubyTagGenerator.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Generator/RubyTags/Ja/JaRubyTagGenerator.cs @@ -53,9 +53,10 @@ public override RubyTag[] CreateRubyTags(Lyric lyric) // Convert to Hiragana as default. var hiragana = JpStringUtils.ToHiragana(katakana); + if (!Config.EnableDuplicatedRuby) { - // Not add deplicated ruby if same as parent. + // Not add duplicated ruby if same as parent. var parentText = text.Substring(offsetAtt.StartOffset, offsetAtt.EndOffset - offsetAtt.StartOffset); if (parentText == katakana || parentText == hiragana) continue; diff --git a/osu.Game.Rulesets.Karaoke/Edit/Import/ImportManager.cs b/osu.Game.Rulesets.Karaoke/Edit/Import/ImportManager.cs index 98bdc58bc..7887e0f2d 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Import/ImportManager.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Import/ImportManager.cs @@ -1,9 +1,9 @@ // 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 System.IO; using System.Linq; +using osu.Framework.Graphics; namespace osu.Game.Rulesets.Karaoke.Edit.Import { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/AssignLanguage/UseLanguageDetectorPopupDialog.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/AssignLanguage/UseLanguageDetectorPopupDialog.cs index af16b3f40..e0edc4e57 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/AssignLanguage/UseLanguageDetectorPopupDialog.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/AssignLanguage/UseLanguageDetectorPopupDialog.cs @@ -1,9 +1,9 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Graphics.Sprites; using osu.Game.Overlays.Dialog; -using System; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric.AssignLanguage { @@ -13,7 +13,7 @@ public UseLanguageDetectorPopupDialog(Action okAction = null) { Icon = FontAwesome.Solid.Globe; HeaderText = "Language detector"; - BodyText = $"Would you like to use language detector to auto assign each lyric's language?"; + BodyText = "Would you like to use language detector to auto assign each lyric's language?"; Buttons = new PopupDialogButton[] { new PopupDialogOkButton diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/DragFile/DragFileSubScreen.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/DragFile/DragFileSubScreen.cs index f9c77c3c7..26f53a4ff 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/DragFile/DragFileSubScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/DragFile/DragFileSubScreen.cs @@ -1,6 +1,11 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; @@ -9,11 +14,6 @@ using osu.Game.Rulesets.Karaoke.Edit.ImportLyric.DragFile.Components; using osu.Game.Rulesets.Karaoke.Graphics.Overlays.Dialog; using osuTK; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric.DragFile { @@ -133,10 +133,7 @@ private PopupDialog createUnknownExceptionDialog() }; private PopupDialog createCompleteDialog() - => new OkPopupDialog(ok => - { - Complete(); - }) + => new OkPopupDialog(ok => { Complete(); }) { Icon = FontAwesome.Regular.CheckCircle, HeaderText = @"Import success", diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateRuby/UseAutoGenerateRubyPopupDialog.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateRuby/UseAutoGenerateRubyPopupDialog.cs index a73183b2d..e1c01d1d6 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateRuby/UseAutoGenerateRubyPopupDialog.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateRuby/UseAutoGenerateRubyPopupDialog.cs @@ -1,9 +1,9 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Graphics.Sprites; using osu.Game.Overlays.Dialog; -using System; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric.GenerateRuby { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateTimeTag/UseAutoGenerateTimeTagPopupDialog.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateTimeTag/UseAutoGenerateTimeTagPopupDialog.cs index ba6324fb9..ae14513d5 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateTimeTag/UseAutoGenerateTimeTagPopupDialog.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateTimeTag/UseAutoGenerateTimeTagPopupDialog.cs @@ -1,9 +1,9 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Graphics.Sprites; using osu.Game.Overlays.Dialog; -using System; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric.GenerateTimeTag { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/IImportLyricSubScreen.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/IImportLyricSubScreen.cs index 654f03e34..4cd03552f 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/IImportLyricSubScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/IImportLyricSubScreen.cs @@ -1,8 +1,8 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Framework.Graphics.Sprites; using System; +using osu.Framework.Graphics.Sprites; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricManager.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricManager.cs index 3fadd81e0..ac1c90a27 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricManager.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricManager.cs @@ -1,14 +1,14 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System.IO; +using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Game.Beatmaps; using osu.Game.Rulesets.Karaoke.Beatmaps.Formats; using osu.Game.Screens.Edit; -using System.IO; -using System.Linq; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricScreen.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricScreen.cs index c2928811d..65fbc78fc 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricScreen.cs @@ -1,6 +1,7 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System.IO; using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; @@ -10,7 +11,6 @@ using osu.Game.Graphics.Containers; using osu.Game.Rulesets.Karaoke.Edit.ImportLyric.DragFile; using osu.Game.Screens.Edit; -using System.IO; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreen.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreen.cs index 20dad880d..fa151e954 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreen.cs @@ -1,6 +1,7 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; @@ -8,7 +9,6 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Overlays; using osu.Game.Screens; -using System; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreenStack.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreenStack.cs index 9e7a06a85..6046ef79f 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreenStack.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreenStack.cs @@ -20,7 +20,7 @@ public void Push(ImportLyricStep step) throw new ScreenNotCurrentException("Cannot push same screen."); if (step <= lyricSubScreen.Step) - throw new ScreenNotCurrentException("Cannot push pervious then current screen."); + throw new ScreenNotCurrentException("Cannot push previous then current screen."); if (step != ImportLyricStep.GenerateRuby && step - lyricSubScreen.Step > 1) throw new ScreenNotCurrentException("Only generate ruby step can be skipped."); diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreenWithTopNavigation.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreenWithTopNavigation.cs index 6fb9f9183..75c0d338a 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreenWithTopNavigation.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreenWithTopNavigation.cs @@ -1,6 +1,7 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -9,7 +10,6 @@ using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osu.Game.Rulesets.Karaoke.Graphics.Shapes; -using System; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric { @@ -151,7 +151,7 @@ protected virtual void UpdateState(NavigationState value) throw new IndexOutOfRangeException("Should not goes to here"); } - // Force change stype if this step is able to hext step. + // Force change style if this step is able to go to next step. if (AbleToNextStep(value)) { button.Icon = FontAwesome.Regular.ArrowAltCircleRight; diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackPopupDialog.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackPopupDialog.cs index 004892f06..60e91e60b 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackPopupDialog.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackPopupDialog.cs @@ -1,8 +1,8 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Game.Overlays.Dialog; using System; +using osu.Game.Overlays.Dialog; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric { diff --git a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackResetPopupDialog.cs b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackResetPopupDialog.cs index 9686406dc..c7947dcf7 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackResetPopupDialog.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackResetPopupDialog.cs @@ -1,8 +1,8 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Game.Overlays.Dialog; using System; +using osu.Game.Overlays.Dialog; namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric { diff --git a/osu.Game.Rulesets.Karaoke/Edit/Layout/LayoutPreview.cs b/osu.Game.Rulesets.Karaoke/Edit/Layout/LayoutPreview.cs index 23b27df35..17736e67c 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Layout/LayoutPreview.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Layout/LayoutPreview.cs @@ -116,8 +116,8 @@ public KaraokeLayout PreviewLayout internal class LayoutPreviewArea : Container { - private OsuSpriteText widthRatioText; - private OsuSpriteText heightRatioText; + private readonly OsuSpriteText widthRatioText; + private readonly OsuSpriteText heightRatioText; private readonly Box background; private readonly Container content; diff --git a/osu.Game.Rulesets.Karaoke/Edit/Lyrics/LyricEditor.cs b/osu.Game.Rulesets.Karaoke/Edit/Lyrics/LyricEditor.cs index 69f553393..98dba46fe 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Lyrics/LyricEditor.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Lyrics/LyricEditor.cs @@ -16,8 +16,8 @@ public class LyricEditor : Container [Resolved] private EditorBeatmap beatmap { get; set; } - private KaraokeLyricEditorSkin skin; - private LyricRearrangeableListContainer container; + private readonly KaraokeLyricEditorSkin skin; + private readonly LyricRearrangeableListContainer container; public LyricEditor() { diff --git a/osu.Game.Rulesets.Karaoke/Edit/RubyRomaji/RubyRomajiScreen.cs b/osu.Game.Rulesets.Karaoke/Edit/RubyRomaji/RubyRomajiScreen.cs index 1171d5d86..6ce34eec7 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/RubyRomaji/RubyRomajiScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/RubyRomaji/RubyRomajiScreen.cs @@ -48,7 +48,7 @@ private void load(OsuColour colours) RelativeSizeAxes = Axes.Both, Children = new Container[] { - new RubyRomajiEditor() + new RubyRomajiEditor { RelativeSizeAxes = Axes.Both, }, diff --git a/osu.Game.Rulesets.Karaoke/Edit/Singers/Components/LyricPlacementColumn.cs b/osu.Game.Rulesets.Karaoke/Edit/Singers/Components/LyricPlacementColumn.cs index d4d5ed856..7cb1131b8 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Singers/Components/LyricPlacementColumn.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Singers/Components/LyricPlacementColumn.cs @@ -23,7 +23,7 @@ protected LyricPlacementColumn(Singer singer) } [BackgroundDependencyLoader(true)] - private void load(OverlayColourProvider colourProvider, [CanBeNull]KaraokeHitObjectComposer composer) + private void load(OverlayColourProvider colourProvider, [CanBeNull] KaraokeHitObjectComposer composer) { InternalChildren = new Drawable[] { diff --git a/osu.Game.Rulesets.Karaoke/Edit/Singers/Components/Timeline/LyricBlueprintContainer.cs b/osu.Game.Rulesets.Karaoke/Edit/Singers/Components/Timeline/LyricBlueprintContainer.cs index 70905713e..d6caa55be 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Singers/Components/Timeline/LyricBlueprintContainer.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Singers/Components/Timeline/LyricBlueprintContainer.cs @@ -25,10 +25,10 @@ protected override SelectionHandler CreateSelectionHandler() protected override SelectionBlueprint CreateBlueprintFor(HitObject hitObject) { - if (!(hitObject is Lyric)) + if (!(hitObject is Lyric)) return null; - return new LyricTimelineHitObjectBlueprint(hitObject, singer); + return new LyricTimelineHitObjectBlueprint(hitObject, singer); } } } diff --git a/osu.Game.Rulesets.Karaoke/Graphics/Cursor/TimeTagTooltip.cs b/osu.Game.Rulesets.Karaoke/Graphics/Cursor/TimeTagTooltip.cs index ad6448666..69c1f6422 100644 --- a/osu.Game.Rulesets.Karaoke/Graphics/Cursor/TimeTagTooltip.cs +++ b/osu.Game.Rulesets.Karaoke/Graphics/Cursor/TimeTagTooltip.cs @@ -1,6 +1,7 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -10,7 +11,6 @@ using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osuTK; -using System; namespace osu.Game.Rulesets.Karaoke.Graphics.Cursor { diff --git a/osu.Game.Rulesets.Karaoke/Graphics/Overlays/Dialog/OkPopupDialog.cs b/osu.Game.Rulesets.Karaoke/Graphics/Overlays/Dialog/OkPopupDialog.cs index 404069224..d3693279b 100644 --- a/osu.Game.Rulesets.Karaoke/Graphics/Overlays/Dialog/OkPopupDialog.cs +++ b/osu.Game.Rulesets.Karaoke/Graphics/Overlays/Dialog/OkPopupDialog.cs @@ -1,8 +1,8 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Game.Overlays.Dialog; using System; +using osu.Game.Overlays.Dialog; namespace osu.Game.Rulesets.Karaoke.Graphics.Overlays.Dialog { diff --git a/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableCircleSingerAvatar.cs b/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableCircleSingerAvatar.cs index 57c6dbec9..59e2d1838 100644 --- a/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableCircleSingerAvatar.cs +++ b/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableCircleSingerAvatar.cs @@ -1,11 +1,11 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Allocation; using osu.Framework.Graphics.Textures; using osu.Game.Rulesets.Karaoke.Beatmaps.Metadatas; using osuTK.Graphics; -using System; namespace osu.Game.Rulesets.Karaoke.Graphics.Sprites { diff --git a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/CultureInfoConverter.cs b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/CultureInfoConverter.cs index 1978a0500..b9943a228 100644 --- a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/CultureInfoConverter.cs +++ b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/CultureInfoConverter.cs @@ -1,10 +1,10 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using System; using System.Globalization; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace osu.Game.Rulesets.Karaoke.IO.Serialization.Converters { diff --git a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs index 80f5b42c7..abd0fde6d 100644 --- a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs +++ b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs @@ -2,7 +2,6 @@ // See the LICENCE file in the repository root for full licence text. using System; -using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using osu.Framework.Allocation; @@ -15,7 +14,6 @@ using osu.Game.Rulesets.Karaoke.Skinning; using osu.Game.Rulesets.Karaoke.Skinning.Components; using osu.Game.Rulesets.Karaoke.Utils; -using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; using osu.Game.Skinning; @@ -56,7 +54,7 @@ public DrawableLyric([CanBeNull] Lyric hitObject) [BackgroundDependencyLoader] private void load() - { + { Scale = new Vector2(2f); AutoSizeAxes = Axes.Both; InternalChildren = new Drawable[] diff --git a/osu.Game.Rulesets.Karaoke/Utils/TimeTagsUtils.cs b/osu.Game.Rulesets.Karaoke/Utils/TimeTagsUtils.cs index fd50ac23e..e398db2c0 100644 --- a/osu.Game.Rulesets.Karaoke/Utils/TimeTagsUtils.cs +++ b/osu.Game.Rulesets.Karaoke/Utils/TimeTagsUtils.cs @@ -201,7 +201,7 @@ public static IReadOnlyDictionary ToDictionary(Tuple /// Dictionary. - /// Time tagd + /// Time tags public static Tuple[] ToTimeTagList(IReadOnlyDictionary dictionary) { return dictionary.Select(d => Create(d.Key, d.Value)).ToArray(); @@ -238,7 +238,7 @@ public enum GroupCheck Asc, /// - /// Mark pervious tag is error if conflict. + /// Mark previous tag is error if conflict. /// Desc }