mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 01:57:34 +00:00
Changed how float text fields handle negative values
This commit is contained in:
1 parent
e1eda3ce19
commit
19fb0ff5b7
2 files changed
+4
-4
No files matched your search
@@ -32,8 +32,8 @@ public class FieldDef {
|
||||
private String hoverText = null;
|
||||
|
||||
// Numeric range
|
||||
private float min = Float.MIN_VALUE;
|
||||
private float max = Float.MAX_VALUE;
|
||||
private float min = 0;
|
||||
private float max = Float.POSITIVE_INFINITY;
|
||||
|
||||
// Enum support
|
||||
private Class<? extends Enum<?>> enumClass;
|
||||
@@ -272,7 +272,7 @@ public class FieldDef {
|
||||
public String getHoverText() { return hoverText; }
|
||||
public float getMin() { return min; }
|
||||
public float getMax() { return max; }
|
||||
public boolean hasRange() { return min != Float.MIN_VALUE || max != Float.MAX_VALUE; }
|
||||
public boolean hasRange() { return min != Float.NEGATIVE_INFINITY || max != Float.POSITIVE_INFINITY; }
|
||||
public Class<? extends Enum<?>> getEnumClass() { return enumClass; }
|
||||
public String[] getStringEnumValues() { return stringEnumValues; }
|
||||
public Supplier<SubGuiInterface> getSubGuiFactory() { return subGuiFactory; }
|
||||
|
||||
@@ -23,7 +23,7 @@ public class GuiNpcTextField extends GuiTextField {
|
||||
public int id;
|
||||
public int min = 0, max = Integer.MAX_VALUE, def = 0;
|
||||
public double minDouble = 0, maxDouble = Double.MAX_VALUE, defDouble = 0;
|
||||
public float minFloat = 0, maxFloat = Float.MAX_VALUE, defFloat = 0;
|
||||
public float minFloat = Float.NEGATIVE_INFINITY, maxFloat = Float.POSITIVE_INFINITY, defFloat = 0;
|
||||
protected static GuiNpcTextField activeTextfield = null;
|
||||
public boolean canEdit = true;
|
||||
public String hoverableText = "";
|
||||
|
||||
Reference in new issue
Block a user