mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Merge pull request #1389 from x2f/patch-1
Added export enums in gdscript_basics.rst
This commit is contained in:
@@ -1037,6 +1037,12 @@ special export syntax is provided.
|
|||||||
# Editor will enumerate with string names
|
# Editor will enumerate with string names
|
||||||
export(String, "Rebecca", "Mary", "Leah") var character_name
|
export(String, "Rebecca", "Mary", "Leah") var character_name
|
||||||
|
|
||||||
|
# Named enum values
|
||||||
|
|
||||||
|
# Editor will enumerate as THING_1, THING_2, ANOTHER_THING
|
||||||
|
enum NamedEnum {THING_1, THING_2, ANOTHER_THING = -1}
|
||||||
|
export (NamedEnum) var x
|
||||||
|
|
||||||
# Strings as paths
|
# Strings as paths
|
||||||
|
|
||||||
# String is a path to a file
|
# String is a path to a file
|
||||||
|
|||||||
Reference in New Issue
Block a user