Clean up several messy chunks of code, and add support for dragging notes and events.

This commit is contained in:
EliteMasterEric
2023-10-26 05:46:22 -04:00
parent 8d875949b9
commit eec3ac3ced
59 changed files with 3809 additions and 2922 deletions
@@ -1,7 +1,7 @@
package funkin.modding.module;
import funkin.util.SortUtil;
import funkin.modding.events.ScriptEventType.UpdateScriptEvent;
import funkin.modding.events.ScriptEvent.UpdateScriptEvent;
import funkin.modding.events.ScriptEvent;
import funkin.modding.events.ScriptEventDispatcher;
import funkin.modding.module.Module;
@@ -55,7 +55,7 @@ class ModuleHandler
static function onStateSwitchComplete():Void
{
callEvent(new StateChangeScriptEvent(ScriptEventType.STATE_CHANGE_END, FlxG.state, true));
callEvent(new StateChangeScriptEvent(STATE_CHANGE_END, FlxG.state, true));
}
static function addToModuleCache(module:Module):Void
@@ -119,7 +119,7 @@ class ModuleHandler
{
if (moduleCache != null)
{
var event = new ScriptEvent(ScriptEventType.DESTROY, false);
var event = new ScriptEvent(DESTROY, false);
// Note: Ignore stopPropagation()
for (key => value in moduleCache)
@@ -148,6 +148,6 @@ class ModuleHandler
public static inline function callOnCreate():Void
{
callEvent(new ScriptEvent(ScriptEventType.CREATE, false));
callEvent(new ScriptEvent(CREATE, false));
}
}