Skip to content

Commit

Permalink
Expsoe the size for able to adjust the lyric display size.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Jul 20, 2024
1 parent 62f648f commit b1da561
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ public IEnumerable<Layer> Layers
}
}

public Vector2 LyricPosition
{
get => karaokeSpriteText.Position;
set => karaokeSpriteText.Position = value;
}

public void TriggerDisallowEditEffect()
{
InternalChildren.OfType<Layer>().ForEach(x => x.TriggerDisallowEditEffect(bindableMode.Value));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Content.Components.Lyrics;
using osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.States;
using osu.Game.Skinning;
using osuTK;

namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Content.Compose;

Expand Down Expand Up @@ -45,6 +46,7 @@ public LyricEditor()
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
LyricPosition = new Vector2(border),
TextSizeChanged = (self, size) =>
{
self.Width = size.X + border * 2;
Expand Down

0 comments on commit b1da561

Please sign in to comment.