Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -69,7 +69,7 @@ class CharacterAnimScreen extends UISubstateWindow {
|
||||
addLabelOn(loopedCheckbox, "Looping");
|
||||
loopedCheckbox.x += 8; loopedCheckbox.y += 6;
|
||||
|
||||
indicesTextBox = new UITextBox(nameTextBox.x, nameTextBox.y + 32 + 40, animData.indices.join(", "), 270);
|
||||
indicesTextBox = new UITextBox(nameTextBox.x, nameTextBox.y + 32 + 40, CoolUtil.formatNumberRange(animData.indices, ", "), 270);
|
||||
add(indicesTextBox);
|
||||
addLabelOn(indicesTextBox, "Indices");
|
||||
|
||||
@@ -109,14 +109,8 @@ class CharacterAnimScreen extends UISubstateWindow {
|
||||
animType: NONE,
|
||||
x: offsetXStepper.value,
|
||||
y: offsetYStepper.value,
|
||||
indices: []
|
||||
indices: CoolUtil.parseNumberRange(indicesTextBox.label.text)
|
||||
};
|
||||
var indicesSplit = indicesTextBox.label.text.split(",");
|
||||
for(indice in indicesSplit) {
|
||||
var i = Std.parseInt(indice.trim());
|
||||
if (i != null)
|
||||
animData.indices.push(i);
|
||||
}
|
||||
|
||||
if (onSave != null) onSave(animData);
|
||||
}
|
||||
|
||||
@@ -194,8 +194,10 @@ class CharacterInfoScreen extends UISubstateWindow {
|
||||
var offset:FlxPoint = character.getAnimOffset(anim.name);
|
||||
animXml.set("x", Std.string(offset.x));
|
||||
animXml.set("y", Std.string(offset.y));
|
||||
offset.put();
|
||||
|
||||
if (anim.indices.length > 0)
|
||||
animXml.set("indices", anim.indices.join(","));
|
||||
animXml.set("indices", CoolUtil.formatNumberRange(anim.indices));
|
||||
xml.addChild(animXml);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user