Skip to content

Commit 2cc4180

Browse files
committed
Artistic Expression + Click Sounds in the Animation Editor
1 parent 504b221 commit 2cc4180

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

source/funkin/ui/debug/anim/DebugBoundingState.hx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import funkin.ui.mainmenu.MainMenuState;
1919
import funkin.util.MouseUtil;
2020
import funkin.util.SerializerUtil;
2121
import funkin.util.SortUtil;
22+
import funkin.util.WindowUtil;
23+
import funkin.audio.FunkinSound;
2224
import haxe.ui.components.DropDown;
2325
import haxe.ui.containers.dialogs.CollapsibleDialog;
2426
import haxe.ui.core.Screen;
@@ -63,6 +65,16 @@ class DebugBoundingState extends FlxState
6365
override function create():Void
6466
{
6567
Paths.setCurrentLevel('week1');
68+
69+
FlxG.sound.music?.stop();
70+
71+
Cursor.show();
72+
FunkinSound.playMusic('chartEditorLoop', {
73+
startingVolume: 0.0
74+
});
75+
FlxG.sound.music.fadeIn(10, 0, 1);
76+
77+
WindowUtil.setWindowTitle("Friday Night Funkin\' Animation Editor");
6678

6779
hudCam = new FlxCamera();
6880
hudCam.bgColor.alpha = 0;
@@ -308,7 +320,14 @@ class DebugBoundingState extends FlxState
308320

309321
if (FlxG.keys.justPressed.H) hudCam.visible = !hudCam.visible;
310322

311-
if (FlxG.keys.justPressed.F4) FlxG.switchState(() -> new MainMenuState());
323+
if (FlxG.keys.justPressed.F4)
324+
{
325+
resetWindowTitle();
326+
FlxG.switchState(() -> new MainMenuState());
327+
}
328+
329+
if (FlxG.mouse.justPressed || FlxG.mouse.justPressedMiddle) FunkinSound.playOnce(Paths.sound("chartingSounds/ClickDown"));
330+
if (FlxG.mouse.justReleased || FlxG.mouse.justReleasedMiddle) FunkinSound.playOnce(Paths.sound("chartingSounds/ClickUp"));
312331

313332
MouseUtil.mouseCamDrag();
314333
if (!haxeUIFocused) MouseUtil.mouseWheelZoom();
@@ -321,6 +340,11 @@ class DebugBoundingState extends FlxState
321340
super.update(elapsed);
322341
}
323342

343+
function resetWindowTitle():Void
344+
{
345+
WindowUtil.setWindowTitle('Friday Night Funkin\'');
346+
}
347+
324348
override function destroy()
325349
{
326350
super.destroy();

0 commit comments

Comments
 (0)