-
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 #273 from andy840119/clean-up-code
Clean up code
- Loading branch information
Showing
32 changed files
with
69 additions
and
67 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// Copyright (c) andy840119 <[email protected]>. 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<CultureInfo>(); | ||
|
||
if (targetLanguages.Any()) | ||
{ | ||
detector.AddLanguages(targetLanguages.Select(x => x.Name).ToArray()); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// 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 System.IO; | ||
using System.Linq; | ||
using osu.Framework.Graphics; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Edit.Import | ||
{ | ||
|
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// 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 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<bool> 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 | ||
|
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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
// 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 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", | ||
|
2 changes: 1 addition & 1 deletion
2
osu.Game.Rulesets.Karaoke/Edit/ImportLyric/GenerateRuby/UseAutoGenerateRubyPopupDialog.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// 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 osu.Framework.Graphics.Sprites; | ||
using osu.Game.Overlays.Dialog; | ||
using System; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric.GenerateRuby | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
...me.Rulesets.Karaoke/Edit/ImportLyric/GenerateTimeTag/UseAutoGenerateTimeTagPopupDialog.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// 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 osu.Framework.Graphics.Sprites; | ||
using osu.Game.Overlays.Dialog; | ||
using System; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric.GenerateTimeTag | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
osu.Game.Rulesets.Karaoke/Edit/ImportLyric/IImportLyricSubScreen.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// 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.Sprites; | ||
using System; | ||
using osu.Framework.Graphics.Sprites; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric | ||
{ | ||
|
4 changes: 2 additions & 2 deletions
4
osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricManager.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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// Copyright (c) andy840119 <[email protected]>. 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 | ||
{ | ||
|
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// Copyright (c) andy840119 <[email protected]>. 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 | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
osu.Game.Rulesets.Karaoke/Edit/ImportLyric/ImportLyricSubScreen.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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// 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 osu.Framework.Allocation; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Sprites; | ||
using osu.Framework.Screens; | ||
using osu.Game.Graphics.UserInterface; | ||
using osu.Game.Overlays; | ||
using osu.Game.Screens; | ||
using System; | ||
|
||
namespace osu.Game.Rulesets.Karaoke.Edit.ImportLyric | ||
{ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// 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 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; | ||
|
2 changes: 1 addition & 1 deletion
2
osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackPopupDialog.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Copyright (c) andy840119 <[email protected]>. 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 | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
osu.Game.Rulesets.Karaoke/Edit/ImportLyric/RollBackResetPopupDialog.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Copyright (c) andy840119 <[email protected]>. 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 | ||
{ | ||
|
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.