ranges woo

This commit is contained in:
Ne_Eo
2024-08-27 03:55:34 +02:00
parent 759e03a1d4
commit 33aa4658f3
@@ -117,15 +117,9 @@ class CharacterAnimButton extends UIButton {
loopedCheckbox.x += 8; loopedCheckbox.y += 6;
indicesTextBox = new UITextBox(nameTextBox.x, nameTextBox.y, animData.indices.getDefault([]).join(","), 278, 22, false, true);
indicesTextBox.onChange = (text:String) -> {
var indices:Array<Int> = [];
for(indice in text.split(",")) {
var i = Std.parseInt(indice.trim());
if (i != null) indices.push(i);
}
this.changeIndicies(indices);
indicesTextBox = new UITextBox(nameTextBox.x, nameTextBox.y, CoolUtil.formatNumberRange(animData.indices.getDefault([]), ", "), 278, 22, false, true);
indicesTextBox.onChange = (text:String) -> {
this.changeIndicies(CoolUtil.parseNumberRange(text));
}
members.push(indicesTextBox);
foldableButtons.push(indicesTextBox);