mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-07-29 15:30:10 -04:00
Selection context menu fix
Can someone please tell me why there's a button to select everything in the selection context menu????
This commit is contained in:
parent
5054c58dca
commit
2accb4b032
1 changed files with 19 additions and 1 deletions
|
@ -7,6 +7,10 @@ import funkin.ui.debug.charting.commands.CutItemsCommand;
|
|||
import funkin.ui.debug.charting.commands.RemoveEventsCommand;
|
||||
import funkin.ui.debug.charting.commands.RemoveItemsCommand;
|
||||
import funkin.ui.debug.charting.commands.RemoveNotesCommand;
|
||||
import funkin.ui.debug.charting.commands.FlipNotesCommand;
|
||||
import funkin.ui.debug.charting.commands.SelectAllItemsCommand;
|
||||
import funkin.ui.debug.charting.commands.InvertSelectedItemsCommand;
|
||||
import funkin.ui.debug.charting.commands.DeselectAllItemsCommand;
|
||||
|
||||
@:access(funkin.ui.debug.charting.ChartEditorState)
|
||||
@:build(haxe.ui.ComponentBuilder.build("assets/exclude/data/ui/chart-editor/context-menus/selection.xml"))
|
||||
|
@ -36,7 +40,7 @@ class ChartEditorSelectionContextMenu extends ChartEditorBaseContextMenu
|
|||
contextmenuCopy.onClick = (_) -> {
|
||||
chartEditorState.copySelection();
|
||||
};
|
||||
contextmenuFlip.onClick = (_) -> {
|
||||
contextmenuDelete.onClick = (_) -> {
|
||||
if (chartEditorState.currentNoteSelection.length > 0 && chartEditorState.currentEventSelection.length > 0)
|
||||
{
|
||||
chartEditorState.performCommand(new RemoveItemsCommand(chartEditorState.currentNoteSelection, chartEditorState.currentEventSelection));
|
||||
|
@ -54,5 +58,19 @@ class ChartEditorSelectionContextMenu extends ChartEditorBaseContextMenu
|
|||
// Do nothing???
|
||||
}
|
||||
};
|
||||
|
||||
contextmenuFlip.onClick = function(_) {
|
||||
chartEditorState.performCommand(new FlipNotesCommand(chartEditorState.currentNoteSelection));
|
||||
}
|
||||
|
||||
contextmenuSelectAll.onClick = function(_) {
|
||||
chartEditorState.performCommand(new SelectAllItemsCommand(true, false));
|
||||
}
|
||||
contextmenuSelectInverse.onClick = function(_) {
|
||||
chartEditorState.performCommand(new InvertSelectedItemsCommand());
|
||||
}
|
||||
contextmenuSelectNone.onClick = function(_) {
|
||||
chartEditorState.performCommand(new DeselectAllItemsCommand());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue