From ae2c32d1a492beb073565a66c99c3ee13dcda749 Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Wed, 28 Dec 2022 00:51:57 +0100 Subject: [PATCH] todo: fix memory in numeric steppers --- buildnumber.txt | 2 +- source/funkin/desktop/DesktopMain.hx | 4 +++- source/funkin/desktop/DesktopUtils.hx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index a67dc566..bb5ce27c 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -1813 \ No newline at end of file +1834 \ No newline at end of file diff --git a/source/funkin/desktop/DesktopMain.hx b/source/funkin/desktop/DesktopMain.hx index 7f341a92..f907d8cb 100644 --- a/source/funkin/desktop/DesktopMain.hx +++ b/source/funkin/desktop/DesktopMain.hx @@ -92,6 +92,8 @@ class DesktopMain extends MusicBeatState { windows.add(new Window(new CharacterEditor('dad'))); if (FlxG.keys.justPressed.F2) windows.add(new Window(new EditorPlayState())); + + FlxG.sound.enableVolumeChanges = !(currentFocus is IDesktopInputObject); } public function openWindow(content:WindowContent) { @@ -115,7 +117,7 @@ class DesktopMain extends MusicBeatState { public override function destroy() { super.destroy(); - FlxG.sound.soundTrayEnabled = (); + FlxG.sound.enableVolumeChanges = true; contextMenu = FlxDestroyUtil.destroy(contextMenu); FlxG.scaleMode = oldScaleMode; diff --git a/source/funkin/desktop/DesktopUtils.hx b/source/funkin/desktop/DesktopUtils.hx index 760f267f..bff5cf27 100644 --- a/source/funkin/desktop/DesktopUtils.hx +++ b/source/funkin/desktop/DesktopUtils.hx @@ -3,7 +3,7 @@ package funkin.desktop; import flixel.FlxObject; class DesktopUtils { - public static function copyProperties(spr1:FlxObject, spr2:FlxObject) { + public static inline function copyProperties(spr1:FlxObject, spr2:FlxObject) { spr1.cameras = spr2.cameras; spr1.setPosition(spr2.x, spr2.y); spr1.scrollFactor.set(spr2.scrollFactor.x, spr2.scrollFactor.y);