Closed Henri-J-Norden closed 2 years ago
Discussion of this pull request was performed on the DRGModding discord server, under the following thread: https://discord.com/channels/676880716142739467/968893000535113811/968894581984862329
Approved, but I'll make some modifications before release (Specifically, Setting max/min at runtime would be useful)
Inputs
MinValue, MaxValue [float]
Defines the range of the slider:
MinValue <= SelectedValue <= MaxValue
StartingValue [float]
Default initial value of the slider
LogScale [bool]
LogScale=false
(default) - linear scale - the slider setsSelectedValue
linearly in the range[MinValue, MaxValue]
LogScale=true
- logarithmic scale - the slider setsSelectedValue
logarithmically in the range[MinValue, MaxValue]
- small values get more space on the slider than large valuesRoundToDecimalPlaces [int]
Float precision in decimal places
RoundToDecimalPlaces=-1
(default) - no rounding is applied to theSelectedValue
floatRoundToDecimalPlaces=0
- equivalent to an IntSlider, but with the additional features of the FloatSlider (variable minimum value, logarithmic scale)RoundToDecimalPlaces=x
wherex > 0
-SelectedValue
is rounded tox
decimal placesLIB_F_FloatSlider includes rounding functions
RoundToDecimalPlaces(float, decimalPlaces=int) -> float
andToStringWithPrecision(float, decimalPlaces=int) -> string
.