GuiAssetAdder now allows to add/remove/edit Assets in a Replay. These Assets are not being saved yet.
This commit is contained in:
@@ -15,12 +15,9 @@ public class GuiNumberInput extends GuiTextField {
|
||||
this.minimum = minimum;
|
||||
this.maximum = maximum;
|
||||
this.acceptFloats = acceptFloats;
|
||||
setCursorPositionZero();
|
||||
if(defaultValue != null) {
|
||||
if(acceptFloats) {
|
||||
setText("" + defaultValue);
|
||||
} else {
|
||||
setText("" + (int)Math.round(defaultValue));
|
||||
}
|
||||
setValue(defaultValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +26,15 @@ public class GuiNumberInput extends GuiTextField {
|
||||
this(id, fontRenderer, xPos, yPos, width, (double) minimum, (double) maximum, (double) defaultValue, acceptFloats);
|
||||
}
|
||||
|
||||
public void setValue(double value) {
|
||||
if(acceptFloats) {
|
||||
setText("" + value);
|
||||
} else {
|
||||
setText("" + (int)Math.round(value));
|
||||
}
|
||||
setCursorPositionZero();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeText(String text) {
|
||||
String textBefore = getText();
|
||||
|
||||
Reference in New Issue
Block a user