summaryrefslogtreecommitdiff
path: root/doc/classes/Dictionary.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Dictionary.xml')
-rw-r--r--doc/classes/Dictionary.xml10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 8ee09ba8f8..6f2ad5205c 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -43,7 +43,7 @@
You can access a dictionary's values by referencing the appropriate 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(String, "White", "Yellow", "Orange") var my_color
var points_dict = {"White": 50, "Yellow": 75, "Orange": 100}
func _ready():
# We can't use dot syntax here as `my_color` is a variable.
@@ -291,6 +291,14 @@
Returns the list of keys in the [Dictionary].
</description>
</method>
+ <method name="merge">
+ <return type="void" />
+ <argument index="0" name="dictionary" type="Dictionary" />
+ <argument index="1" name="overwrite" type="bool" default="false" />
+ <description>
+ Adds elements from [code]dictionary[/code] to this [Dictionary]. By default, duplicate keys will not be copied over, unless [code]overwrite[/code] is [code]true[/code].
+ </description>
+ </method>
<method name="size" qualifiers="const">
<return type="int" />
<description>