Browse Source

Update gdscript_exports.rst (#9327)

* Update gdscript_exports.rst

Added hyperlinks for each export type that lead to annotation documentation further explaining each export type, as requested in issue#9281
Billy Guzik 7 months ago
parent
commit
42ac7c8431
1 changed files with 16 additions and 8 deletions
  1. 16 8
      tutorials/scripting/gdscript/gdscript_exports.rst

+ 16 - 8
tutorials/scripting/gdscript/gdscript_exports.rst

@@ -99,19 +99,19 @@ annotation.
 Strings as paths
 Strings as paths
 ----------------
 ----------------
 
 
-String as a path to a file.
+String as a path to a file. See :ref:`@export_file <class_@GDScript_annotation_@export_file>`.
 
 
 ::
 ::
 
 
     @export_file var f
     @export_file var f
 
 
-String as a path to a directory.
+String as a path to a directory. See :ref:`@export_dir <class_@GDScript_annotation_@export_dir>`.
 
 
 ::
 ::
 
 
     @export_dir var f
     @export_dir var f
 
 
-String as a path to a file, custom filter provided as hint.
+String as a path to a file, custom filter provided as hint. See again :ref:`@export_file <class_@GDScript_annotation_@export_file>`.
 
 
 ::
 ::
 
 
@@ -120,20 +120,20 @@ String as a path to a file, custom filter provided as hint.
 Using paths in the global filesystem is also possible,
 Using paths in the global filesystem is also possible,
 but only in scripts in tool mode.
 but only in scripts in tool mode.
 
 
-String as a path to a PNG file in the global filesystem.
+String as a path to a PNG file in the global filesystem. See :ref:`@export_global_file <class_@GDScript_annotation_@export_global_file>`.
 
 
 ::
 ::
 
 
     @export_global_file("*.png") var tool_image
     @export_global_file("*.png") var tool_image
 
 
-String as a path to a directory in the global filesystem.
+String as a path to a directory in the global filesystem. See :ref:`@export_global_dir <class_@GDScript_annotation_@export_global_dir>`.
 
 
 ::
 ::
 
 
     @export_global_dir var tool_dir
     @export_global_dir var tool_dir
 
 
 The multiline annotation tells the editor to show a large input
 The multiline annotation tells the editor to show a large input
-field for editing over multiple lines.
+field for editing over multiple lines. See :ref:`@export_multiline <class_@GDScript_annotation_@export_multiline>`.
 
 
 ::
 ::
 
 
@@ -142,6 +142,8 @@ field for editing over multiple lines.
 Limiting editor input ranges
 Limiting editor input ranges
 ----------------------------
 ----------------------------
 
 
+See :ref:`@export_range <class_@GDScript_annotation_@export_range>` for all of the following.
+
 Allow integer values from 0 to 20.
 Allow integer values from 0 to 20.
 
 
 ::
 ::
@@ -222,7 +224,7 @@ Floats with easing hint
 -----------------------
 -----------------------
 
 
 Display a visual representation of the ``ease()`` function
 Display a visual representation of the ``ease()`` function
-when editing.
+when editing. See :ref:`@export_exp_easing <class_@GDScript_annotation_@export_exp_easing>`.
 
 
 ::
 ::
 
 
@@ -237,7 +239,7 @@ Regular color given as red-green-blue-alpha value.
 
 
     @export var col: Color
     @export var col: Color
 
 
-Color given as red-green-blue value (alpha will always be 1).
+Color given as red-green-blue value (alpha will always be 1). See :ref:`@export_color_no_alpha <class_@GDScript_annotation_@export_color_no_alpha>`.
 
 
 ::
 ::
 
 
@@ -303,6 +305,8 @@ in conjunction with a :ref:`script in "tool" mode <doc_gdscript_tool_mode>`.
 Exporting bit flags
 Exporting bit flags
 -------------------
 -------------------
 
 
+See :ref:`@export_flags <class_@GDScript_annotation_@export_flags>`.
+
 Integers used as bit flags can store multiple ``true``/``false`` (boolean)
 Integers used as bit flags can store multiple ``true``/``false`` (boolean)
 values in one property. By using the ``@export_flags`` annotation, they
 values in one property. By using the ``@export_flags`` annotation, they
 can be set from the editor::
 can be set from the editor::
@@ -341,6 +345,8 @@ If in doubt, use boolean variables instead.
 Exporting enums
 Exporting enums
 ---------------
 ---------------
 
 
+See :ref:`@export_enum <class_@GDScript_annotation_@export_enum>`.
+
 Properties can be exported with a type hint referencing an enum to limit their values
 Properties can be exported with a type hint referencing an enum to limit their values
 to the values of the enumeration. The editor will create a widget in the Inspector, enumerating
 to the values of the enumeration. The editor will create a widget in the Inspector, enumerating
 the following as "Thing 1", "Thing 2", "Another Thing". The value will be stored as an integer.
 the following as "Thing 1", "Thing 2", "Another Thing". The value will be stored as an integer.
@@ -435,6 +441,8 @@ Other export variants can also be used when exporting arrays:
 ``@export_storage``
 ``@export_storage``
 -------------------
 -------------------
 
 
+See :ref:`@export_storage <class_@GDScript_annotation_@export_storage>`.
+
 By default, exporting a property has two effects:
 By default, exporting a property has two effects:
 
 
 1. makes the property stored in the scene/resource file (:ref:`PROPERTY_USAGE_STORAGE <class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE>`);
 1. makes the property stored in the scene/resource file (:ref:`PROPERTY_USAGE_STORAGE <class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE>`);