1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-27 07:27:12 +00:00

Apply @:nullSafety to chart editor classes.

This commit is contained in:
EliteMasterEric 2023-08-30 02:24:35 -04:00
parent cb81371b4a
commit e157c23ea7
7 changed files with 22 additions and 0 deletions

View file

@ -35,6 +35,7 @@ interface ChartEditorCommand
public function toString():String;
}
@:nullSafety
class AddNotesCommand implements ChartEditorCommand
{
var notes:Array<SongNoteData>;
@ -98,6 +99,7 @@ class AddNotesCommand implements ChartEditorCommand
}
}
@:nullSafety
class RemoveNotesCommand implements ChartEditorCommand
{
var notes:Array<SongNoteData>;
@ -153,6 +155,7 @@ class RemoveNotesCommand implements ChartEditorCommand
/**
* Appends one or more items to the selection.
*/
@:nullSafety
class SelectItemsCommand implements ChartEditorCommand
{
var notes:Array<SongNoteData>;
@ -220,6 +223,7 @@ class SelectItemsCommand implements ChartEditorCommand
}
}
@:nullSafety
class AddEventsCommand implements ChartEditorCommand
{
var events:Array<SongEventData>;
@ -278,6 +282,7 @@ class AddEventsCommand implements ChartEditorCommand
}
}
@:nullSafety
class RemoveEventsCommand implements ChartEditorCommand
{
var events:Array<SongEventData>;
@ -327,6 +332,7 @@ class RemoveEventsCommand implements ChartEditorCommand
}
}
@:nullSafety
class RemoveItemsCommand implements ChartEditorCommand
{
var notes:Array<SongNoteData>;
@ -385,6 +391,7 @@ class RemoveItemsCommand implements ChartEditorCommand
}
}
@:nullSafety
class SwitchDifficultyCommand implements ChartEditorCommand
{
var prevDifficulty:String;
@ -424,6 +431,7 @@ class SwitchDifficultyCommand implements ChartEditorCommand
}
}
@:nullSafety
class DeselectItemsCommand implements ChartEditorCommand
{
var notes:Array<SongNoteData>;
@ -478,6 +486,7 @@ class DeselectItemsCommand implements ChartEditorCommand
* Sets the selection rather than appends it.
* Deselects any notes that are not in the new selection.
*/
@:nullSafety
class SetItemSelectionCommand implements ChartEditorCommand
{
var notes:Array<SongNoteData>;
@ -518,6 +527,7 @@ class SetItemSelectionCommand implements ChartEditorCommand
}
}
@:nullSafety
class SelectAllItemsCommand implements ChartEditorCommand
{
var previousNoteSelection:Array<SongNoteData>;
@ -553,6 +563,7 @@ class SelectAllItemsCommand implements ChartEditorCommand
}
}
@:nullSafety
class InvertSelectedItemsCommand implements ChartEditorCommand
{
var previousNoteSelection:Array<SongNoteData>;
@ -587,6 +598,7 @@ class InvertSelectedItemsCommand implements ChartEditorCommand
}
}
@:nullSafety
class DeselectAllItemsCommand implements ChartEditorCommand
{
var previousNoteSelection:Array<SongNoteData>;
@ -622,6 +634,7 @@ class DeselectAllItemsCommand implements ChartEditorCommand
}
}
@:nullSafety
class CutItemsCommand implements ChartEditorCommand
{
var notes:Array<SongNoteData>;
@ -679,6 +692,7 @@ class CutItemsCommand implements ChartEditorCommand
}
}
@:nullSafety
class FlipNotesCommand implements ChartEditorCommand
{
var notes:Array<SongNoteData>;
@ -729,6 +743,7 @@ class FlipNotesCommand implements ChartEditorCommand
}
}
@:nullSafety
class PasteItemsCommand implements ChartEditorCommand
{
var targetTimestamp:Float;
@ -787,6 +802,7 @@ class PasteItemsCommand implements ChartEditorCommand
}
}
@:nullSafety
class ExtendNoteLengthCommand implements ChartEditorCommand
{
var note:SongNoteData;

View file

@ -40,6 +40,7 @@ using Lambda;
/**
* Handles dialogs for the new Chart Editor.
*/
@:nullSafety
class ChartEditorDialogHandler
{
static final CHART_EDITOR_DIALOG_ABOUT_LAYOUT:String = Paths.ui('chart-editor/dialogs/about');

View file

@ -16,6 +16,7 @@ import funkin.play.song.SongData.SongEventData;
* A event sprite that can be used to display a song event in a chart.
* Designed to be used and reused efficiently. Has no gameplay functionality.
*/
@:nullSafety
class ChartEditorEventSprite extends FlxSprite
{
public static final DEFAULT_EVENT = 'Default';

View file

@ -14,6 +14,7 @@ import funkin.play.song.SongData.SongNoteData;
* A hold note sprite that can be used to display a note in a chart.
* Designed to be used and reused efficiently. Has no gameplay functionality.
*/
@:nullSafety
class ChartEditorHoldNoteSprite extends SustainTrail
{
/**

View file

@ -10,6 +10,7 @@ import flixel.util.FlxSpriteUtil;
/**
* Handles the note scrollbar preview in the chart editor.
*/
@:nullSafety
class ChartEditorNotePreview extends FlxSprite
{
//

View file

@ -11,6 +11,7 @@ import funkin.play.song.SongData.SongNoteData;
* A note sprite that can be used to display a note in a chart.
* Designed to be used and reused efficiently. Has no gameplay functionality.
*/
@:nullSafety
class ChartEditorNoteSprite extends FlxSprite
{
/**

View file

@ -20,6 +20,7 @@ enum ChartEditorTheme
/**
* Static functions which handle building themed UI elements for a provided ChartEditorState.
*/
@:nullSafety
class ChartEditorThemeHandler
{
// TODO: There's probably a better system of organization for these colors.