Merge pull request #371 from FunkinCrew/bugfix/FPIQ-286

Remove DynamicTools; fix pause menu on HTML5
This commit is contained in:
Cameron Taylor 2024-03-06 02:30:39 -05:00 committed by GitHub
commit 1fe554e24e
3 changed files with 2 additions and 17 deletions

View file

@ -13,7 +13,6 @@ using Lambda;
using StringTools; using StringTools;
using funkin.util.tools.ArraySortTools; using funkin.util.tools.ArraySortTools;
using funkin.util.tools.ArrayTools; using funkin.util.tools.ArrayTools;
using funkin.util.tools.DynamicTools;
using funkin.util.tools.FloatTools; using funkin.util.tools.FloatTools;
using funkin.util.tools.Int64Tools; using funkin.util.tools.Int64Tools;
using funkin.util.tools.IntTools; using funkin.util.tools.IntTools;

View file

@ -4530,14 +4530,14 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
{ {
// Create an event and place it in the chart. // Create an event and place it in the chart.
// TODO: Figure out configuring event data. // TODO: Figure out configuring event data.
var newEventData:SongEventData = new SongEventData(cursorSnappedMs, eventKindToPlace, eventDataToPlace.clone()); var newEventData:SongEventData = new SongEventData(cursorSnappedMs, eventKindToPlace, Reflect.copy(eventDataToPlace));
performCommand(new AddEventsCommand([newEventData], FlxG.keys.pressed.CONTROL)); performCommand(new AddEventsCommand([newEventData], FlxG.keys.pressed.CONTROL));
} }
else else
{ {
// Create a note and place it in the chart. // Create a note and place it in the chart.
var newNoteData:SongNoteData = new SongNoteData(cursorSnappedMs, cursorColumn, 0, noteKindToPlace.clone()); var newNoteData:SongNoteData = new SongNoteData(cursorSnappedMs, cursorColumn, 0, Reflect.copy(noteKindToPlace));
performCommand(new AddNotesCommand([newNoteData], FlxG.keys.pressed.CONTROL)); performCommand(new AddNotesCommand([newNoteData], FlxG.keys.pressed.CONTROL));

View file

@ -1,14 +0,0 @@
package funkin.util.tools;
class DynamicTools
{
/**
* Creates a full clone of the input `Dynamic`. Only guaranteed to work on anonymous structures.
* @param input The `Dynamic` to clone.
* @return A clone of the input `Dynamic`.
*/
public static function clone(input:Dynamic):Dynamic
{
return Reflect.copy(input);
}
}