mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed sequence leading zeros.
This commit is contained in:
parent
34870fd759
commit
7155626dc0
@ -70,9 +70,10 @@ public class Sequence {
|
|||||||
public String getPath (String basePath, int index) {
|
public String getPath (String basePath, int index) {
|
||||||
StringBuilder buffer = new StringBuilder(basePath.length() + digits);
|
StringBuilder buffer = new StringBuilder(basePath.length() + digits);
|
||||||
buffer.append(basePath);
|
buffer.append(basePath);
|
||||||
buffer.append(start + index);
|
String frame = Integer.toString(start + index);
|
||||||
while (buffer.length() < digits)
|
for (int i = digits - frame.length(); i > 0; i--)
|
||||||
buffer.append('0');
|
buffer.append('0');
|
||||||
|
buffer.append(frame);
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user