Skip to content

Commit

Permalink
Add the reference lyric mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Jul 25, 2022
1 parent bc46bf4 commit 339b6e0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public LyricEditorModeMenu(Bindable<LyricEditorMode> config, string text)
{
LyricEditorMode.View,
LyricEditorMode.Texting,
LyricEditorMode.Reference,
LyricEditorMode.Language,
LyricEditorMode.EditRuby,
LyricEditorMode.EditRomaji,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ private static float getBaseHue(LyricEditorMode mode)
return 200 / 360f; // blue

case LyricEditorMode.Texting:
case LyricEditorMode.Reference:
return 0 / 360f; // red

case LyricEditorMode.Language:
Expand Down
6 changes: 6 additions & 0 deletions osu.Game.Rulesets.Karaoke/Edit/Lyrics/LyricEditorMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public enum LyricEditorMode
[Description("Texting")]
Texting,

/// <summary>
/// Mark the lyric is "similar" to another lyric.
/// </summary>
[Description("Reference")]
Reference,

/// <summary>
/// Can edit each lyric's language.
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions osu.Game.Rulesets.Karaoke/Edit/Lyrics/Rows/EditLyricRow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ Drawable createSubInfo()
case LyricEditorMode.Texting:
return null;

case LyricEditorMode.Reference:
// todo: add the reference info.
return null;

case LyricEditorMode.Language:
return new LanguageInfo(Lyric);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ private void refreshAlgorithmAndCaretPosition()
{
LyricEditorMode.View => null,
LyricEditorMode.Texting => getTextingmodeAlgorithm(),
LyricEditorMode.Reference => new NavigateCaretPositionAlgorithm(lyrics),
LyricEditorMode.Language => new ClickingCaretPositionAlgorithm(lyrics),
LyricEditorMode.EditRuby => new NavigateCaretPositionAlgorithm(lyrics),
LyricEditorMode.EditRomaji => new NavigateCaretPositionAlgorithm(lyrics),
Expand Down

0 comments on commit 339b6e0

Please sign in to comment.