Finished Layout of GuiObjectManager

This commit is contained in:
CrushedPixel
2015-07-08 16:54:14 +02:00
parent 80a47a61c8
commit 2d19b17626
7 changed files with 375 additions and 23 deletions

View File

@@ -26,10 +26,16 @@ public class GuiNumberInput extends GuiAdvancedTextField {
}
public void setValue(double value) {
if(acceptFloats) {
setText("" + value);
if(minimum != null && value < minimum) {
setText(acceptFloats ? minimum.toString() : Integer.toString((int) Math.round(minimum)));
} else if(maximum != null && value > maximum) {
setText(acceptFloats ? maximum.toString() : Integer.toString((int) Math.round(maximum)));
} else {
setText("" + (int)Math.round(value));
if(acceptFloats) {
setText("" + value);
} else {
setText("" + (int) Math.round(value));
}
}
setCursorPositionZero();
}