diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index a0b72b64..ccc0f339 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -1017,7 +1017,6 @@ class Charter extends UIState { if (FlxG.mouse.justReleasedRight) { 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); @@ -1540,6 +1539,7 @@ class Charter extends UIState { } public static function saveAs(data:Dynamic, ?replacer:(key:Dynamic, value:Dynamic) -> Dynamic, ?space:String, ?options:SaveSubstate.SaveSubstateData, ?saveOptions:Map, shouldBuild:Bool = true) { + FlxG.sound.play(Paths.sound('editors/save')); if (shouldBuild && instance != null) instance.buildChart(); var cur = FlxG.state; while(true) { @@ -2076,11 +2076,15 @@ class Charter extends UIState { return newChilds; } - inline function _note_addsustain(t) + inline function _note_addsustain(t) { + FlxG.sound.play(Paths.sound('editors/charter/sustainAdd')); changeNoteSustain(1); + } - inline function _note_subtractsustain(t) + inline function _note_subtractsustain(t) { + FlxG.sound.play(Paths.sound('editors/charter/sustainDelete')); changeNoteSustain(-1); + } function _note_selectall(_) { selection = cast notesGroup.members.copy(); diff --git a/source/funkin/editors/charter/CharterEventAdd.hx b/source/funkin/editors/charter/CharterEventAdd.hx index 4c2cf513..0031a78d 100644 --- a/source/funkin/editors/charter/CharterEventAdd.hx +++ b/source/funkin/editors/charter/CharterEventAdd.hx @@ -29,8 +29,14 @@ class CharterEventAdd extends UISliceSprite { if (FlxG.mouse.justReleased && FlxG.state.subState == null) { if (curCharterEvent != null) Charter.instance.openSubState(new CharterEventScreenNew(curCharterEvent)); - else - Charter.instance.openSubState(new CharterEventScreen(step, global)); + else { + var chartEvent = new CharterEvent(step, [], global); + chartEvent.events = []; + chartEvent.global = global; + + Charter.instance.createSelection([chartEvent]); + Charter.instance.openSubState(new CharterEventScreenNew(chartEvent)); + } } } diff --git a/source/funkin/editors/ui/UIButton.hx b/source/funkin/editors/ui/UIButton.hx index 8aa75936..b3f81f54 100644 --- a/source/funkin/editors/ui/UIButton.hx +++ b/source/funkin/editors/ui/UIButton.hx @@ -28,7 +28,10 @@ class UIButton extends UISliceSprite { public override function onHovered() { super.onHovered(); - if (FlxG.mouse.justPressed) hasBeenPressed = true; + if (FlxG.mouse.justPressed) { + hasBeenPressed = true; + FlxG.sound.play(Paths.sound('editors/buttonClick')); + } if (FlxG.mouse.justReleased && callback != null && shouldPress && hasBeenPressed) { callback(); hasBeenPressed = false; diff --git a/source/funkin/editors/ui/UIState.hx b/source/funkin/editors/ui/UIState.hx index fb578b61..faa1b4e6 100644 --- a/source/funkin/editors/ui/UIState.hx +++ b/source/funkin/editors/ui/UIState.hx @@ -105,6 +105,10 @@ class UIState extends MusicBeatState { buttonHandler = null; } + if (FlxG.mouse.justPressed) { + FlxG.sound.play(Paths.sound('editors/click')); + } + if (FlxG.mouse.justReleased) currentFocus = (hoveredSprite is IUIFocusable) ? (cast hoveredSprite) : null; @@ -150,6 +154,7 @@ class UIState extends MusicBeatState { } public function openContextMenu(options:Array, ?callback:UIContextMenuCallback, ?x:Float, ?y:Float, ?w:Int) { + FlxG.sound.play(Paths.sound('editors/windowAppear')); var state = FlxG.state; while(state.subState != null && !(state._requestSubStateReset && state._requestedSubState == null)) state = state.subState; diff --git a/source/funkin/editors/ui/UITextBox.hx b/source/funkin/editors/ui/UITextBox.hx index f2939ac9..49627320 100644 --- a/source/funkin/editors/ui/UITextBox.hx +++ b/source/funkin/editors/ui/UITextBox.hx @@ -110,6 +110,7 @@ class UITextBox extends UISliceSprite implements IUIFocusable { case RIGHT: changeSelection(1); case BACKSPACE: + FlxG.sound.play(Paths.sound('editors/textRemove')); if (position > 0) { label.text = label.text.substr(0, position-1) + label.text.substr(position); changeSelection(-1); @@ -119,6 +120,7 @@ class UITextBox extends UISliceSprite implements IUIFocusable { case END: position = label.text.length; case V: + FlxG.sound.play(Paths.sound('editors/textType')); // Hey lj here, fixed copying because before we checked if the modifier was left or right ctrl // but somehow it gave a int outside of the KeyModifier's range :sob: // apparently there is a boolean that just checks for you. yw :D @@ -129,13 +131,14 @@ class UITextBox extends UISliceSprite implements IUIFocusable { var data:String = Clipboard.generalClipboard.getData(TEXT_FORMAT); if (data != null) onTextInput(data); case C: + FlxG.sound.play(Paths.sound('editors/textType')); // if we are not holding ctrl, ignore if (!modifier.ctrlKey) return; // copying Clipboard.generalClipboard.setData(TEXT_FORMAT, label.text); default: - // nothing + FlxG.sound.play(Paths.sound('editors/textType')); } } diff --git a/source/funkin/editors/ui/UIWindow.hx b/source/funkin/editors/ui/UIWindow.hx index e6ac6388..b494e3fa 100644 --- a/source/funkin/editors/ui/UIWindow.hx +++ b/source/funkin/editors/ui/UIWindow.hx @@ -15,6 +15,7 @@ class UIWindow extends UISliceSprite { content = new FlxTypedGroup(); members.push(content); + FlxG.sound.play(Paths.sound('editors/windowAppear')); } public override function update(elapsed:Float) {