summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/CodeEdit.xml2
-rw-r--r--doc/classes/EditorResourcePicker.xml35
-rw-r--r--doc/classes/EditorScriptPicker.xml21
-rw-r--r--doc/classes/EditorSpinSlider.xml2
-rw-r--r--doc/classes/JavaScript.xml16
-rw-r--r--doc/classes/TextEdit.xml23
-rw-r--r--doc/classes/TileData.xml2
7 files changed, 93 insertions, 8 deletions
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 81795abcdd..42a6df866f 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -193,8 +193,6 @@
</theme_item>
<theme_item name="line_spacing" type="int" default="4">
</theme_item>
- <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )">
- </theme_item>
<theme_item name="normal" type="StyleBox">
</theme_item>
<theme_item name="outline_size" type="int" default="0">
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index e31a681b8b..30c73daa77 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -4,8 +4,8 @@
Godot editor's control for selecting [Resource] type properties.
</brief_description>
<description>
- This is a [Control] node similar to the one used in the Inspector dock when editing [Resource]s. It provides options for creating, loading, saving and converting resources.
- [b]Note:[/b] It does not include an editor for the resource.
+ This [Control] node is used in the editor's Inspector dock to allow editing of [Resource] type properties. It provides options for creating, loading, saving and converting resources. Can be used with [EditorInspectorPlugin] to recreate the same behavior.
+ [b]Note:[/b] This [Control] does not include any editor for the resource, as editing is controlled by the Inspector dock itself or sub-Inspectors.
</description>
<tutorials>
</tutorials>
@@ -51,6 +51,34 @@
<description>
</description>
</method>
+ <method name="handle_menu_selected" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ This virtual method can be implemented to handle context menu items not handled by default. See [method set_create_options].
+ </description>
+ </method>
+ <method name="set_create_options" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="menu_node" type="Object">
+ </argument>
+ <description>
+ This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [code]menu_node[/code] is a reference to the [PopupMenu] node.
+ [b]Note:[/b] Implement [method handle_menu_selected] to handle these custom items.
+ </description>
+ </method>
+ <method name="set_toggle_pressed">
+ <return type="void">
+ </return>
+ <argument index="0" name="pressed" type="bool">
+ </argument>
+ <description>
+ Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to [code]true[/code].
+ </description>
+ </method>
</methods>
<members>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;&quot;">
@@ -62,6 +90,9 @@
<member name="edited_resource" type="Resource" setter="set_edited_resource" getter="get_edited_resource">
The edited resource value.
</member>
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false">
+ If [code]true[/code], the main button with the resource preview works in the toggle mode. Use [method set_toggle_pressed] to manually set the state.
+ </member>
</members>
<signals>
<signal name="resource_changed">
diff --git a/doc/classes/EditorScriptPicker.xml b/doc/classes/EditorScriptPicker.xml
new file mode 100644
index 0000000000..8334676d92
--- /dev/null
+++ b/doc/classes/EditorScriptPicker.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorScriptPicker" inherits="EditorResourcePicker" version="4.0">
+ <brief_description>
+ Godot editor's control for selecting the [code]script[/code] property of a [Node].
+ </brief_description>
+ <description>
+ Similar to [EditorResourcePicker] this [Control] node is used in the editor's Inspector dock, but only to edit the [code]script[/code] property of a [Node]. Default options for creating new resources of all possible subtypes are replaced with dedicated buttons that open the "Attach Node Script" dialog. Can be used with [EditorInspectorPlugin] to recreate the same behavior.
+ [b]Note:[/b] You must set the [member script_owner] for the custom context menu items to work.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="script_owner" type="Node" setter="set_script_owner" getter="get_script_owner">
+ The owner [Node] of the script property that holds the edited resource.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 381f4fae04..f2c5a00640 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorSpinSlider" inherits="Range" version="4.0">
<brief_description>
+ Godot editor's control for editing numertic values.
</brief_description>
<description>
+ This [Control] node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with [EditorInspectorPlugin] to recreate the same behavior.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index e6d74eeb21..c87e637ff5 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -29,6 +29,22 @@
Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage.
</description>
</method>
+ <method name="download_buffer">
+ <return type="void">
+ </return>
+ <argument index="0" name="buffer" type="PackedByteArray">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <argument index="2" name="mime" type="String" default="&quot;application/octet-stream&quot;">
+ </argument>
+ <description>
+ Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type.
+ [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension.
+ [b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click).
+ [b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession.
+ </description>
+ </method>
<method name="eval">
<return type="Variant">
</return>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index b97728ccd4..29067b5534 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -167,6 +167,15 @@
Returns the text of a specific line.
</description>
</method>
+ <method name="get_line_background_color">
+ <return type="Color">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set.
+ </description>
+ </method>
<method name="get_line_count" qualifiers="const">
<return type="int">
</return>
@@ -548,6 +557,17 @@
If [code]true[/code], hides the line of the specified index.
</description>
</method>
+ <method name="set_line_background_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ Sets the current background color of the line. Set to [code]Color(0, 0, 0, 0)[/code] for no color.
+ </description>
+ </method>
<method name="set_line_gutter_clickable">
<return type="void">
</return>
@@ -987,9 +1007,6 @@
<theme_item name="line_spacing" type="int" default="4">
Sets the spacing between the lines.
</theme_item>
- <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )">
- Sets the [Color] of marked text.
- </theme_item>
<theme_item name="normal" type="StyleBox">
Sets the [StyleBox] of this [TextEdit].
</theme_item>
diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml
index e3bc910ab6..efcbdf2e95 100644
--- a/doc/classes/TileData.xml
+++ b/doc/classes/TileData.xml
@@ -229,7 +229,7 @@
</member>
<member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false">
</member>
- <member name="y_sort_origin" type="Vector2i" setter="set_y_sort_origin" getter="get_y_sort_origin" default="Vector2i( 0, 0 )">
+ <member name="y_sort_origin" type="int" setter="set_y_sort_origin" getter="get_y_sort_origin" default="0">
</member>
<member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0">
</member>