From 8b6717eeb9b35d841ee076a36087416bd5a26f83 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:57:37 -0700 Subject: [PATCH] real --- source/animateatlas/AtlasFrameMaker.hx | 4 ++++ source/funkin/desktop/DesktopMain.hx | 3 +++ source/funkin/desktop/sprites/DropDown.hx | 1 + source/funkin/desktop/sprites/MenuBar.hx | 2 ++ source/funkin/desktop/theme/Theme.hx | 12 +++--------- source/funkin/desktop/windows/WindowDragHitbox.hx | 5 +++++ source/funkin/game/Character.hx | 3 +++ source/funkin/options/OptionsScreen.hx | 1 + source/funkin/updating/UpdateAvailableScreen.hx | 1 + 9 files changed, 23 insertions(+), 9 deletions(-) diff --git a/source/animateatlas/AtlasFrameMaker.hx b/source/animateatlas/AtlasFrameMaker.hx index d553a5c1..777217b4 100644 --- a/source/animateatlas/AtlasFrameMaker.hx +++ b/source/animateatlas/AtlasFrameMaker.hx @@ -107,6 +107,10 @@ class AtlasFrameMaker extends FlxFramesCollection{ //trace(daFramez); } + + if (frameSize != null) + frameSize.put(); + return daFramez; } diff --git a/source/funkin/desktop/DesktopMain.hx b/source/funkin/desktop/DesktopMain.hx index f907d8cb..f5ee4c85 100644 --- a/source/funkin/desktop/DesktopMain.hx +++ b/source/funkin/desktop/DesktopMain.hx @@ -125,6 +125,9 @@ class DesktopMain extends MusicBeatState { // TODO: switch back while using config FlxG.resizeGame(1280, 720); + + if (screenSize != null) + screenSize.put(); } public function focusWindow(window:Window) { diff --git a/source/funkin/desktop/sprites/DropDown.hx b/source/funkin/desktop/sprites/DropDown.hx index a44e5d15..d4d5c82f 100644 --- a/source/funkin/desktop/sprites/DropDown.hx +++ b/source/funkin/desktop/sprites/DropDown.hx @@ -27,6 +27,7 @@ class DropDown extends Button { } }], onSelectionChange); + pos.put(); camPos.put(); } diff --git a/source/funkin/desktop/sprites/MenuBar.hx b/source/funkin/desktop/sprites/MenuBar.hx index 7f8e3607..3a7903a2 100644 --- a/source/funkin/desktop/sprites/MenuBar.hx +++ b/source/funkin/desktop/sprites/MenuBar.hx @@ -26,6 +26,8 @@ class MenuBar extends WindowGroup { var camPos = camera != null ? FlxPoint.get(camera.x, camera.y) : FlxPoint.get(); ContextMenu.open(pos.x + camPos.x, pos.y + camPos.y, t.options, function(i) {}); + + pos.put(); }); b.label.fieldWidth = 0; @:privateAccess b.label._regen = true; diff --git a/source/funkin/desktop/theme/Theme.hx b/source/funkin/desktop/theme/Theme.hx index 298c0c57..f908a56c 100644 --- a/source/funkin/desktop/theme/Theme.hx +++ b/source/funkin/desktop/theme/Theme.hx @@ -146,17 +146,11 @@ class ThemeData implements IFlxDestroyable { public function new() {} public function destroy() { - if (margin != null) { + if (margin != null) margin.put(); - margin = null; - } - if (size != null) { + if (size != null) size.put(); - size = null; - } - if (offset != null) { + if (offset != null) offset.put(); - offset = null; - } } } \ No newline at end of file diff --git a/source/funkin/desktop/windows/WindowDragHitbox.hx b/source/funkin/desktop/windows/WindowDragHitbox.hx index 2c53008e..db2fa07b 100644 --- a/source/funkin/desktop/windows/WindowDragHitbox.hx +++ b/source/funkin/desktop/windows/WindowDragHitbox.hx @@ -71,4 +71,9 @@ class WindowDragHitbox extends FlxObject { } } } + + override function destroy() { + super.destroy(); + offset.put(); + } } \ No newline at end of file diff --git a/source/funkin/game/Character.hx b/source/funkin/game/Character.hx index 789c979a..91385b1e 100644 --- a/source/funkin/game/Character.hx +++ b/source/funkin/game/Character.hx @@ -359,6 +359,9 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom public override function destroy() { super.destroy(); + + cameraOffset.put(); + globalOffset.put(); } public inline function getIcon() { diff --git a/source/funkin/options/OptionsScreen.hx b/source/funkin/options/OptionsScreen.hx index 0638a001..2d3e7ca1 100644 --- a/source/funkin/options/OptionsScreen.hx +++ b/source/funkin/options/OptionsScreen.hx @@ -138,5 +138,6 @@ class OptionsScreen extends MusicBeatState { public override function destroy() { super.destroy(); instance = null; + scrollDest.put(); } } \ No newline at end of file diff --git a/source/funkin/updating/UpdateAvailableScreen.hx b/source/funkin/updating/UpdateAvailableScreen.hx index f5f017d9..001c9709 100644 --- a/source/funkin/updating/UpdateAvailableScreen.hx +++ b/source/funkin/updating/UpdateAvailableScreen.hx @@ -152,5 +152,6 @@ class UpdateAvailableScreen extends MusicBeatState { public override function destroy() { super.destroy(); FlxG.mouse.visible = false; + oldPos.put(); } } \ No newline at end of file