Skip to content

Commit

Permalink
Post clean-up.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Dec 19, 2020
1 parent 343db24 commit eba0a83
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Karaoke.Edit.Lyrics;

Expand Down Expand Up @@ -53,11 +52,11 @@ internal void AskForAutoAssignLanguage()
{
DialogOverlay.Push(new UseLanguageDetectorPopupDialog(ok =>
{
if (ok)
{
LyricManager.AutoDetectLyricLanguage();
Navigation.State = NavigationState.Done;
}
if (!ok)
return;

LyricManager.AutoDetectLyricLanguage();
Navigation.State = NavigationState.Done;
}));
}

Expand Down Expand Up @@ -101,7 +100,7 @@ private class AssignLanguageTextFlowContainer : NavigationTextContainer
{
public AssignLanguageTextFlowContainer(AssignLanguageSubScreen screen)
{
AddLinkFactory(auto_assign_language, "language detector", () => screen.AskForAutoAssignLanguage());
AddLinkFactory(auto_assign_language, "language detector", screen.AskForAutoAssignLanguage);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Karaoke.Edit.Lyrics;

Expand Down Expand Up @@ -80,13 +79,15 @@ protected override void UpdateState(NavigationState value)
case NavigationState.Working:
case NavigationState.Done:
var mode = Screen.LyricEditor.Mode;

switch (mode)
{
case Mode.EditMode:
NavigationText = $"Cool! Try switching to [{cutting_mode}] if you wants to cut or combine lyric.";
break;
// todo : edit mode.
}

break;

case NavigationState.Error:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ internal void AskForAutoGenerateRuby()
{
DialogOverlay.Push(new UseAutoGenerateRubyPopupDialog(ok =>
{
if (ok)
{
RubyRomajiManager.AutoGenerateRubyTags();
Navigation.State = NavigationState.Done;
}
if (!ok)
return;

RubyRomajiManager.AutoGenerateRubyTags();
Navigation.State = NavigationState.Done;
}));
}

Expand Down Expand Up @@ -99,7 +99,7 @@ private class GenerateRubyTextFlowContainer : NavigationTextContainer
{
public GenerateRubyTextFlowContainer(GenerateRubySubScreen screen)
{
AddLinkFactory(auto_generate_ruby, "auto generate ruby", () => screen.AskForAutoGenerateRuby());
AddLinkFactory(auto_generate_ruby, "auto generate ruby", screen.AskForAutoGenerateRuby);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ internal void AskForAutoGenerateTimeTag()
{
DialogOverlay.Push(new UseAutoGenerateTimeTagPopupDialog(ok =>
{
if (ok)
{
timeTagManager.AutoGenerateTimeTags();
Navigation.State = NavigationState.Done;
}
if (!ok)
return;

timeTagManager.AutoGenerateTimeTags();
Navigation.State = NavigationState.Done;
}));
}

Expand All @@ -79,12 +79,12 @@ protected override void UpdateState(NavigationState value)
switch (value)
{
case NavigationState.Initial:
NavigationText = $"Press [{auto_generate_time_tag}] to autu-generate time tag. It's very easy.";
NavigationText = $"Press [{auto_generate_time_tag}] to auto-generate time tag. It's very easy.";
break;

case NavigationState.Working:
case NavigationState.Done:
NavigationText = $"Cool, you can reset yout time-tag by pressing [{auto_generate_time_tag}]";
NavigationText = $"Cool, you can reset your time-tag by pressing [{auto_generate_time_tag}]";
break;

case NavigationState.Error:
Expand All @@ -100,7 +100,7 @@ private class GenerateTimeTagTextFlowContainer : NavigationTextContainer
{
public GenerateTimeTagTextFlowContainer(GenerateTimeTagSubScreen screen)
{
AddLinkFactory(auto_generate_time_tag, "auto generate time tag", () => screen.AskForAutoGenerateTimeTag());
AddLinkFactory(auto_generate_time_tag, "auto generate time tag", screen.AskForAutoGenerateTimeTag);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ protected TopNavigation(ImportLyricSubScreen screen)
{
RelativeSizeAxes = Axes.Both,
},
text = CreateTextContainer().With(t => {
text = CreateTextContainer().With(t =>
{
t.Anchor = Anchor.CentreLeft;
t.Origin = Anchor.CentreLeft;
t.RelativeSizeAxes = Axes.X;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using osu.Game.Rulesets.Karaoke.Edit.Lyrics.Lyrics.Components;
using osu.Game.Rulesets.Karaoke.Objects;
using osu.Game.Rulesets.Karaoke.Utils;
using osuTK.Input;

namespace osu.Game.Rulesets.Karaoke.Edit.Lyrics.Lyrics
{
Expand Down

0 comments on commit eba0a83

Please sign in to comment.