Skip to content

Commit

Permalink
Implement the view-only lyric for able to show the lyric with time-tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Oct 8, 2022
1 parent f62b51a commit cac7d2d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

using System.Collections.Generic;
using osu.Game.Rulesets.Karaoke.Objects;

namespace osu.Game.Rulesets.Karaoke.Edit.Lyrics.Components.Lyrics
{
public class ViewOnlyLyric : InteractableLyric
{
public ViewOnlyLyric(Lyric lyric)
: base(lyric)
{
}

protected override IEnumerable<BaseLayer> CreateLayers(Lyric lyric)
{
return new BaseLayer[]
{
new TimeTagLayer(lyric),
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected override Drawable CreateTimingInfo(Lyric lyric)

protected override Drawable CreateContent(Lyric lyric)
{
return new EditableLyric(lyric)
return new ViewOnlyLyric(lyric)
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Expand Down

0 comments on commit cac7d2d

Please sign in to comment.