mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-12-17 19:42:22 -05:00
32 lines
951 B
Haxe
32 lines
951 B
Haxe
package funkin.ui.debug.charting.contextmenus;
|
|
|
|
import haxe.ui.containers.menus.Menu;
|
|
import haxe.ui.containers.menus.MenuItem;
|
|
import haxe.ui.core.Screen;
|
|
import funkin.data.song.SongData.SongEventData;
|
|
import funkin.ui.debug.charting.commands.RemoveEventsCommand;
|
|
|
|
@:access(funkin.ui.debug.charting.ChartEditorState)
|
|
@:build(haxe.ui.ComponentBuilder.build("assets/exclude/data/ui/chart-editor/context-menus/event.xml"))
|
|
class ChartEditorEventContextMenu extends ChartEditorBaseContextMenu
|
|
{
|
|
var contextmenuEdit:MenuItem;
|
|
var contextmenuDelete:MenuItem;
|
|
|
|
var data:SongEventData;
|
|
|
|
public function new(chartEditorState2:ChartEditorState, xPos2:Float = 0, yPos2:Float = 0, data:SongEventData)
|
|
{
|
|
super(chartEditorState2, xPos2, yPos2);
|
|
this.data = data;
|
|
|
|
initialize();
|
|
}
|
|
|
|
function initialize()
|
|
{
|
|
contextmenuDelete.onClick = function(_) {
|
|
chartEditorState.performCommand(new RemoveEventsCommand([data]));
|
|
}
|
|
}
|
|
}
|