You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-06 17:25:19 +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:
@@ -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="""" />
|
||||
<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>
|
||||
|
||||
@@ -160,7 +160,7 @@ GDScriptParser::GDScriptParser() {
|
||||
register_annotation(MethodInfo("@export_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_DIR, Variant::STRING>);
|
||||
register_annotation(MethodInfo("@export_global_file", PropertyInfo(Variant::STRING, "filter")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_GLOBAL_FILE, Variant::STRING>, varray(""), true);
|
||||
register_annotation(MethodInfo("@export_global_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_GLOBAL_DIR, Variant::STRING>);
|
||||
register_annotation(MethodInfo("@export_multiline"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_MULTILINE_TEXT, Variant::STRING>);
|
||||
register_annotation(MethodInfo("@export_multiline", PropertyInfo(Variant::STRING, "hint")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_MULTILINE_TEXT, Variant::STRING>, varray(""), true);
|
||||
register_annotation(MethodInfo("@export_placeholder", PropertyInfo(Variant::STRING, "placeholder")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_PLACEHOLDER_TEXT, Variant::STRING>);
|
||||
register_annotation(MethodInfo("@export_range", PropertyInfo(Variant::FLOAT, "min"), PropertyInfo(Variant::FLOAT, "max"), PropertyInfo(Variant::FLOAT, "step"), PropertyInfo(Variant::STRING, "extra_hints")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_RANGE, Variant::FLOAT>, varray(1.0, ""), true);
|
||||
register_annotation(MethodInfo("@export_exp_easing", PropertyInfo(Variant::STRING, "hints")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_EXP_EASING, Variant::FLOAT>, varray(""), true);
|
||||
|
||||
Reference in New Issue
Block a user