aboutsummaryrefslogtreecommitdiff
path: root/doc/base/classes.xml
diff options
context:
space:
mode:
authorFranklin Sobrinho2016-08-16 17:11:30 -0300
committerRémi Verschelde2016-09-01 08:40:54 +0200
commit71a9efe604720a67226330f5c16ef99968ce783d (patch)
tree78e6e31bd79e7d6286dc9001c854e84373336728 /doc/base/classes.xml
parent5f9e6d2b48ee4b76eb145c92de8a581bcf38c6a8 (diff)
downloadgodot-71a9efe604720a67226330f5c16ef99968ce783d.tar.gz
godot-71a9efe604720a67226330f5c16ef99968ce783d.tar.zst
godot-71a9efe604720a67226330f5c16ef99968ce783d.zip
Update Globals and EditorSettings docs
(cherry picked from commit 038e99e1074111c31d9d73d2d389f73078dcd07e)
Diffstat (limited to 'doc/base/classes.xml')
-rw-r--r--doc/base/classes.xml38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 06101580b..f4f610fa5 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -11728,6 +11728,24 @@
[/codeblock]
</description>
<methods>
+ <method name="add_property_info">
+ <argument index="0" name="info" type="Dictionary">
+ </argument>
+ <description>
+ Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String].
+ Example:[codeblock]
+ editor_settings.set("category/property_name", 0)
+
+ var property_info = {
+ "name": "category/property_name",
+ "type": TYPE_INT,
+ "hint": PROPERTY_HINT_ENUM,
+ "hint_string": "one,two,three"
+ }
+
+ editor_settings.add_property_info(property_info)[/codeblock]
+ </description>
+ </method>
<method name="erase">
<argument index="0" name="property" type="String">
</argument>
@@ -13740,6 +13758,26 @@
Contains global variables accessible from everywhere. Use the normal [Object] API, such as "Globals.get(variable)", "Globals.set(variable,value)" or "Globals.has(variable)" to access them. Variables stored in engine.cfg are also loaded into globals, making this object very useful for reading custom game configuration options.
</description>
<methods>
+ <method name="add_property_info">
+ <argument index="0" name="hint" type="Dictionary">
+ </argument>
+ <description>
+ Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String].
+ Example:
+ [codeblock]
+ Globals.set("category/property_name", 0)
+
+ var property_info = {
+ "name": "category/property_name",
+ "type": TYPE_INT,
+ "hint": PROPERTY_HINT_ENUM,
+ "hint_string": "one,two,three"
+ }
+
+ Globals.add_property_info(property_info)
+ [/codeblock]
+ </description>
+ </method>
<method name="clear">
<argument index="0" name="name" type="String">
</argument>