Skip to content

Commit

Permalink
Merge pull request #1630 from andy840119/fix-lyric-editor-background-…
Browse files Browse the repository at this point in the history
…not-sync-the-edit-mode

Fix the background color not changed by edit mode in the lyric editor.
  • Loading branch information
andy840119 authored Oct 7, 2022
2 parents 826b6fb + d4c813e commit a0c5301
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion osu.Game.Rulesets.Karaoke/Edit/Lyrics/LyricList/Rows/Row.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ protected Row(Lyric lyric)
}
};

bindableMode.BindValueChanged(_ =>
{
updateBackgroundColour();
});

bindableHoverCaretPosition.BindValueChanged(e =>
{
if (ValueChangedEventUtils.LyricChanged(e))
Expand All @@ -98,8 +103,10 @@ protected Row(Lyric lyric)
}

[BackgroundDependencyLoader]
private void load(ILyricCaretState lyricCaretState)
private void load(ILyricEditorState state, ILyricCaretState lyricCaretState)
{
bindableMode.BindTo(state.BindableMode);

bindableHoverCaretPosition.BindTo(lyricCaretState.BindableHoverCaretPosition);
bindableCaretPosition.BindTo(lyricCaretState.BindableCaretPosition);

Expand Down

0 comments on commit a0c5301

Please sign in to comment.