setFloat

Used to allow the user to set precise floats, editable by each place value.

Depreciated - do not use this. Instead, parse floats from the entered text from enterText()

Initializing

Same as others, pass the tinyPillow object, aswell as a caption (string)

Select a minimum value and a maximum value, aswell as a starting value using _min, _max, start kwargs, respectively.

setFloat = tpil.gui.setFloat(tpil, "Set Value", _min=10.0, _max=11.5, start="10.5")

yes i know the start value shouldn't be a string it was 3am

that's another reason why this function is depreciated

Usage

Just use .start(). This is a blocking function, so it'll wait till the user is done entering their value.

userFloat = setFloat.start()

Returns the float entered by the user.

Last updated