1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

Add new monospace related hint strings

- Add hint string `monospace` for `PROPERTY_HINT_{NONE,PASSWORD,PLACEHOLDER_TEXT}` to set the `LineEdit` font monospaced.
- Add hint string `monospace` for `PROPERTY_HINT_MULTILINE_TEXT` to set the `TextEdit` font monospaced.
- Add hint string `no_wrap` for `PROPERTY_HINT_MULTILINE_TEXT` to make the `TextEdit` not wrap lines automatically.

Also:
- Fix issue with `EditorPropertyMultilineText` not updating font properly.
- Add `EditorPropertyMultilineText` tweak flags.
- Add support with GDScript `@export_multiline`.
This commit is contained in:
Adam Scott
2025-12-03 09:53:18 -05:00
parent 2ecefada8d
commit 10c7cb878a
12 changed files with 160 additions and 50 deletions

View File

@@ -621,14 +621,16 @@
[/codeblock]
</description>
</annotation>
<annotation name="@export_multiline">
<annotation name="@export_multiline" qualifiers="vararg">
<return type="void" />
<param index="0" name="hint" type="String" default="&quot;&quot;" />
<description>
Export a [String], [Array][lb][String][rb], [PackedStringArray], [Dictionary] or [Array][lb][Dictionary][rb] property with a large [TextEdit] widget instead of a [LineEdit]. This adds support for multiline content and makes it easier to edit large amount of text stored in the property.
See also [constant PROPERTY_HINT_MULTILINE_TEXT].
[codeblock]
@export_multiline var character_biography
@export_multiline var npc_dialogs: Array[String]
@export_multiline("monospace", "no_wrap") var favorite_ascii_art: String
[/codeblock]
</description>
</annotation>