fix some stuff

This commit is contained in:
Kade M
2021-07-07 15:59:33 -07:00
parent d0d2adcbfe
commit ffb726d8a1
3 changed files with 38 additions and 16 deletions

View File

@ -129,7 +129,7 @@ class ChartingState extends MusicBeatState
blackBorder.alpha = 0.3;
snapText = new FlxText(60,10,0,"Snap: 1/" + snap + " (Press Control to unsnap the cursor)\nAdd Notes: 1-8 (or click)\nDiff: 0", 14);
snapText = new FlxText(60,10,0,"Snap: 1/" + snap + " (Press SHIFT to unsnap the cursor)\nAdd Notes: 1-8 (or click)\nDiff: 0", 14);
snapText.scrollFactor.set();
gridBlackLine = new FlxSprite(gridBG.x + gridBG.width / 2).makeGraphic(2, Std.int(gridBG.height), FlxColor.BLACK);
@ -660,7 +660,7 @@ class ChartingState extends MusicBeatState
}
var writingNotes:Bool = false;
var doSnapShit:Bool = true;
var doSnapShit:Bool = false;
public var diff:Float = 0;
@ -668,7 +668,7 @@ class ChartingState extends MusicBeatState
{
updateHeads();
snapText.text = "Song Diff: " + diff + "\nSnap: 1/" + snap + " (" + (doSnapShit ? "Control to disable" : "Snap Disabled, Control to renable") + ")\nAdd Notes: 1-8 (or click)";
snapText.text = "Snap: 1/" + snap + " (" + (doSnapShit ? "Shift to disable" : "Snap Disabled, Shift to renable. It's a bit buggy") + ")\nAdd Notes: 1-8 (or click)";
curStep = recalculateSteps();
@ -681,7 +681,7 @@ class ChartingState extends MusicBeatState
if (snap <= 1)
snap = 1;*/
if (FlxG.keys.justPressed.CONTROL)
if (FlxG.keys.justPressed.SHIFT)
doSnapShit = !doSnapShit;
Conductor.songPosition = FlxG.sound.music.time;
@ -961,17 +961,30 @@ class ChartingState extends MusicBeatState
vocals.pause();
claps.splice(0, claps.length);
var stepMs = curStep * Conductor.stepCrochet;
var amount = FlxG.mouse.wheel;
trace(Conductor.stepCrochet / snap);
if(amount > 0 && strumLine.y < gridBG.y)
amount = 0;
if (doSnapShit)
FlxG.sound.music.time = stepMs - (FlxG.mouse.wheel * Conductor.stepCrochet / snap);
else
FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 0.4);
trace(stepMs + " + " + Conductor.stepCrochet / snap + " -> " + FlxG.sound.music.time);
{
var increase:Int = 0;
if (amount < 0)
increase = 1;
else
increase = -1;
trace(increase + " - " + curStep + " - " + (curStep + increase));
curStep += increase;
var stepMs = curStep * Conductor.stepCrochet;
FlxG.sound.music.time = stepMs;
}
else
FlxG.sound.music.time -= (amount * Conductor.stepCrochet * 0.4);
vocals.time = FlxG.sound.music.time;
}
@ -1187,7 +1200,7 @@ class ChartingState extends MusicBeatState
function updateGrid():Void
{
remove(gridBG);
gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * _song.notes[curSection].lengthInSteps);
gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16);
add(gridBG);
remove(gridBlackLine);
@ -1263,8 +1276,6 @@ class ChartingState extends MusicBeatState
}
}
if (_song != null)
diff = DiffCalc.CalculateDiff(_song);
}
private function addSection(lengthInSteps:Int = 16):Void