File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -3067,6 +3067,7 @@ class PlayState extends MusicBeatSubState
30673067 targetSongId : currentSong .id ,
30683068 targetSongDifficulty : currentDifficulty ,
30693069 targetSongVariation : currentVariation ,
3070+ targetSongPosition : Conductor .instance .songPosition
30703071 }));
30713072 }
30723073 }
Original file line number Diff line number Diff line change @@ -2377,6 +2377,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
23772377 var targetSongDifficulty = params .targetSongDifficulty ?? null ;
23782378 var targetSongVariation = params .targetSongVariation ?? null ;
23792379 this .loadSongAsTemplate (params .targetSongId , targetSongDifficulty , targetSongVariation );
2380+
2381+ // Set the scroll position to the current song time.
2382+ scrollPositionInMs = Math .min (params .targetSongPosition ?? 0 , songLengthInMs );
2383+ currentScrollEase = scrollPositionInPixels ;
2384+ moveSongToScrollPosition ();
23802385 }
23812386 else
23822387 {
@@ -6126,7 +6131,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
61266131 }
61276132
61286133 PlayStatePlaylist .reset ();
6129-
6134+
61306135 // TODO: Rework asset system so we can remove this jank.
61316136 switch (currentSongStage )
61326137 {
@@ -7060,6 +7065,11 @@ typedef ChartEditorParams =
70607065 * If non-null, load this variation immediately instead of the default variation.
70617066 */
70627067 var ? targetSongVariation : String ;
7068+
7069+ /**
7070+ * If non-null, set this as the song position immediately instead of the default song position.
7071+ */
7072+ var ? targetSongPosition : Float ;
70637073};
70647074
70657075/**
You can’t perform that action at this time.
0 commit comments