Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions source/funkin/editors/charter/Charter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ class Charter extends UIState {

strumlineLockButton = new CharterStrumlineButton("editors/charter/lock-strumline", translate("lock-unlock"));
strumlineLockButton.onClick = function () {
UIState.playEditorSound(!strumLines.draggable ? Flags.DEFAULT_CHARTER_STRUMUNLOCK_SOUND : Flags.DEFAULT_CHARTER_STRUMLOCK_SOUND);
if (!FlxG.sound.music.playing) UIState.playEditorSound(!strumLines.draggable ? Flags.DEFAULT_CHARTER_STRUMUNLOCK_SOUND : Flags.DEFAULT_CHARTER_STRUMLOCK_SOUND);
if (strumLines != null) {
strumLines.draggable = !strumLines.draggable;
strumlineLockButton.textTweenColor.color = strumLines.draggable ? 0xFF5C95CA : 0xFFE16565;
Expand Down Expand Up @@ -847,7 +847,7 @@ class Charter extends UIState {
else
Chart.save(PlayState.SONG, __diff.toLowerCase(), __variant, {saveMetaInChart: true, saveLocalEvents: true, seperateGlobalEvents: true, prettyPrint: Options.editorCharterPrettyPrint});

UIState.playEditorSound(Flags.DEFAULT_EDITOR_SAVE_SOUND);
if (!FlxG.sound.music.playing) UIState.playEditorSound(Flags.DEFAULT_EDITOR_SAVE_SOUND);
undos.save();
}
autoSaveNotif.cancelled = false;
Expand Down Expand Up @@ -1014,7 +1014,7 @@ class Charter extends UIState {
notesGroup.add(note);
selection = [note];
undos.addToUndo(CCreateSelection([note]));
UIState.playEditorSound(Flags.DEFAULT_CHARTER_NOTEPLACE_SOUND);
if (!FlxG.sound.music.playing) UIState.playEditorSound(Flags.DEFAULT_CHARTER_NOTEPLACE_SOUND);
}
isSelecting = false;
}
Expand Down Expand Up @@ -1053,7 +1053,7 @@ class Charter extends UIState {
selection = newSelection;
for (s in selection) s.selected = true;
isAltCopyDrag = true;
UIState.playEditorSound(Flags.DEFAULT_EDITOR_COPY_SOUND);
if (!FlxG.sound.music.playing) UIState.playEditorSound(Flags.DEFAULT_EDITOR_COPY_SOUND);
}
gridActionType = NOTE_DRAG;
}
Expand Down Expand Up @@ -1168,7 +1168,7 @@ class Charter extends UIState {
if (selected == null) return selected;

if (selected is CharterNote) {
UIState.playEditorSound(Flags.DEFAULT_CHARTER_NOTEDELETE_SOUND);
if (!FlxG.sound.music.playing) UIState.playEditorSound(Flags.DEFAULT_CHARTER_NOTEDELETE_SOUND);
var note:CharterNote = cast selected;
note.strumLineID = strumLines.members.indexOf(note.strumLine);
note.strumLine = null; // For static undos :D
Expand Down Expand Up @@ -2225,8 +2225,8 @@ class Charter extends UIState {
inline function _snap_decreasesnap(_) changequant(-1);
inline function _snap_resetsnap(_) setquant(16);

inline function changequant(change:Int) {UIState.playEditorSound(Flags.DEFAULT_CHARTER_SNAPPINGCHANGE_SOUND); quant = quants[FlxMath.wrap(quants.indexOf(quant) + change, 0, quants.length-1)]; buildSnapsUI();};
inline function setquant(newQuant:Int) {UIState.playEditorSound(Flags.DEFAULT_CHARTER_SNAPPINGCHANGE_SOUND); quant = newQuant; buildSnapsUI();}
inline function changequant(change:Int) {if (!FlxG.sound.music.playing) UIState.playEditorSound(Flags.DEFAULT_CHARTER_SNAPPINGCHANGE_SOUND); quant = quants[FlxMath.wrap(quants.indexOf(quant) + change, 0, quants.length-1)]; buildSnapsUI();};
inline function setquant(newQuant:Int) {if (!FlxG.sound.music.playing) UIState.playEditorSound(Flags.DEFAULT_CHARTER_SNAPPINGCHANGE_SOUND); quant = newQuant; buildSnapsUI();}

function buildSnapsUI():Array<UIContextMenuOption> {
var snapsTopButton:UITopMenuButton = topMenuSpr == null ? null : cast topMenuSpr.members[snapIndex];
Expand Down Expand Up @@ -2262,12 +2262,12 @@ class Charter extends UIState {
}

inline function _note_addsustain(t) {
UIState.playEditorSound(Flags.DEFAULT_CHARTER_SUSTAINADD_SOUND);
if (!FlxG.sound.music.playing) UIState.playEditorSound(Flags.DEFAULT_CHARTER_SUSTAINADD_SOUND);
changeNoteSustain(1);
}

inline function _note_subtractsustain(t) {
UIState.playEditorSound(Flags.DEFAULT_CHARTER_SUSTAINDELETE_SOUND);
if (!FlxG.sound.music.playing) UIState.playEditorSound(Flags.DEFAULT_CHARTER_SUSTAINDELETE_SOUND);
changeNoteSustain(-1);
}

Expand Down