diff --git a/assets/images/editors/ui/context-icons.png b/assets/images/editors/ui/context-icons.png index 91976656..a9de6358 100644 Binary files a/assets/images/editors/ui/context-icons.png and b/assets/images/editors/ui/context-icons.png differ diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index aa7dc29c..149ecbac 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -1,5 +1,7 @@ package funkin.editors.charter; +// ! FUCK YOU CHUF (your biggest fan -lunar) <3 +import flixel.input.FlxPointer; import openfl.geom.Point; import openfl.geom.Rectangle; import flixel.graphics.FlxGraphic; @@ -85,6 +87,7 @@ class Charter extends UIState { public var uiCamera:FlxCamera; public var selectionBox:UISliceSprite; public var autoSaveNotif:CharterAutoSaveUI; + public static var autoSaveTimer:Float = 0; public static var selection:Selection; @@ -667,7 +670,6 @@ class Charter extends UIState { for(s in selection) s.selected = true; } - public static var autoSaveTimer:Float = 0; var __autoSaveLocation:String = null; public function updateAutoSaving(elapsed:Float) { if (!Options.charterAutoSaves) return; @@ -681,7 +683,6 @@ class Charter extends UIState { 'Saved chart at $__autoSaveLocation.json!' ); } - if (autoSaveTimer <= 0) { autoSaveTimer = Options.charterAutoSaveTime; if (!autoSaveNotif.cancelled) { diff --git a/source/funkin/editors/charter/CharterAutoSaveUI.hx b/source/funkin/editors/charter/CharterAutoSaveUI.hx index f23149d2..66fb9f12 100644 --- a/source/funkin/editors/charter/CharterAutoSaveUI.hx +++ b/source/funkin/editors/charter/CharterAutoSaveUI.hx @@ -51,9 +51,10 @@ class CharterAutoSaveUI extends UISliceSprite { }, 24, 14); cancelButton.frames = Paths.getFrames("editors/ui/grayscale-button"); cancelButton.color = 0xFFAC3D3D; cancelButton.alpha = 0.2; - members.push(cancelButton); + members.push(cancelButton); cancelButton.visible = false; cancelIcon = new FlxSprite(x-(10+16), y+8).loadGraphic(Paths.image("editors/autosave-delete")); + cancelIcon.color = 0xFF880000; members.push(cancelIcon); alpha = 0; diff --git a/source/funkin/editors/charter/CharterDeleteAnim.hx b/source/funkin/editors/charter/CharterDeleteAnim.hx index 9d920e29..ff873a2b 100644 --- a/source/funkin/editors/charter/CharterDeleteAnim.hx +++ b/source/funkin/editors/charter/CharterDeleteAnim.hx @@ -20,6 +20,7 @@ class CharterDeleteAnim extends CharterNote { var __garbageAlpha:Float = 0; var __deletionTimer:Float = .1; + @:noCompletion var __mousePos:FlxPoint = FlxPoint.get(); public override function update(elapsed:Float) { for (deleteData in deleteNotes) { deleteData.time -= elapsed; @@ -31,10 +32,11 @@ class CharterDeleteAnim extends CharterNote { __garbageAlpha = FlxMath.lerp(__garbageAlpha, FlxG.mouse.pressedRight && __deletionTimer <= 0 ? 1 : 0, 1/10); + FlxG.mouse.getWorldPosition(Charter.instance.uiCamera, __mousePos); if (FlxG.mouse.pressedRight && __deletionTimer <= 0) garbageIcon.setPosition( - FlxG.mouse.screenX + garbageIcon.width/2 + (.5*FlxG.random.float(-1, 1)), - FlxG.mouse.screenY - garbageIcon.height + (.5*FlxG.random.float(-1, 1)) + __mousePos.x + garbageIcon.width/2 + (.5*FlxG.random.float(-1, 1)), + __mousePos.y - garbageIcon.height + (.5*FlxG.random.float(-1, 1)) ); garbageIcon.alpha = __garbageAlpha; } @@ -62,4 +64,9 @@ class CharterDeleteAnim extends CharterNote { if (garbageIcon.alpha > 0) garbageIcon.draw(); } + + public override function destroy() { + super.destroy(); + __mousePos.put(); + } } \ No newline at end of file