LyricsTimeline

class LyricsTimeline(val lyrics: BuiltLyrics, val layout: LyricsLayout = LyricsLayout.SCROLL, val offsets: TimingOffsets = TimingOffsets(), val clock: PlaybackClock = PlaybackClock())(source)

One view's timeline: the clock, the selection, the scroll state. The renderer feeds it the playback time once per frame and draws what it answers.

Constructors

Link copied to clipboard
constructor(lyrics: BuiltLyrics, layout: LyricsLayout = LyricsLayout.SCROLL, offsets: TimingOffsets = TimingOffsets(), clock: PlaybackClock = PlaybackClock())

Properties

Link copied to clipboard

How player readings are turned into the time drawn.

Link copied to clipboard

Scrolling lines or the stage.

Link copied to clipboard

The song, as buildLyrics built it.

Link copied to clipboard

The theme's timing offsets.

Functions

Link copied to clipboard

The lines were measured again: the view resized, the scroll padding changed, a decoration came in. The next tick scrolls to where the active lines now are, as upstream's relayout arranges by marking the view as scrolled.

Link copied to clipboard

The user scrolled the view, which pauses autoscroll long enough to read where it landed. Unsynced lyrics are drifting on their own rather than following the song, so they resume sooner.

Link copied to clipboard

The user asked for autoscroll back, now.

Link copied to clipboard

stageElements: one item per line, then the credits when there are any.

Link copied to clipboard
fun tick(currentTimeS: Double, tickOptions: TickOptions, now: Double, viewport: ScrollViewport? = null): TimelineFrame

Renders the view at a playback time, in seconds.