This commit is contained in:
Kade M 2021-06-04 14:40:05 -07:00
parent 8ed8942323
commit af3e47be07

View File

@ -660,21 +660,16 @@ class ChartingState extends MusicBeatState
}
var writingNotes:Bool = false;
var doSnapShit:Bool = false;
var doSnapShit:Bool = true;
override function update(elapsed:Float)
{
updateHeads();
snapText.text = "Snap: 1/" + snap + " (Control + Left or Right to change.)\nAdd Notes: 1-8 (or click)\n";
snapText.text = "Snap: 1/" + snap + " (" + (doSnapShit ? "Control to disable" : "Snap Disabled, Control to renable") + ")\nAdd Notes: 1-8 (or click)\n";
curStep = recalculateSteps();
if (FlxG.keys.justPressed.ALT && UI_box.selected_tab == 0)
{
writingNotes = !writingNotes;
}
/*if (FlxG.keys.pressed.CONTROL && FlxG.keys.justPressed.RIGHT)
snap = snap * 2;
if (FlxG.keys.pressed.CONTROL && FlxG.keys.justPressed.LEFT)
@ -685,7 +680,7 @@ class ChartingState extends MusicBeatState
snap = 1;*/
if (FlxG.keys.justPressed.CONTROL)
doSnapShit = false;
doSnapShit = !doSnapShit;
Conductor.songPosition = FlxG.sound.music.time;
_song.song = typingShit.text;
@ -944,6 +939,10 @@ class ChartingState extends MusicBeatState
resetSection();
}
if (FlxG.sound.music.time < 0 || curStep < 0)
FlxG.sound.music.time = 0;
if (FlxG.mouse.wheel != 0)
{
FlxG.sound.music.pause();
@ -951,16 +950,13 @@ class ChartingState extends MusicBeatState
var stepMs = curStep * Conductor.stepCrochet;
if (FlxG.sound.music.time < 0 || curStep < 0)
FlxG.sound.music.time = 0;
trace(Conductor.stepCrochet / snap);
if (doSnapShit)
FlxG.sound.music.time = (stepMs + (Conductor.stepCrochet / snap)) * FlxG.mouse.wheel;
FlxG.sound.music.time = stepMs - (FlxG.mouse.wheel * Conductor.stepCrochet / snap);
else
FlxG.sound.music.time = (stepMs + (Conductor.stepCrochet / 16)) * FlxG.mouse.wheel;
FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 0.4);
trace(stepMs + " + " + Conductor.stepCrochet / snap + " -> " + FlxG.sound.music.time);
vocals.time = FlxG.sound.music.time;