summaryrefslogtreecommitdiff
path: root/doc/classes/Dictionary.xml
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-26 01:07:00 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-26 01:07:00 +0100
commita5c211641f445cfe1a70260a80cbb6b8a37e984b (patch)
treec6afe14f98644c10ae48c9ca7841c664697be010 /doc/classes/Dictionary.xml
parentcb8aeca1caff50459d319072904201e0f63bf768 (diff)
parentb004f8180e37d1d3a6f06bb5f7f6992b8f0ad5d2 (diff)
Merge pull request #71634 from dalexeev/gds-annotations-analyzer
GDScript: Allow constant expressions in annotations
Diffstat (limited to 'doc/classes/Dictionary.xml')
-rw-r--r--doc/classes/Dictionary.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 5f99ba82b8..03e5b5d1d8 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -42,7 +42,7 @@
You can access a dictionary's value by referencing its corresponding key. In the above example, [code]points_dict["White"][/code] will return [code]50[/code]. You can also write [code]points_dict.White[/code], which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable).
[codeblocks]
[gdscript]
- @export(String, "White", "Yellow", "Orange") var my_color
+ @export_enum("White", "Yellow", "Orange") var my_color: String
var points_dict = {"White": 50, "Yellow": 75, "Orange": 100}
func _ready():
# We can't use dot syntax here as `my_color` is a variable.