@@ -58,6 +58,7 @@ import funkin.ui.debug.charting.commands.ChartEditorCommand;
5858import funkin .ui .debug .charting .commands .CopyItemsCommand ;
5959import funkin .ui .debug .charting .commands .CutItemsCommand ;
6060import funkin .ui .debug .charting .commands .DeselectAllItemsCommand ;
61+ import funkin .ui .debug .charting .commands .DeselectAllItemsBetweenTimeCommand ;
6162import funkin .ui .debug .charting .commands .DeselectItemsCommand ;
6263import funkin .ui .debug .charting .commands .ExtendNoteLengthCommand ;
6364import funkin .ui .debug .charting .commands .FlipNotesCommand ;
@@ -72,6 +73,7 @@ import funkin.ui.debug.charting.commands.RemoveItemsCommand;
7273import funkin .ui .debug .charting .commands .RemoveNotesCommand ;
7374import funkin .ui .debug .charting .commands .RemoveStackedNotesCommand ;
7475import funkin .ui .debug .charting .commands .SelectAllItemsCommand ;
76+ import funkin .ui .debug .charting .commands .SelectAllItemsBetweenTimeCommand ;
7577import funkin .ui .debug .charting .commands .SelectItemsCommand ;
7678import funkin .ui .debug .charting .commands .SetItemSelectionCommand ;
7779import funkin .ui .debug .charting .commands .SwitchDifficultyCommand ;
@@ -1966,14 +1968,14 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
19661968 var menubarItemSelectRegion : MenuItem ;
19671969
19681970 /**
1969- * The `Edit -> Select Before Cursor ` menu item.
1971+ * The `Edit -> Select Before Playhead ` menu item.
19701972 */
1971- var menubarItemSelectBeforeCursor : MenuItem ;
1973+ var menubarItemSelectBeforePlayhead : MenuItem ;
19721974
19731975 /**
1974- * The `Edit -> Select After Cursor ` menu item.
1976+ * The `Edit -> Select After Playhead ` menu item.
19751977 */
1976- var menubarItemSelectAfterCursor : MenuItem ;
1978+ var menubarItemSelectAfterPlayhead : MenuItem ;
19771979
19781980 /**
19791981 * The `Edit -> Decrease Note Snap Precision` menu item.
@@ -3294,6 +3296,10 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
32943296
32953297 menubarItemSelectNone .onClick = _ -> performCommand (new DeselectAllItemsCommand ());
32963298
3299+ menubarItemSelectBeforePlayhead .onClick = _ -> performCommand (new SelectAllItemsBetweenTimeCommand (scrollPositionInMs + playheadPositionInMs , true , true , true ));
3300+
3301+ menubarItemSelectAfterPlayhead .onClick = _ -> performCommand (new SelectAllItemsBetweenTimeCommand (scrollPositionInMs + playheadPositionInMs , false , true , true ));
3302+
32973303 menubarItemPlaytestFull .onClick = _ -> testSongInPlayState (false );
32983304 menubarItemPlaytestMinimal .onClick = _ -> testSongInPlayState (true );
32993305
@@ -4512,7 +4518,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
45124518 }
45134519
45144520 // HOME = Scroll to Top
4515- if (FlxG .keys .justPressed .HOME )
4521+ if (! FlxG . keys . pressed . SHIFT && FlxG .keys .justPressed .HOME )
45164522 {
45174523 // Scroll amount is the difference between the current position and the top.
45184524 scrollAmount = 0 - this .scrollPositionInPixels ;
@@ -4528,7 +4534,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
45284534 }
45294535
45304536 // END = Scroll to Bottom
4531- if (FlxG .keys .justPressed .END )
4537+ if (! FlxG . keys . pressed . SHIFT && FlxG .keys .justPressed .END )
45324538 {
45334539 // Scroll amount is the difference between the current position and the bottom.
45344540 scrollAmount = this .songLengthInPixels - this .scrollPositionInPixels ;
@@ -6218,6 +6224,26 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
62186224 // Deselect all items.
62196225 performCommand (new DeselectAllItemsCommand ());
62206226 }
6227+
6228+ // SHIFT + Home = Select all above playhead
6229+ if (FlxG .keys .pressed .SHIFT && FlxG .keys .justPressed .HOME )
6230+ {
6231+ // CTRL + SHIFT + Home = Inverse - deselect all above playhead
6232+ if (FlxG .keys .pressed .CONTROL )
6233+ performCommand (new DeselectAllItemsBetweenTimeCommand (scrollPositionInMs + playheadPositionInMs , true , true , true ));
6234+ else
6235+ performCommand (new SelectAllItemsBetweenTimeCommand (scrollPositionInMs + playheadPositionInMs , true , true , true ));
6236+ }
6237+
6238+ // SHIFT + End = Select all below playhead
6239+ if (FlxG .keys .pressed .SHIFT && FlxG .keys .justPressed .END )
6240+ {
6241+ // CTRL + SHIFT + Home = Inverse - deselect all below playhead
6242+ if (FlxG .keys .pressed .CONTROL )
6243+ performCommand (new DeselectAllItemsBetweenTimeCommand (scrollPositionInMs + playheadPositionInMs , false , true , true ));
6244+ else
6245+ performCommand (new SelectAllItemsBetweenTimeCommand (scrollPositionInMs + playheadPositionInMs , false , true , true ));
6246+ }
62216247 }
62226248
62236249 /**
0 commit comments