mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-05 06:14:36 +00:00
playhead dragging
This commit is contained in:
parent
620cd50c1d
commit
d66141c15a
|
@ -1956,15 +1956,20 @@ class ChartEditorState extends HaxeUIState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
playbarHead.onDragEnd = function(_:DragEvent) {
|
playbarHead.onDrag = function(_:DragEvent) {
|
||||||
playbarHeadDragging = false;
|
if (playbarHeadDragging)
|
||||||
|
{
|
||||||
var value:Null<Float> = playbarHead?.value;
|
var value:Null<Float> = playbarHead?.value;
|
||||||
|
|
||||||
// Set the song position to where the playhead was moved to.
|
// Set the song position to where the playhead was moved to.
|
||||||
scrollPositionInPixels = songLengthInPixels * ((value ?? 0.0) / 100);
|
scrollPositionInPixels = songLengthInPixels * ((value ?? 0.0) / 100);
|
||||||
// Update the conductor and audio tracks to match.
|
// Update the conductor and audio tracks to match.
|
||||||
moveSongToScrollPosition();
|
moveSongToScrollPosition();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
playbarHead.onDragEnd = function(_:DragEvent) {
|
||||||
|
playbarHeadDragging = false;
|
||||||
|
|
||||||
// If we were dragging the playhead while the song was playing, resume playing.
|
// If we were dragging the playhead while the song was playing, resume playing.
|
||||||
if (playbarHeadDraggingWasPlaying)
|
if (playbarHeadDraggingWasPlaying)
|
||||||
|
|
Loading…
Reference in a new issue