"Delete Stacked Notes" functionality for the chart editor (#935)
* Delete Stacked Notes * unstack selection * Attempts to translate to italian and polish i do not know these languages so if they're wrong im sorry
This commit is contained in:
@@ -203,6 +203,7 @@
|
||||
<str id="paste">Paste</str>
|
||||
<str id="cut">Cut</str>
|
||||
<str id="delete">Delete</str>
|
||||
<str id="deletestacked">Delete Stacked Notes</str>
|
||||
</group>
|
||||
|
||||
<str id="topBar.chart">Chart</str>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<str id="animation">Animación</str>
|
||||
<str id="atlas">Atlas</str>
|
||||
<str id="spritemap">Mapa de sprites</str>
|
||||
|
||||
|
||||
<str id="directory">Ubicación ({0}/)</str>
|
||||
<str id="found">{0} {1} Encontrado</str>
|
||||
<str id="foundplural">{0} {1} Encontrados</str>
|
||||
@@ -188,6 +188,7 @@
|
||||
<str id="paste">Pegar</str>
|
||||
<str id="cut">Cortar</str>
|
||||
<str id="delete">Eliminar</str>
|
||||
<str id="deletestacked">Eliminar Notas Apiladas</str>
|
||||
</group>
|
||||
|
||||
<str id="topBar.chart">Chart</str>
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
<str id="paste">Incolla</str>
|
||||
<str id="cut">Taglia</str>
|
||||
<str id="delete">Elimina</str>
|
||||
<str id="deletestacked">Elimina Note Impilate</str>
|
||||
</group>
|
||||
|
||||
<str id="topBar.chart">Chart</str>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<str id="animation">Animacja</str>
|
||||
<str id="atlas">Atlas</str>
|
||||
<str id="spritemap">Mapa sprite'ów</str>
|
||||
|
||||
|
||||
<str id="directory">Folder ({0}/)</str>
|
||||
<str id="found">{0} {1} Znaleziono</str>
|
||||
<str id="foundplural">{0} {1} Znaleziono</str>
|
||||
@@ -87,7 +87,7 @@
|
||||
<group name="CharterEventScreen" prefix="charterEventScreen.">
|
||||
<str id="title-creating">Stwórz Grupę Wydarzeń</str>
|
||||
<str id="title-editing">Edytuj Grupę Wydarzeń</str>
|
||||
|
||||
|
||||
<str id="noEvent">Brak Wydarzenia</str>
|
||||
|
||||
<str id="strumLine.format">Struma #{0} ({1})</str>
|
||||
@@ -197,6 +197,7 @@
|
||||
<str id="paste">Wklej</str>
|
||||
<str id="cut">Wytnij</str>
|
||||
<str id="delete">Usuń</str>
|
||||
<str id="deletestacked">Usuń Notatki Ułożone w Stos</str>
|
||||
</group>
|
||||
|
||||
<str id="topBar.chart">Mapa</str>
|
||||
@@ -223,7 +224,7 @@
|
||||
<str id="scrollRight">Przewiń w Prawo</str>
|
||||
<str id="scrollReset">Resetuj Przewinięcie</str>
|
||||
</group>
|
||||
|
||||
|
||||
<str id="topBar.song">Ścieżka</str>
|
||||
<group name="SongMenu" prefix="song.">
|
||||
<str id="goStart">Wróć do początku</str>
|
||||
|
||||
@@ -203,6 +203,7 @@
|
||||
<str id="paste">Colar</str>
|
||||
<str id="cut">Cortar</str>
|
||||
<str id="delete">Apagar</str>
|
||||
<str id="deletestacked">Apagar Notas Empilhadas</str>
|
||||
</group>
|
||||
|
||||
<str id="topBar.chart">Mapa</str>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user