Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

FilteredEdits

An asset by acgc99
The page banner background of a mountain and forest
FilteredEdits hero image

Quick Information

0 ratings
FilteredEdits icon image
acgc99
FilteredEdits

Extends base nodes `LineEdit` and `TextEdit` with `FilteredLineEdit` and `FilteredTextEdit`, respectively, to filter user input. It also allows numeric text value clamping.

Supported Engine Version
4.1
Version String
2.0.0
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

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.


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.
    • +0f positive or zero float.
    • f float.
  • Clamping.FilteredLineEdit.clamp_text, FilteredTextEdit.clamp_line, FilteredTextEdit.clamp_lines to clamp values.
  • Autocompletion. If there is no text and you press -/. (in the right filter_mode) it will write -0/0. respectively. Similarly, if you delete 0 from -0/0. the -/. will also be deleted.

Notes:

  • You might also find useful LineEdit.virtual_keyboard_enabled and LineEdit.virtual_keyboard_type. TextEdit.virtual_keyboard_enabled is there but TextEdit.virtual_keyboard_type is 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


Assets

All non-Godot icons has been downloaded form Pictogrammers.

Extends base nodes `LineEdit` and `TextEdit` with `FilteredLineEdit` and `FilteredTextEdit`, respectively, to filter user input. It also allows numeric text value clamping.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
FilteredEdits icon image
acgc99
FilteredEdits

Extends base nodes `LineEdit` and `TextEdit` with `FilteredLineEdit` and `FilteredTextEdit`, respectively, to filter user input. It also allows numeric text value clamping.

Supported Engine Version
4.1
Version String
2.0.0
License Version
MIT
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers