Interface NumberSetting
- All Superinterfaces:
GuiSetting
A number with a slider.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondoublefraction()doubleget()kind()doublemax()doublemin()voidnudge(int direction, boolean large) Moves the value by one step, or ten whenlarge.voidreset()voidset(double value) voidslideTo(double value) Sets the value a slider position points at, rounded the way this setting rounds.doublestep()Methods inherited from interface GuiSetting
children, depth, description, hasVisibleChildren, id, isExpanded, isShown, isVisible, label, markDescriptionSeen, module, option, page, parent, setExpanded
-
Method Details
-
kind
NumberSetting.Kind kind() -
get
double get() -
set
-
min
double min() -
max
double max() -
step
double step() -
fraction
double fraction()- Returns:
- Position of the value between min and max, 0 to 1
-
slideTo
void slideTo(double value) Sets the value a slider position points at, rounded the way this setting rounds.- Parameters:
value- Value under the slider, between min and max
-
nudge
void nudge(int direction, boolean large) Moves the value by one step, or ten whenlarge.- Parameters:
direction- 1 or -1
-
formatted
String formatted()- Returns:
- The value as the GUI shows it
-
reset
void reset() -
entryEditor
GuiEditor entryEditor()- Returns:
- An editor to type a value, which may lie outside the slider's range
-