From 038e99e1074111c31d9d73d2d389f73078dcd07e Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Tue, 16 Aug 2016 17:11:30 -0300 Subject: [PATCH] Update Globals and EditorSettings docs --- doc/base/classes.xml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 4b6f5f510df..3866a6af9cc 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -11738,6 +11738,24 @@ [/codeblock] + + + + + 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] + + @@ -13754,6 +13772,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. + + + + + 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] + +