Merge branch 'main' into translations-system
This commit is contained in:
@@ -1802,7 +1802,7 @@ class Charter extends UIState {
|
||||
|
||||
public inline function __fixSelection(selection:Selection):Selection {
|
||||
var newSelection:Selection = new Selection();
|
||||
for (s in selection) if (!newSelection.contains(s)) newSelection.push(s);
|
||||
for (s in selection) newSelection.pushOnce(s);
|
||||
return newSelection.filter((s:ICharterSelectable) -> {return s != null;});
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class CharterNoteTypesList extends UISubstateWindow {
|
||||
var list:Array<String> = [];
|
||||
for (path in Paths.getFolderContent(pathString, true, mods ? MODS : BOTH)) if(Path.extension(path) == "hx") {
|
||||
var file:String = Path.withoutDirectory(path);
|
||||
if (!list.contains(file)) list.push(file);
|
||||
list.pushOnce(file);
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
@@ -146,11 +146,10 @@ class CharterStrumlineScreen extends UISubstateWindow {
|
||||
i = haxe.io.Path.withoutExtension(i.substr("Voices".length));
|
||||
if (i == "") continue;
|
||||
for (j in PlayState.SONG.meta.difficulties) {
|
||||
if (i.endsWith('-${j.toLowerCase()}')) {
|
||||
if (suffixlist.contains(i.substring(0, i.length - j.length))) continue;
|
||||
else suffixlist.push(i.substring(0, i.length - j.length));
|
||||
}
|
||||
else if (!suffixlist.contains(i)) suffixlist.push(i);
|
||||
if (i.endsWith('-${j.toLowerCase()}'))
|
||||
suffixlist.pushOnce(i.substring(0, i.length - j.length));
|
||||
else
|
||||
suffixlist.pushOnce(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ class UIAutoCompleteTextBox extends UITextBox {
|
||||
var text = label.text;
|
||||
_suggestions = [];
|
||||
if(text.length > 0) {
|
||||
// for(i in suggestItems) if(i.startsWith(text)) _suggestions.pushOnce(i);
|
||||
for(i in suggestItems) if(!_suggestions.contains(i) && i.startsWith(text)) _suggestions.push(i);
|
||||
|
||||
// Clean up suggestions
|
||||
|
||||
Reference in New Issue
Block a user