summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/doc_classes
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2023-02-08 16:15:48 -0300
committerGeorge Marques <george@gmarqu.es>2024-03-07 10:55:21 -0300
commit8e520454ef92965a3e9c14240db0305405f5fead (patch)
tree71361e8da83c5979f888bde96ad81b7ff42c2744 /modules/gdscript/doc_classes
parent24f775089efd1c3e7419a523dd74dc24924b517c (diff)
downloadredot-engine-8e520454ef92965a3e9c14240db0305405f5fead.tar.gz
GDScript: Add @export_custom annotation
Allows setting any arbitrary hint, hint string, and usage flags. Useful for more complex hints or potential future hints not available as a dedicated annotation.
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index ddf506216e..a68d65e8d3 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -341,6 +341,18 @@
[/codeblock]
</description>
</annotation>
+ <annotation name="@export_custom">
+ <return type="void" />
+ <param index="0" name="hint" type="int" enum="PropertyHint" />
+ <param index="1" name="hint_string" type="String" />
+ <param index="2" name="usage" type="int" enum="PropertyUsageFlags" is_bitfield="true" default="6" />
+ <description>
+ Allows you to set a custom hint, hint string, and usage flags for the exported property. Note that there's no validation done in GDScript, it will just pass the hint along to the editor.
+ [codeblock]
+ @export_custom(PROPERTY_HINT_NONE, "suffix:m") var suffix: Vector3
+ [/codeblock]
+ </description>
+ </annotation>
<annotation name="@export_dir">
<return type="void" />
<description>