Sector refactoring, invasions and cleanup
This commit is contained in:
@@ -10,7 +10,7 @@ import arc.func.*;
|
||||
public class IntFormat{
|
||||
private final StringBuilder builder = new StringBuilder();
|
||||
private final String text;
|
||||
private int lastValue = Integer.MIN_VALUE;
|
||||
private int lastValue = Integer.MIN_VALUE, lastValue2 = Integer.MIN_VALUE;
|
||||
private Func<Integer, String> converter = String::valueOf;
|
||||
|
||||
public IntFormat(String text){
|
||||
@@ -30,4 +30,14 @@ public class IntFormat{
|
||||
lastValue = value;
|
||||
return builder;
|
||||
}
|
||||
|
||||
public CharSequence get(int value1, int value2){
|
||||
if(lastValue != value1 || lastValue2 != value2){
|
||||
builder.setLength(0);
|
||||
builder.append(Core.bundle.format(text, value1, value2));
|
||||
}
|
||||
lastValue = value1;
|
||||
lastValue2 = value2;
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user