Closed jackbrown1993 closed 1 year ago
There are several dialog classes set up already -- EditDialog is the base class and then TextDialog, EnumDialog and ListDialog inherit from that. I suspect it would mostly just need a small change to support decimal point character entry. Not sure without looking deeper whether it would be best to modify the TextDialog class or create a FloatDialog instead.
Looks like TextDialog supports all ASCII characters, so that isn't the problem. What is the actual error that occurs?
Looks like TextDialog supports all ASCII characters, so that isn't the problem. What is the actual error that occurs?
It doesn't seem to allow me to input '.' nor does it allow backspace if you make a mistake.
I've added a FloatDialog class to cursesui.py to handle editing floating point values. To use it you would replace a current instance of EditDialog with FloatDialog for those variables that take float values. Works with demoprocess.py at least.
I've added a FloatDialog class to cursesui.py to handle editing floating point values. To use it you would replace a current instance of EditDialog with FloatDialog for those variables that take float values. Works with demoprocess.py at least.
Thanks @dhmsjs, do you want to submit a pull request on this repo or shall I copy code?
From my perspective you can just copy over the code but you are clearly more familiar with using github than I am so if you prefer the pull request just let me know me why.
@dhmsjs thanks will copy it across, not an issue as a small amount od code. For larger changes, its good to open a pull request to the repository you want to contribute towards so you can check that there are no conflicts in the code and it also shows you as the contributor.
@dhmsjs do you know how we can allow curseUI to accept a float value in the input for set temp? It currently doesn't allow x.5 for example at the moment. Jacuzzi's set to use celsius allows values increasing in 0.5 steps