mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-12-11 00:31:25 -05:00
32 lines
793 B
Haxe
32 lines
793 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
|
||
|
*/
|
||
|
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;
|
||
|
}
|
||
|
}
|