From c72a23878238ebae6974b72a33a56e76bdc6ccda Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Mon, 5 Apr 2021 16:42:04 -0400 Subject: [PATCH] drag and drop (commented out, for use later) --- source/TitleState.hx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/source/TitleState.hx b/source/TitleState.hx index f20080570..13fa1bd06 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -10,13 +10,18 @@ import flixel.group.FlxGroup; import flixel.input.gamepad.FlxGamepad; import flixel.math.FlxPoint; import flixel.math.FlxRect; +import flixel.system.FlxAssets.FlxGraphicAsset; +import flixel.system.FlxAssets; import flixel.tweens.FlxEase; import flixel.tweens.FlxTween; import flixel.util.FlxColor; import flixel.util.FlxTimer; import lime.app.Application; +import lime.ui.Window; import openfl.Assets; import shaderslmfao.ColorSwap; +import sys.FileSystem; +import sys.io.File; import ui.PreferencesMenu; using StringTools; @@ -46,11 +51,33 @@ class TitleState extends MusicBeatState var swagShader:ColorSwap; + var thingie:FlxSprite; + override public function create():Void { #if polymod polymod.Polymod.init({modRoot: "mods", dirs: ['introMod'], framework: OPENFL}); + // FlxG.bitmap.clearCache(); #end + /* + + FlxG.stage.window.onDropFile.add(function(path:String) + { + trace("DROPPED FILE FROM: " + Std.string(path)); + var newPath = "./" + Paths.image('gfDanceTitle'); + File.copy(path, newPath); + + var swag = Paths.image('gfDanceTitle'); + + if (gfDance != null) + remove(gfDance); + FlxG.bitmap.removeByKey(Paths.image('gfDanceTitle')); + Assets.cache.clear(); + + gfDance.loadGraphic(Paths.image('gfDanceTitle')); + add(gfDance); + }); + */ swagShader = new ColorSwap();