1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-08-31 02:45:13 +00:00
Funkin/source/funkin/util/TrackerToolButtonUtil.hx
Hyper_ 88ed66affa chore: Add null safety to various utility and plugin classes
And add a bit of error handling to CharSelectGF & CharSelectSubState

Co-Authored-By: Linus Torvalds <torvalds@linux-foundation.org>
2025-06-23 14:13:35 -04:00

33 lines
806 B
Haxe

package funkin.util;
import flixel.system.debug.interaction.tools.Pointer.GraphicCursorCross;
import flixel.system.debug.interaction.Interaction;
import flixel.system.debug.interaction.tools.Tool;
/**
* the name is a bit of a mouthful, but this adds a button to the
* FlxDebugger Interaction window, which when pressed will open a
* tracking window corresponding to whatever currently selected objects are
*/
@:nullSafety
class TrackerToolButtonUtil extends Tool
{
override function init(brain:Interaction):Tool
{
super.init(brain);
_name = "Add Tracker";
setButton(GraphicCursorCross);
button.upHandler = function() {
brain.selectedItems.forEach(function(item) {
FlxG.debugger.track(item);
});
};
button.toggleMode = false;
return this;
}
}