ctrl+click slider option to reset to default value

This commit is contained in:
yugecin
2016-11-20 23:19:13 +01:00
parent 7898b669f5
commit b19523ff26
2 changed files with 27 additions and 3 deletions

View File

@@ -1189,6 +1189,8 @@ public class Options {
/** The boolean value for the option (if applicable). */
protected boolean bool;
private int defaultVal = 0;
/** The integer value for the option (if applicable). */
protected int val;
@@ -1244,6 +1246,7 @@ public class Options {
GameOption(String name, String displayName, String description, int value, int min, int max) {
this(name, displayName, description);
this.val = value;
this.defaultVal = value;
this.min = min;
this.max = max;
this.type = OptionType.NUMERIC;
@@ -1389,6 +1392,10 @@ public class Options {
return max;
}
public int getDefaultVal() {
return defaultVal;
}
}
/** Map of option display names to GameOptions. */