Skip to content

Commit 848b72f

Browse files
FINALLY got around to working on this
1 parent 3fb6c8e commit 848b72f

File tree

1 file changed

+45
-22
lines changed

1 file changed

+45
-22
lines changed

source/funkin/editors/charter/Charter.hx

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,36 +1214,59 @@ class Charter extends UIState {
12141214

12151215
if (isLiveCharting) {
12161216
if (controls.LEFT) {
1217-
var leftrec = new CharterNote();
1218-
leftrec.updatePos(1.0, 0, 0, 0);
1219-
add(leftrec);
1220-
notesGroup.add(leftrec);
1217+
var note = new CharterNote();
1218+
note.updatePos(
1219+
FlxMath.bound(quantStep((Conductor.songPosition - Conductor.songOffset)/40), 0, __endStep-1),
1220+
0,
1221+
0,
1222+
noteType,
1223+
strumLines.members[0]
1224+
);
1225+
notesGroup.add(note);
1226+
selection = [note];
1227+
undos.addToUndo(CCreateSelection([note]));
12211228
}
12221229
else if (controls.DOWN) {
1223-
var downrec = new CharterNote();
1224-
downrec.updatePos(1.0, 1, 0, 0);
1225-
add(downrec);
1226-
notesGroup.add(downrec);
1230+
var note = new CharterNote();
1231+
note.updatePos(
1232+
FlxMath.bound(quantStep((Conductor.songPosition - Conductor.songOffset)/40), 0, __endStep-1),
1233+
1,
1234+
0,
1235+
noteType,
1236+
strumLines.members[0]
1237+
);
1238+
notesGroup.add(note);
1239+
selection = [note];
1240+
undos.addToUndo(CCreateSelection([note]));
12271241
}
12281242
else if (controls.UP) {
1229-
var uprec = new CharterNote();
1230-
uprec.updatePos(1.0, 2, 0, 0);
1231-
add(uprec);
1232-
notesGroup.add(uprec);
1243+
var note = new CharterNote();
1244+
note.updatePos(
1245+
FlxMath.bound(quantStep((Conductor.songPosition - Conductor.songOffset)/40), 0, __endStep-1),
1246+
2,
1247+
0,
1248+
noteType,
1249+
strumLines.members[0]
1250+
);
1251+
notesGroup.add(note);
1252+
selection = [note];
1253+
undos.addToUndo(CCreateSelection([note]));
12331254
}
12341255
else if (controls.RIGHT) {
1235-
var rightrec = new CharterNote();
1236-
rightrec.updatePos(1.0, 3, 0, 0);
1237-
add(rightrec);
1238-
notesGroup.add(rightrec);
1256+
var note = new CharterNote();
1257+
note.updatePos(
1258+
FlxMath.bound(quantStep((Conductor.songPosition - Conductor.songOffset)/40), 0, __endStep-1),
1259+
3,
1260+
0,
1261+
noteType,
1262+
strumLines.members[0]
1263+
);
1264+
notesGroup.add(note);
1265+
selection = [note];
1266+
undos.addToUndo(CCreateSelection([note]));
12391267
}
12401268
else if (controls.ACCEPT) {
12411269
trace("hey dummy I'm pressing accept");
1242-
FlxG.sound.music.pause();
1243-
vocals.pause();
1244-
for (strumLine in strumLines.members)
1245-
strumLine.vocals.pause();
1246-
12471270
isLiveCharting = false;
12481271
recordingDisplay(false);
12491272
}
@@ -1258,7 +1281,7 @@ class Charter extends UIState {
12581281
}
12591282
charterCamera.scroll.set(
12601283
((((40*4) * gridBackdrops.strumlinesAmount) - FlxG.width) / 2),
1261-
gridBackdrops.conductorSprY - (FlxG.height * 0.5)
1284+
gridBackdrops.SprY - (FlxG.height * 0.5)
12621285
);
12631286

12641287
if (topMenuSpr.members[playbackIndex] != null) {

0 commit comments

Comments
 (0)