Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mreliptik/line_edit_plus
A custom node addon bringing the power of Regex to the LineEdit node
https://github.com/mreliptik/line_edit_plus
addon godot godot-addon godot-engine
Last synced: 3 months ago
JSON representation
A custom node addon bringing the power of Regex to the LineEdit node
- Host: GitHub
- URL: https://github.com/mreliptik/line_edit_plus
- Owner: MrEliptik
- License: mit
- Created: 2022-01-21T21:50:55.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-31T09:32:57.000Z (about 3 years ago)
- Last Synced: 2023-03-03T00:08:18.456Z (almost 2 years ago)
- Topics: addon, godot, godot-addon, godot-engine
- Language: GDScript
- Homepage: https://twitter.com/mreliptik_
- Size: 1.42 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A custom node addon bringing the power of Regex to the LineEdit node.
Made for the [Godot Addon Jam](https://itch.io/jam/godot-addons-jam-1). [Itch page](https://mreliptik.itch.io/lineeditplus)
## Features
Custom node
Premade Regex patterns or custom ones
Example using `run_regex()`, the `regex_result` signal and `prevent_typing` for digits only input
## How to use
Tick the `Use Regex` box and choose between a `predefined pattern` or enter your `custom Regex pattern`.
- **Prevent typing**: The lineedit node will automatically remove the characters that are not fitting the pattern
- If not using prevent typing, call `run_regex()` to validate the regex on the text of the lineEdit. Returns true if text match the regexYou can also use the signal `regex_result(result, txt)` to get the result as the user is typing.
- result is `true` if the Regex matches the text, `fasle otherwise`
- `txt` is the text that matches the Regex*For example: If you enter a Digits only Regex, all the non digits characters will be removed when the user types them.*
## How to install
Extract the `line_edit_+` folder into the addons folder of you project (create one if needed).
Then head to `Project Settings > Plugins` and enable `LineEdit+`. You can now add a new node and select `LineEdit+` instead of LineEdit.
## LICENSE
This project is distrbuted as-is, under the MIT license. Check [LICENSE](LICENSE) for more detail.
Made by [MrEliptik](https://twitter.com/mreliptik_) for the [Godot Addon Jam](https://itch.io/jam/godot-addons-jam-1)