Skip to content

Commit 4fe3ba7

Browse files
Charter/Editor additions and fixes (#793)
* camera highlights again * option to mute all hitsounds * context menus inside context menus and wip sliders in context menu * wip volume slider stuff * strumline preview fix with resizable editors * more slider stuff * editor sfx option should now actually work for everything * fixed strumline vocals volume, fixed note type option keybinds and moved bookmarks and note types into submenus * fix for saving difficulty specific meta json * some extra misc changes fixed camera highlights not updating when zooming in/out, optimized some of the highlight draw code so it doesn't do a full loop, and added the note scale flag into the strumline preview * fix compiling after merge
1 parent f44d019 commit 4fe3ba7

25 files changed

Lines changed: 621 additions & 155 deletions
234 Bytes
Loading

assets/languages/en/Editors.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@
223223
<str id="resetZoom">Reset Zoom</str>
224224
<str id="showSectionsSeparator">Show Sections Separator</str>
225225
<str id="showBeatsSeparator">Show Beats Separator</str>
226+
<str id="showCameraHighlights">Show Camera Highlights</str>
226227
<str id="rainbowWaveforms">Rainbow Waveforms</str>
227228
<str id="lowDetailWaveforms">Low Detail Waveforms</str>
228229
<str id="scrollLeft">Scroll Left</str>
@@ -236,8 +237,9 @@
236237
<str id="goEnd">Go forward to the end</str> <!-- used to be "Go to the end" -->
237238
<str id="addOpponentCamera">Add camera on Opponent</str>
238239
<str id="addPlayerCamera">Add camera on Player</str>
239-
<str id="muteInst">Mute instrumental</str>
240-
<str id="muteVoices">Mute voices</str>
240+
<str id="inst">Instrumental</str>
241+
<str id="voices">Voices</str>
242+
<str id="hitsounds">Hitsounds</str>
241243
</group>
242244

243245
<group name="BookmarkMenu" prefix="bookmarks.">
@@ -250,6 +252,7 @@
250252
<str id="editBookmarkListTitle">Bookmark List</str>
251253
<str id="editBookmarksTitle">Edit Bookmarks</str>
252254
<str id="newBookmarkName">New Bookmark</str>
255+
<str id="bookmarkList">Bookmark List</str>
253256
</group>
254257

255258
<str id="topBar.note">Note</str>
@@ -258,6 +261,7 @@
258261
<str id="subtractSustainLength">Subtract sustain length</str>
259262
<str id="selectAll">Select all</str>
260263
<str id="selectMeasure">Select measure</str>
264+
<str id="noteTypesList">Note Types List</str>
261265
<str id="editNoteTypesList">Edit Note Types List</str>
262266
</group>
263267
<str id="topBar.snap">Snap</str>
@@ -308,8 +312,9 @@
308312
<group name="StrumlineOptions" prefix="strumLine.">
309313
<str id="button-name">Options ↓</str>
310314

315+
<str id="waveforms">Waveforms</str>
311316
<str id="hitsounds">Hitsounds</str>
312-
<str id="muteVocals">Mute Vocals</str>
317+
<str id="vocals">Vocals</str>
313318
<str id="edit">Edit</str>
314319
<str id="delete">Delete</str>
315320

source/funkin/backend/chart/Chart.hx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,13 @@ class Chart {
278278
var filteredChart = filterChartForSaving(chart, saveSettings.saveMetaInChart, saveSettings.saveLocalEvents, saveSettings.saveGlobalEvents && saveSettings.seperateGlobalEvents != true);
279279

280280
#if sys
281-
var songPath = saveSettings.songFolder == null ? 'songs/${chart.meta.name}' : saveSettings.songFolder, variantSuffix = variant != null && variant != "" ? '-$variant' : "";
282-
var metaPath = 'meta$variantSuffix.json', prettyPrint = saveSettings.prettyPrint == true ? Flags.JSON_PRETTY_PRINT : null, temp:String;
283-
if ((temp = Paths.assetsTree.getPath('assets/$songPath/$metaPath')) != null) {
281+
var songPath = saveSettings.songFolder == null ? 'songs/${chart.meta.name}' : saveSettings.songFolder, variantSuffix = variant != null && variant != "" ? '-$variant' : "", difficultySuffix = difficulty != null && difficulty != "" ? '-$difficulty' : "";
282+
var metaPath = 'meta$variantSuffix.json', altMetaPath = 'meta${variantSuffix}${difficultySuffix}.json', prettyPrint = saveSettings.prettyPrint == true ? Flags.JSON_PRETTY_PRINT : null, temp:String;
283+
if ((temp = Paths.assetsTree.getPath('assets/$songPath/$altMetaPath')) != null) { //check for difficulty specific
284+
songPath = temp.substr(0, temp.length - altMetaPath.length - 1);
285+
metaPath = temp;
286+
}
287+
else if ((temp = Paths.assetsTree.getPath('assets/$songPath/$metaPath')) != null) {
284288
songPath = temp.substr(0, temp.length - metaPath.length - 1);
285289
metaPath = temp;
286290
}

source/funkin/editors/character/CharacterAnimButton.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,12 @@ class CharacterAnimButton extends UIButton {
403403

404404
public function toggleGhost() {
405405
if (valid && parent.ghosts.indexOf(anim) == -1) {
406-
FlxG.sound.play(Paths.sound(Flags.DEFAULT_CHARACTER_GHOSTENABLE_SOUND));
406+
UIState.playEditorSound(Flags.DEFAULT_CHARACTER_GHOSTENABLE_SOUND);
407407
parent.ghosts.push(anim);
408408
ghostIcon.animation.play("alive", true);
409409
ghostIcon.color = 0xFFFFFFFF;
410410
} else {
411-
FlxG.sound.play(Paths.sound(Flags.DEFAULT_CHARACTER_GHOSTDISABLE_SOUND));
411+
UIState.playEditorSound(Flags.DEFAULT_CHARACTER_GHOSTDISABLE_SOUND);
412412
parent.ghosts.remove(anim);
413413
ghostIcon.animation.play("dead", true);
414414
ghostIcon.color = 0xFFADADAD;

source/funkin/editors/character/CharacterAnimsWindow.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class CharacterAnimsWindow extends UIButtonList<CharacterAnimButton> {
119119
}
120120

121121
public function deleteAnimation(button:CharacterAnimButton, addToUndo:Bool = true) {
122-
FlxG.sound.play(Paths.sound(Flags.DEFAULT_EDITOR_DELETE_SOUND));
122+
UIState.playEditorSound(Flags.DEFAULT_EDITOR_DELETE_SOUND);
123123
if (buttons.members.length <= 1) return;
124124
if (character.getAnimName() == button.anim)
125125
@:privateAccess CharacterEditor.instance._animation_down(null);

source/funkin/editors/character/CharacterEditor.hx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ class CharacterEditor extends UIState {
453453

454454
function _file_save(_) {
455455
#if sys
456-
FlxG.sound.play(Paths.sound('editors/save'));
456+
UIState.playEditorSound(Flags.DEFAULT_EDITOR_SAVE_SOUND);
457457
CoolUtil.safeSaveFile(
458458
'${Paths.getAssetsRoot()}/data/characters/${character.curCharacter}.xml',
459459
buildCharacter()
@@ -465,7 +465,7 @@ class CharacterEditor extends UIState {
465465
}
466466

467467
function _file_saveas(_) {
468-
FlxG.sound.play(Paths.sound('editors/save'));
468+
UIState.playEditorSound(Flags.DEFAULT_EDITOR_SAVE_SOUND);
469469
openSubState(new SaveSubstate(buildCharacter(), {
470470
defaultSaveFile: '${character.curCharacter}.xml'
471471
}));
@@ -499,7 +499,7 @@ class CharacterEditor extends UIState {
499499
}
500500

501501
function _undo(undo:CharacterEditorChange) {
502-
FlxG.sound.play(Paths.sound(Flags.DEFAULT_EDITOR_UNDO_SOUND));
502+
UIState.playEditorSound(Flags.DEFAULT_EDITOR_UNDO_SOUND);
503503
switch (undo) {
504504
case null: // do nothing
505505
case CCharEditPosition(oldPos, newPos):
@@ -573,7 +573,7 @@ class CharacterEditor extends UIState {
573573
}
574574

575575
function _redo(redo:CharacterEditorChange) {
576-
FlxG.sound.play(Paths.sound(Flags.DEFAULT_EDITOR_REDO_SOUND));
576+
UIState.playEditorSound(Flags.DEFAULT_EDITOR_REDO_SOUND);
577577
switch (redo) {
578578
case null: // do nothing
579579
case CCharEditPosition(oldPos, newPos):

0 commit comments

Comments
 (0)