diff --git a/assets/sounds/editors/autosave.ogg b/assets/sounds/editors/autosave.ogg
new file mode 100644
index 00000000..e010c369
Binary files /dev/null and b/assets/sounds/editors/autosave.ogg differ
diff --git a/assets/sounds/editors/buttonClick.ogg b/assets/sounds/editors/buttonClick.ogg
new file mode 100644
index 00000000..9b07779a
Binary files /dev/null and b/assets/sounds/editors/buttonClick.ogg differ
diff --git a/assets/sounds/editors/charter/hitsound.mp3 b/assets/sounds/editors/charter/hitsound.mp3
deleted file mode 100644
index 67cbc251..00000000
Binary files a/assets/sounds/editors/charter/hitsound.mp3 and /dev/null differ
diff --git a/assets/sounds/editors/charter/metronome.mp3 b/assets/sounds/editors/charter/metronome.mp3
deleted file mode 100644
index 4a823020..00000000
Binary files a/assets/sounds/editors/charter/metronome.mp3 and /dev/null differ
diff --git a/assets/sounds/editors/charter/noteDelete.ogg b/assets/sounds/editors/charter/noteDelete.ogg
new file mode 100644
index 00000000..b7c6eb17
Binary files /dev/null and b/assets/sounds/editors/charter/noteDelete.ogg differ
diff --git a/assets/sounds/editors/charter/notePlace.ogg b/assets/sounds/editors/charter/notePlace.ogg
new file mode 100644
index 00000000..4f4ef1f6
Binary files /dev/null and b/assets/sounds/editors/charter/notePlace.ogg differ
diff --git a/assets/sounds/editors/charter/snappingChange.ogg b/assets/sounds/editors/charter/snappingChange.ogg
new file mode 100644
index 00000000..22937aa5
Binary files /dev/null and b/assets/sounds/editors/charter/snappingChange.ogg differ
diff --git a/assets/sounds/editors/charter/strumLock.ogg b/assets/sounds/editors/charter/strumLock.ogg
new file mode 100644
index 00000000..80bc24ab
Binary files /dev/null and b/assets/sounds/editors/charter/strumLock.ogg differ
diff --git a/assets/sounds/editors/charter/strumUnlock.ogg b/assets/sounds/editors/charter/strumUnlock.ogg
new file mode 100644
index 00000000..860cd7a8
Binary files /dev/null and b/assets/sounds/editors/charter/strumUnlock.ogg differ
diff --git a/assets/sounds/editors/charter/sustainAdd.ogg b/assets/sounds/editors/charter/sustainAdd.ogg
new file mode 100644
index 00000000..6e40b4a7
Binary files /dev/null and b/assets/sounds/editors/charter/sustainAdd.ogg differ
diff --git a/assets/sounds/editors/charter/sustainDelete.ogg b/assets/sounds/editors/charter/sustainDelete.ogg
new file mode 100644
index 00000000..4e18b2ad
Binary files /dev/null and b/assets/sounds/editors/charter/sustainDelete.ogg differ
diff --git a/assets/sounds/editors/click.ogg b/assets/sounds/editors/click.ogg
new file mode 100644
index 00000000..29813c8d
Binary files /dev/null and b/assets/sounds/editors/click.ogg differ
diff --git a/assets/sounds/editors/save.ogg b/assets/sounds/editors/save.ogg
new file mode 100644
index 00000000..f72f58e7
Binary files /dev/null and b/assets/sounds/editors/save.ogg differ
diff --git a/assets/sounds/editors/textRemove.ogg b/assets/sounds/editors/textRemove.ogg
new file mode 100644
index 00000000..26e15b3f
Binary files /dev/null and b/assets/sounds/editors/textRemove.ogg differ
diff --git a/assets/sounds/editors/textType.ogg b/assets/sounds/editors/textType.ogg
new file mode 100644
index 00000000..5036e8e4
Binary files /dev/null and b/assets/sounds/editors/textType.ogg differ
diff --git a/assets/sounds/editors/windowAppear.ogg b/assets/sounds/editors/windowAppear.ogg
new file mode 100644
index 00000000..9df7b3ea
Binary files /dev/null and b/assets/sounds/editors/windowAppear.ogg differ
diff --git a/assets/sounds/sfxTodo.md b/assets/sounds/sfxTodo.md
index 74fdf30e..be540694 100644
--- a/assets/sounds/sfxTodo.md
+++ b/assets/sounds/sfxTodo.md
@@ -6,20 +6,22 @@ Putting this txt in here so others can edit and commit this to suggest or add mi
- Cass (GlitchDotSmh)
[] = Not done
-[!] = Priority/In progress
+[!] = Priority
+[-] = In Progress
[x] = Done
# Editor SFX
## Global:
-- Opening/Closing Context/Dropdown Menus []
-- Opening/Closing Pop-up Windows []
+- Opening/Closing Context/Dropdown Menus [x]
+- Opening/Closing Pop-up Windows [x]
- Mouse Click [x]
-- UI Button being clicked []
-- Focusing/Unfocusing a text field []
-- Typing in a text field []
-- Saving []
-- Auto-Saving []
+- UI Button being clicked [x]
+- Focusing/Unfocusing a text field [x]
+- Typing in a text field [x]
+- Deleting from text field [x]
+- Saving [x]
+- Auto-Saving [x]
- Copying []
- Pasting []
- Undoing []
@@ -27,10 +29,10 @@ Putting this txt in here so others can edit and commit this to suggest or add mi
- Deleting []
## Chart Editor:
-- Placing Notes []
-- Deleting Notes []
-- Subtracting Sustain []
-- Adding Sustain []
+- Placing Notes [x]
+- Deleting Notes [x]
+- Subtracting Sustain [x]
+- Adding Sustain [x]
- Picking Up Notes []
- Moving Notes []
- Dropping Notes []
@@ -40,9 +42,9 @@ Putting this txt in here so others can edit and commit this to suggest or add mi
- Creating an Event []
- Pulling up Event Editing menu []
- Scrolling Up/Down (via `Scroll Wheel` or `W/S`) []
-- Note Snapping Change []
-- Locking Strums []
-- Unlocking Strums []
+- Note Snapping Change [x]
+- Locking Strums [x]
+- Unlocking Strums [x]
- Creating Strum []
## Character/Stage Editor
diff --git a/project.xml b/project.xml
index 44678564..df54e556 100644
--- a/project.xml
+++ b/project.xml
@@ -113,7 +113,7 @@
-
+
diff --git a/source/flixel/sound/FlxSound.hx b/source/flixel/sound/FlxSound.hx
index e52b8cc7..6e83609e 100644
--- a/source/flixel/sound/FlxSound.hx
+++ b/source/flixel/sound/FlxSound.hx
@@ -263,8 +263,9 @@ class FlxSound extends FlxBasic {
*/
public function reset():Void {
if (_source != null) stop();
- x = y = 0;
+ onFinish.removeAll();
+ x = y = 0;
muted = false;
looped = false;
loopTime = 0;
@@ -297,8 +298,6 @@ class FlxSound extends FlxBasic {
_lastTime = null;
if (destroySound) {
- onFinish.removeAll();
-
if (group != null) group.remove(this);
if (_channel != null) {
diff --git a/source/funkin/backend/utils/CoolUtil.hx b/source/funkin/backend/utils/CoolUtil.hx
index bf91299c..005078de 100644
--- a/source/funkin/backend/utils/CoolUtil.hx
+++ b/source/funkin/backend/utils/CoolUtil.hx
@@ -484,7 +484,7 @@ final class CoolUtil
*/
@:noUsing public static function playMusic(path:String, Persist:Bool = false, Volume:Float = 1, Looped:Bool = true, DefaultBPM:Float = 102, ?Group:FlxSoundGroup) {
Conductor.reset();
- if (FlxG.sound.music == null) FlxG.sound.music = new FlxSound();
+ if (FlxG.sound.music == null || !FlxG.sound.music.exists) FlxG.sound.music = new FlxSound();
else if (FlxG.sound.music.active) FlxG.sound.music.stop();
FlxG.sound.music.loadEmbedded(path, Looped);
FlxG.sound.music.volume = Volume;
@@ -520,14 +520,14 @@ final class CoolUtil
* @param volume At which volume it should play
*/
@:noUsing public static inline function playMenuSFX(menuSFX:CoolSfx = SCROLL, volume:Float = 1) {
- FlxG.sound.play(Paths.sound(switch(menuSFX) {
- case CONFIRM: 'menu/confirm';
- case CANCEL: 'menu/cancel';
- case SCROLL: 'menu/scroll';
- case CHECKED: 'menu/checkboxChecked';
- case UNCHECKED: 'menu/checkboxUnchecked';
- case WARNING: 'menu/warningMenu';
- default: 'menu/scroll';
+ FlxG.sound.play(Paths.sound('menu/' + switch(menuSFX) {
+ case CONFIRM: 'confirm';
+ case CANCEL: 'cancel';
+ case SCROLL: 'scroll';
+ case CHECKED: 'checkboxChecked';
+ case UNCHECKED: 'checkboxUnchecked';
+ case WARNING: 'warningMenu';
+ default: 'scroll';
}), volume);
}
@@ -891,11 +891,7 @@ final class CoolUtil
* Stops a sound, set its time to 0 then play it again.
* @param sound Sound to replay.
*/
- public static inline function replay(sound:FlxSound) {
- sound.stop();
- sound.time = 0;
- sound.play();
- }
+ public static inline function replay(sound:FlxSound) sound.play(true, 0);
/**
* Equivalent of `Math.max`, except doesn't require a Int -> Float -> Int conversion.
diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx
index c4b46555..a0b72b64 100644
--- a/source/funkin/editors/charter/Charter.hx
+++ b/source/funkin/editors/charter/Charter.hx
@@ -950,6 +950,7 @@ class Charter extends UIState {
notesGroup.add(note);
selection = [note];
undos.addToUndo(CCreateSelection([note]));
+ FlxG.sound.play(Paths.sound('editors/charter/notePlace'));
}
isSelecting = false;
}
@@ -1014,7 +1015,10 @@ class Charter extends UIState {
});
if (FlxG.mouse.justReleasedRight) {
- if (deletedNotes.length > 0) undos.addToUndo(CDeleteSelection(deletedNotes.copy()));
+ if (deletedNotes.length > 0) {
+ undos.addToUndo(CDeleteSelection(deletedNotes.copy()));
+ FlxG.sound.play(Paths.sound('editors/charter/noteDelete'));
+ }
else if (noteDeleteAnims.garbageIcon.alpha <= .5) {
var mousePos = FlxG.mouse.getScreenPosition(uiCamera);
closeCurrentContextMenu();
diff --git a/source/funkin/editors/charter/CharterAutoSaveUI.hx b/source/funkin/editors/charter/CharterAutoSaveUI.hx
index 6f2871b0..b7222471 100644
--- a/source/funkin/editors/charter/CharterAutoSaveUI.hx
+++ b/source/funkin/editors/charter/CharterAutoSaveUI.hx
@@ -82,6 +82,8 @@ class CharterAutoSaveUI extends UISliceSprite {
icon.animation.curAnim.curFrame = 1;
for (member in [this, progressBar, progressBarBack, autosavingText]) member.color = 0xFFA3EC95;
+ FlxG.sound.play(Paths.sound("editors/autosave"));
+
(new FlxTimer()).start(1, (_) -> {disappearAnimation();});
});
}
diff --git a/source/funkin/editors/charter/CharterStrumline.hx b/source/funkin/editors/charter/CharterStrumline.hx
index 8c233863..8d0a0b21 100644
--- a/source/funkin/editors/charter/CharterStrumline.hx
+++ b/source/funkin/editors/charter/CharterStrumline.hx
@@ -135,8 +135,16 @@ class CharterStrumline extends UISprite {
healthIcons.add(healthIcon);
}
- vocals = null;
- vocals = strumLine.vocalsSuffix.length > 0 ? FlxG.sound.load(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix)) : new FlxSound();
+ var asset = strumLine.vocalsSuffix.length > 0 ? Assets.getSound(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix)) : null;
+
+ if (vocals == null) FlxG.sound.list.add(vocals = new FlxSound());
+ if (asset != null) {
+ vocals.reset();
+ vocals.loadEmbedded(asset);
+ }
+ else {
+ vocals.destroy();
+ }
vocals.group = FlxG.sound.defaultMusicGroup;
}
}
diff --git a/source/funkin/editors/ui/UIWarningSubstate.hx b/source/funkin/editors/ui/UIWarningSubstate.hx
index 7b1f775a..9fdcdb91 100644
--- a/source/funkin/editors/ui/UIWarningSubstate.hx
+++ b/source/funkin/editors/ui/UIWarningSubstate.hx
@@ -98,7 +98,7 @@ class UIWarningSubstate extends MusicBeatSubstate {
add(sprIcon);
messageSpr.x = sprIcon.x + 70 + 16 + 20;
- messageSpr.y = sprIcon.y + 16;
+ messageSpr.y = sprIcon.y;
add(messageSpr);
var xPos = (FlxG.width - (30 + (170 * buttons.length))) / 2;