FilteredEdits
by acgc99
1
Godot-FilteredEdits
Extends base nodes LineEdit and TextEdit with FilteredLineEdit and FilteredTextEdit, respectively, to filter user input. It also allows numeric text value clamping.
If you download the full repository, you will get a small showcase project.
Consider to download Widgets instead of this addon if you will use it.
Features:
- Filtering. Filters user input according to
filter_mode. Filter modes:none: no filter.no-num: no 0-9 characters.+0i: positive or zero integer.i: integer.+0fpositive or zero float.ffloat.
- Clamping.
FilteredLineEdit.clamp_text,FilteredTextEdit.clamp_line,FilteredTextEdit.clamp_linesto clamp values. - Autocompletion. If there is no text and you press
-/.(in the rightfilter_mode) it will write-0/0.respectively. Similarly, if you delete0from-0/0.the-/.will also be deleted.
Notes:
- You might also find useful
LineEdit.virtual_keyboard_enabledandLineEdit.virtual_keyboard_type.TextEdit.virtual_keyboard_enabledis there butTextEdit.virtual_keyboard_typeis not (Godot 4.1), see this. Also, consider that the user could use the physical keyboard to introduce undesired characters. - "." and "-" count as characters in
FilteredLineEdit.max_length. - I requested filter features to be implemented in base Godot, that would require changing base node signals. Meanwhile, I created this workaround.
Known issues
- Won't fix issue Limitation: select all text and press
-/.. - There are some bugs, check issues and open a new one if you find untracked bugs.
Assets
All non-Godot icons has been downloaded form Pictogrammers.
Download
Version2.0.0
Download Now
Support
If you need help or have questions about this plugin, please contact the author.
Contact Author