Merge branch 'main' into internal-merge
This commit is contained in:
@@ -232,6 +232,11 @@ class Charter extends UIState {
|
||||
label: translate("edit.delete"),
|
||||
keybind: [DELETE],
|
||||
onSelect: _edit_delete
|
||||
},
|
||||
{
|
||||
label: translate("edit.deletestacked"),
|
||||
keybind: [SHIFT,DELETE],
|
||||
onSelect: _edit_deletestacked
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -459,7 +464,7 @@ class Charter extends UIState {
|
||||
rightEventsGroup.eventsRowText = rightEventRowText;
|
||||
|
||||
// thank you neo for pointing out im stupid -lunar
|
||||
// this is future lunar i completely forgot what neo pointed out but hes awesome go follow him on twitter
|
||||
// this is future lunar i completely forgot what neo pointed out but hes awesome go follow him on twitter
|
||||
|
||||
add(gridBackdropDummy = new CameraHoverDummy(gridBackdrops, FlxPoint.weak(1, 0)));
|
||||
selectionBox = new UISliceSprite(0, 0, 2, 2, 'editors/ui/selection');
|
||||
@@ -978,7 +983,7 @@ class Charter extends UIState {
|
||||
currentCursor = ARROW;
|
||||
}
|
||||
case NONE:
|
||||
if (FlxG.mouse.justPressed)
|
||||
if (FlxG.mouse.justPressed)
|
||||
FlxG.mouse.getWorldPosition(charterCamera, dragStartPos);
|
||||
else if (FlxG.mouse.justPressedRight) {
|
||||
closeCurrentContextMenu();
|
||||
@@ -1719,6 +1724,25 @@ class Charter extends UIState {
|
||||
selection = deleteSelection(selection, true);
|
||||
}
|
||||
|
||||
function _edit_deletestacked(_) {
|
||||
UIState.playEditorSound(Flags.DEFAULT_EDITOR_DELETE_SOUND);
|
||||
if (notesGroup.members.length == 0) return;
|
||||
var oldNote:CharterNote = null;
|
||||
var selectionArray:Array<Dynamic> = ((selection.length != 0) ? selection : notesGroup.members.copy());
|
||||
var toDelete:Selection = new Selection();
|
||||
for (note in selectionArray) {
|
||||
if (oldNote != null && oldNote.step == note.step && oldNote.strumLineID == note.strumLineID && oldNote.id == note.id) {
|
||||
noteDeleteAnims.deleteNotes.push({note: oldNote, time: noteDeleteAnims.deleteTime});
|
||||
toDelete.push(oldNote);
|
||||
}
|
||||
oldNote = note;
|
||||
}
|
||||
if (toDelete.length != 0) {
|
||||
deleteSelection(toDelete);
|
||||
if (selection.length != 0) for (i in toDelete) selection.remove(i); //crash prevention
|
||||
}
|
||||
}
|
||||
|
||||
function _undo(undo:CharterChange) {
|
||||
UIState.playEditorSound(Flags.DEFAULT_EDITOR_UNDO_SOUND);
|
||||
switch(undo) {
|
||||
@@ -1955,7 +1979,7 @@ class Charter extends UIState {
|
||||
if (PlayState.SONG.bookmarks != null)
|
||||
bookmarks = PlayState.SONG.bookmarks;
|
||||
} catch (e) {}
|
||||
|
||||
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
@@ -1965,9 +1989,9 @@ class Charter extends UIState {
|
||||
var currentBookmarks:Array<ChartBookmark> = getBookmarkList();
|
||||
var newBookmarks:Array<ChartBookmark> = getBookmarkList();
|
||||
newBookmarks.push({time: daStep, name: name, color: color.toWebString()});
|
||||
|
||||
|
||||
PlayState.SONG.bookmarks = newBookmarks;
|
||||
updateBookmarks();
|
||||
updateBookmarks();
|
||||
undos.addToUndo(CEditBookmarks(currentBookmarks, newBookmarks));
|
||||
}
|
||||
|
||||
@@ -1992,7 +2016,7 @@ class Charter extends UIState {
|
||||
{
|
||||
var bars:Array<FlxSprite> = bs[0];
|
||||
var text:UIText = bs[1];
|
||||
|
||||
|
||||
if (bars != null) {
|
||||
for (spr in bars) {
|
||||
if (spr == null) continue;
|
||||
@@ -2046,7 +2070,7 @@ class Charter extends UIState {
|
||||
0,
|
||||
scrollBar.height
|
||||
);
|
||||
|
||||
|
||||
var bookmarkspr = new FlxSprite(scrollBar.x - 10, yPos).makeSolid(40, 4, bookmarkcolor);
|
||||
uiGroup.add(bookmarkspr);
|
||||
sprites.push(bookmarkspr);
|
||||
@@ -2330,7 +2354,7 @@ class Charter extends UIState {
|
||||
icon: this.noteType == 0 ? 1 : 0
|
||||
}];
|
||||
|
||||
final noteKeys:Array<Array<Array<FlxKey>>> = [[[ZERO], [NUMPADZERO]], [[ONE], [NUMPADONE]], [[TWO], [NUMPADTWO]], [[THREE], [NUMPADTHREE]], [[FOUR], [NUMPADFOUR]], [[FIVE], [NUMPADFIVE]],
|
||||
final noteKeys:Array<Array<Array<FlxKey>>> = [[[ZERO], [NUMPADZERO]], [[ONE], [NUMPADONE]], [[TWO], [NUMPADTWO]], [[THREE], [NUMPADTHREE]], [[FOUR], [NUMPADFOUR]], [[FIVE], [NUMPADFIVE]],
|
||||
[[SIX], [NUMPADSIX]], [[SEVEN], [NUMPADSEVEN]], [[EIGHT], [NUMPADEIGHT]], [[NINE], [NUMPADNINE]]];
|
||||
for (i=>type in noteTypes) {
|
||||
var realNoteID:Int = i+1; // Default Note not stored
|
||||
|
||||
@@ -36,7 +36,7 @@ final class AlphabetComponent {
|
||||
public var cos:Float;
|
||||
public var scaleX:Float;
|
||||
public var scaleY:Float;
|
||||
|
||||
|
||||
public var flipX:Bool;
|
||||
public var flipY:Bool;
|
||||
|
||||
@@ -281,7 +281,7 @@ class Alphabet extends FlxSprite {
|
||||
var anim = getLetterAnim(letter, data, __component, i);
|
||||
//if (cantrace)
|
||||
//trace(anim.name + " | " + __component.anim + " | " + frames.frames[anim.frames[0]]);
|
||||
advance = (Math.isNaN(advance)) ? getAdvance(letter, anim, data) : advance;
|
||||
advance = (Math.isNaN(advance) && i >= data.startIndex) ? getAdvance(letter, anim, data) : advance;
|
||||
|
||||
if (anim == null || __renderData.alpha <= 0.0)
|
||||
continue;
|
||||
@@ -551,7 +551,7 @@ class Alphabet extends FlxSprite {
|
||||
angle: angle,
|
||||
cos: angleCos,
|
||||
sin: angleSin,
|
||||
|
||||
|
||||
flipX: node.get("flipX") == "true",
|
||||
flipY: node.get("flipY") == "true",
|
||||
|
||||
@@ -607,7 +607,7 @@ class Alphabet extends FlxSprite {
|
||||
angle: angle,
|
||||
cos: angleCos,
|
||||
sin: angleSin,
|
||||
|
||||
|
||||
flipX: xFlip,
|
||||
flipY: yFlip,
|
||||
|
||||
@@ -630,7 +630,7 @@ class Alphabet extends FlxSprite {
|
||||
angle: angle,
|
||||
cos: angleCos,
|
||||
sin: angleSin,
|
||||
|
||||
|
||||
flipX: xFlip,
|
||||
flipY: yFlip,
|
||||
|
||||
@@ -664,7 +664,7 @@ class Alphabet extends FlxSprite {
|
||||
var xScale:Float = Std.parseFloat(node.get("scaleX")).getDefaultFloat(1.0);
|
||||
var yScale:Float = Std.parseFloat(node.get("scaleY")).getDefaultFloat(1.0);
|
||||
var advance:Float = Std.parseFloat(node.get("advance"));
|
||||
|
||||
|
||||
var xFlip = node.get("flipX") == "true";
|
||||
var yFlip = node.get("flipY") == "true";
|
||||
|
||||
@@ -685,7 +685,7 @@ class Alphabet extends FlxSprite {
|
||||
angle: angle,
|
||||
cos: angleCos,
|
||||
sin: angleSin,
|
||||
|
||||
|
||||
flipX: xFlip,
|
||||
flipY: yFlip,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user