summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/BoxContainer.xml2
-rw-r--r--doc/classes/CheckBox.xml8
-rw-r--r--doc/classes/ConfigFile.xml6
-rw-r--r--doc/classes/Directory.xml1
-rw-r--r--doc/classes/EditorSceneImporter.xml16
-rw-r--r--doc/classes/EditorSceneImporterMesh.xml16
-rw-r--r--doc/classes/EditorScenePostImport.xml7
-rw-r--r--doc/classes/Environment.xml2
-rw-r--r--doc/classes/FileDialog.xml6
-rw-r--r--doc/classes/GIProbe.xml1
-rw-r--r--doc/classes/ImageTexture.xml6
-rw-r--r--doc/classes/ParticlesMaterial.xml4
-rw-r--r--doc/classes/PhysicsServer3D.xml13
-rw-r--r--doc/classes/SoftBody3D.xml14
-rw-r--r--doc/classes/SurfaceTool.xml6
-rw-r--r--doc/classes/Tabs.xml3
-rw-r--r--doc/classes/TextParagraph.xml14
-rw-r--r--doc/classes/TextServer.xml25
-rw-r--r--doc/classes/Texture2D.xml2
-rw-r--r--doc/classes/Theme.xml212
-rw-r--r--doc/classes/TreeItem.xml6
-rw-r--r--doc/classes/Viewport.xml4
-rw-r--r--doc/classes/bool.xml4
-rw-r--r--doc/classes/float.xml45
-rw-r--r--doc/classes/int.xml98
25 files changed, 481 insertions, 40 deletions
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index 0d8233e6ff..ffa7c9066a 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -10,7 +10,7 @@
</tutorials>
<methods>
<method name="add_spacer">
- <return type="void">
+ <return type="Control">
</return>
<argument index="0" name="begin" type="bool">
</argument>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 80febfbfe7..05e412e9da 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -24,6 +24,8 @@
<theme_item name="checked" type="Texture2D">
The check icon to display when the [CheckBox] is checked.
</theme_item>
+ <theme_item name="checked_disabled" type="Texture2D">
+ </theme_item>
<theme_item name="disabled" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is disabled.
</theme_item>
@@ -75,11 +77,17 @@
<theme_item name="radio_checked" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
</theme_item>
+ <theme_item name="radio_checked_disabled" type="Texture2D">
+ </theme_item>
<theme_item name="radio_unchecked" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
</theme_item>
+ <theme_item name="radio_unchecked_disabled" type="Texture2D">
+ </theme_item>
<theme_item name="unchecked" type="Texture2D">
The check icon to display when the [CheckBox] is unchecked.
</theme_item>
+ <theme_item name="unchecked_disabled" type="Texture2D">
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 2cac424f2e..38948a2d6e 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -49,6 +49,12 @@
<tutorials>
</tutorials>
<methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="erase_section">
<return type="void">
</return>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index 6a126204c6..a9d7960501 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -6,6 +6,7 @@
<description>
Directory type. It is used to manage directories and their content (not restricted to the project folder).
When creating a new [Directory], it must be explicitly opened using [method open] before most methods can be used. However, [method file_exists] and [method dir_exists] can be used without opening a directory. If so, they use a path relative to [code]res://[/code].
+ [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. Use [ResourceLoader] to access imported resources.
Here is an example on how to iterate through the files of a directory:
[codeblocks]
[gdscript]
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index db85b859e5..aa55a1653d 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -74,21 +74,11 @@
</constant>
<constant name="IMPORT_ANIMATION" value="2">
</constant>
- <constant name="IMPORT_ANIMATION_DETECT_LOOP" value="4">
+ <constant name="IMPORT_FAIL_ON_MISSING_DEPENDENCIES" value="4">
</constant>
- <constant name="IMPORT_ANIMATION_OPTIMIZE" value="8">
+ <constant name="IMPORT_GENERATE_TANGENT_ARRAYS" value="8">
</constant>
- <constant name="IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS" value="16">
- </constant>
- <constant name="IMPORT_ANIMATION_KEEP_VALUE_TRACKS" value="32">
- </constant>
- <constant name="IMPORT_GENERATE_TANGENT_ARRAYS" value="256">
- </constant>
- <constant name="IMPORT_FAIL_ON_MISSING_DEPENDENCIES" value="512">
- </constant>
- <constant name="IMPORT_MATERIALS_IN_INSTANCES" value="1024">
- </constant>
- <constant name="IMPORT_USE_COMPRESSION" value="2048">
+ <constant name="IMPORT_USE_NAMED_SKIN_BINDS" value="16">
</constant>
</constants>
</class>
diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml
index 58b7104667..9daa3f16bc 100644
--- a/doc/classes/EditorSceneImporterMesh.xml
+++ b/doc/classes/EditorSceneImporterMesh.xml
@@ -60,9 +60,17 @@
<description>
</description>
</method>
+ <method name="get_lightmap_size_hint" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_mesh">
<return type="ArrayMesh">
</return>
+ <argument index="0" name="arg0" type="Mesh">
+ </argument>
<description>
</description>
</method>
@@ -150,6 +158,14 @@
<description>
</description>
</method>
+ <method name="set_lightmap_size_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;surfaces&quot;: [ ]}">
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 5cddecffa8..d1cdc4e43e 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -62,13 +62,6 @@
Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]).
</description>
</method>
- <method name="get_source_folder" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the resource folder the imported scene file is located in.
- </description>
- </method>
<method name="post_import" qualifiers="virtual">
<return type="Object">
</return>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 821aa91d21..6909fac2b7 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -176,6 +176,8 @@
<member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1">
</member>
<member name="sdfgi_enabled" type="bool" setter="set_sdfgi_enabled" getter="is_sdfgi_enabled" default="false">
+ If [code]true[/code], enables signed distance field global illumination.
+ [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
</member>
<member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0">
</member>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index ed437aefd5..966be0a981 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -133,6 +133,9 @@
</constant>
</constants>
<theme_items>
+ <theme_item name="back_folder" type="Texture2D">
+ Custom icon for the back arrow.
+ </theme_item>
<theme_item name="file" type="Texture2D">
Custom icon for files.
</theme_item>
@@ -148,6 +151,9 @@
<theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
The color modulation applied to the folder icon.
</theme_item>
+ <theme_item name="forward_folder" type="Texture2D">
+ Custom icon for the forward arrow.
+ </theme_item>
<theme_item name="parent_folder" type="Texture2D">
Custom icon for the parent folder arrow.
</theme_item>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index dd51248fd9..4f56d1ad3e 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -6,6 +6,7 @@
<description>
[GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/gi_probes/quality].
+ [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
</description>
<tutorials>
<link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index 2bea482bc1..5fef56e354 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -18,11 +18,11 @@
var texture = load("res://icon.png")
$Sprite2D.texture = texture
[/codeblock]
- This is because images have to be imported as [StreamTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method.
- But do note that the image data can still be retrieved from an imported texture as well using the [method Texture2D.get_data] method, which returns a copy of the data:
+ This is because images have to be imported as a [StreamTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method.
+ [b]Note:[/b] The image can be retrieved from an imported texture using the [method Texture2D.get_image] method, which returns a copy of the image:
[codeblock]
var texture = load("res://icon.png")
- var image : Image = texture.get_data()
+ var image : Image = texture.get_image()
[/codeblock]
An [ImageTexture] is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new [EditorImportPlugin].
[b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics hardware limitations.
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 85058cb9d4..6d7f99a55b 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -181,7 +181,7 @@
The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE].
</member>
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
- Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane.
+ Amount of [member spread] along the Y axis.
</member>
<member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )">
Gravity applied to every particle.
@@ -251,7 +251,7 @@
Scale randomness ratio.
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
- Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes.
+ Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
</member>
<member name="sub_emitter_amount_at_end" type="int" setter="set_sub_emitter_amount_at_end" getter="get_sub_emitter_amount_at_end">
</member>
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 9a7926e937..c61347ba0b 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -1241,6 +1241,14 @@
Gets a slider_joint parameter (see [enum SliderJointParam] constants).
</description>
</method>
+ <method name="soft_body_get_bounds" qualifiers="const">
+ <return type="AABB">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="space_create">
<return type="RID">
</return>
@@ -1543,7 +1551,10 @@
<constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType">
The [Shape3D] is a [HeightMapShape3D].
</constant>
- <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType">
+ <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType">
+ The [Shape3D] is a [SoftBody3D].
+ </constant>
+ <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
<constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml
index 29f8ecd432..7999ad774d 100644
--- a/doc/classes/SoftBody3D.xml
+++ b/doc/classes/SoftBody3D.xml
@@ -44,6 +44,12 @@
Returns an individual bit on the collision mask.
</description>
</method>
+ <method name="get_physics_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void">
</return>
@@ -85,11 +91,11 @@
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers this SoftBody3D scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
- <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.0">
+ <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
</member>
<member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0">
</member>
- <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.0">
+ <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5">
</member>
<member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath(&quot;&quot;)">
[NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping.
@@ -99,10 +105,10 @@
<member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
If [code]true[/code], the [SoftBody3D] will respond to [RayCast3D]s.
</member>
- <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="0">
+ <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5">
Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
</member>
- <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="0.0">
+ <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0">
The SoftBody3D's mass.
</member>
</members>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index f5d83c0c46..1195e4aa2b 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -189,6 +189,12 @@
<description>
</description>
</method>
+ <method name="get_primitive" qualifiers="const">
+ <return type="int" enum="Mesh.PrimitiveType">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_skin_weight_count" qualifiers="const">
<return type="int" enum="SurfaceTool.SkinWeightCount">
</return>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 24c114c18b..79fa8896e3 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -254,6 +254,9 @@
</method>
</methods>
<members>
+ <member name="clip_tabs" type="bool" setter="set_clip_tabs" getter="get_clip_tabs" default="true">
+ If [code]true[/code], tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible.
+ </member>
<member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="0">
Select tab at index [code]tab_idx[/code].
</member>
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index 69bf823ccd..8df53b8423 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -289,6 +289,20 @@
Returns the size of the bounding box of the paragraph.
</description>
</method>
+ <method name="get_spacing_bottom" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns extra spacing at the bottom of the line. See [member Font.extra_spacing_bottom].
+ </description>
+ </method>
+ <method name="get_spacing_top" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns extra spacing at the top of the line. See [member Font.extra_spacing_top].
+ </description>
+ </method>
<method name="hit_test" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 4a41b68fee..fe63e434c9 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -258,6 +258,22 @@
Returns advance of the glyph.
</description>
</method>
+ <method name="font_get_glyph_contours" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <argument index="2" name="index" type="int">
+ </argument>
+ <description>
+ Returns outline contours of the glyph in a Dictionary.
+ [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values.
+ [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
+ [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
+ </description>
+ </method>
<method name="font_get_glyph_index" qualifiers="const">
<return type="int">
</return>
@@ -1301,5 +1317,14 @@
<constant name="FEATURE_USE_SUPPORT_DATA" value="128" enum="Feature">
TextServer require external data file for some features.
</constant>
+ <constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag">
+ Contour point is on the curve.
+ </constant>
+ <constant name="CONTOUR_CURVE_TAG_OFF_CONIC" value="0" enum="ContourPointTag">
+ Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
+ </constant>
+ <constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag">
+ Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
index 2270b95c63..b648098a94 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -63,7 +63,7 @@
Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API.
</description>
</method>
- <method name="get_data" qualifiers="const">
+ <method name="get_image" qualifiers="const">
<return type="Image">
</return>
<description>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 9f976838e9..3173dddb42 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -84,6 +84,19 @@
Clears [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
+ <method name="clear_theme_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code].
+ </description>
+ </method>
<method name="copy_default_theme">
<return type="void">
</return>
@@ -194,6 +207,13 @@
Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]node_type[/code].
</description>
</method>
+ <method name="get_font_size_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns all the font size types as a [PackedStringArray] filled with unique type names, for use in [method get_font_size] and/or [method get_font_size_list].
+ </description>
+ </method>
<method name="get_font_type_list" qualifiers="const">
<return type="PackedStringArray">
</return>
@@ -257,6 +277,41 @@
Returns all the [StyleBox] types as a [PackedStringArray] filled with unique type names, for use in [method get_stylebox] and/or [method get_stylebox_list].
</description>
</method>
+ <method name="get_theme_item" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code].
+ Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
+ </description>
+ </method>
+ <method name="get_theme_item_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="node_type" type="String">
+ </argument>
+ <description>
+ Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]node_type[/code].
+ Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
+ </description>
+ </method>
+ <method name="get_theme_item_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <description>
+ Returns all the theme items of [code]data_type[/code] types as a [PackedStringArray] filled with unique type names, for use in [method get_theme_item], [method get_theme_item_list] or data type specific methods.
+ </description>
+ </method>
<method name="get_type_list" qualifiers="const">
<return type="PackedStringArray">
</return>
@@ -336,6 +391,113 @@
Returns [code]false[/code] if the theme does not have [code]node_type[/code].
</description>
</method>
+ <method name="has_theme_item" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]node_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ </description>
+ </method>
+ <method name="rename_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_font">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_font_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_stylebox">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_theme_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="old_name" type="StringName">
+ </argument>
+ <argument index="2" name="name" type="StringName">
+ </argument>
+ <argument index="3" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
<method name="set_color">
<return type="void">
</return>
@@ -347,7 +509,7 @@
</argument>
<description>
Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]node_type[/code].
- Does nothing if the theme does not have [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_constant">
@@ -361,7 +523,7 @@
</argument>
<description>
Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]node_type[/code].
- Does nothing if the theme does not have [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_font">
@@ -375,7 +537,7 @@
</argument>
<description>
Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]node_type[/code].
- Does nothing if the theme does not have [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_font_size">
@@ -389,7 +551,7 @@
</argument>
<description>
Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]node_type[/code].
- Does nothing if the theme does not have [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_icon">
@@ -403,7 +565,7 @@
</argument>
<description>
Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]node_type[/code].
- Does nothing if the theme does not have [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_stylebox">
@@ -417,7 +579,24 @@
</argument>
<description>
Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]node_type[/code].
- Does nothing if the theme does not have [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
+ </description>
+ </method>
+ <method name="set_theme_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <argument index="3" name="value" type="Variant">
+ </argument>
+ <description>
+ Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]node_type[/code].
+ Does nothing if the [code]value[/code] type does not match [code]data_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
</methods>
@@ -430,5 +609,26 @@
</member>
</members>
<constants>
+ <constant name="DATA_TYPE_COLOR" value="0" enum="DataType">
+ Theme's [Color] item type.
+ </constant>
+ <constant name="DATA_TYPE_CONSTANT" value="1" enum="DataType">
+ Theme's constant item type.
+ </constant>
+ <constant name="DATA_TYPE_FONT" value="2" enum="DataType">
+ Theme's [Font] item type.
+ </constant>
+ <constant name="DATA_TYPE_FONT_SIZE" value="3" enum="DataType">
+ Theme's font size item type.
+ </constant>
+ <constant name="DATA_TYPE_ICON" value="4" enum="DataType">
+ Theme's icon [Texture2D] item type.
+ </constant>
+ <constant name="DATA_TYPE_STYLEBOX" value="5" enum="DataType">
+ Theme's [StyleBox] item type.
+ </constant>
+ <constant name="DATA_TYPE_MAX" value="6" enum="DataType">
+ Maximum value for the DataType enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index fd157e5eb9..add23c2ce6 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -741,6 +741,12 @@
Sets the given column's tooltip text.
</description>
</method>
+ <method name="uncollapse_tree">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 8120ae539e..471d21374d 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -80,9 +80,9 @@
</return>
<description>
Returns the viewport's texture.
- [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_data] to flip it back, for example:
+ [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example:
[codeblock]
- var img = get_viewport().get_texture().get_data()
+ var img = get_viewport().get_texture().get_image()
img.flip_y()
[/codeblock]
</description>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index 8da1eb3c88..48f336d58c 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -132,6 +132,7 @@
<argument index="0" name="right" type="bool">
</argument>
<description>
+ Returns [code]true[/code] if two bools are different, i.e. one is [code]true[/code] and the other is [code]false[/code].
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -140,6 +141,7 @@
<argument index="0" name="right" type="bool">
</argument>
<description>
+ Returns [code]true[/code] if left operand is [code]false[/code] and right operand is [code]true[/code].
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -148,6 +150,7 @@
<argument index="0" name="right" type="bool">
</argument>
<description>
+ Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code].
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -156,6 +159,7 @@
<argument index="0" name="right" type="bool">
</argument>
<description>
+ Returns [code]true[/code] if left operand is [code]true[/code] and right operand is [code]false[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 85fe31eec8..11f6d91b05 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -49,6 +49,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if two floats are different from each other.
</description>
</method>
<method name="operator !=" qualifiers="operator">
@@ -57,6 +58,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the integer has different value than the float.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -65,6 +67,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Multiplies two [float]s.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -73,6 +76,10 @@
<argument index="0" name="right" type="Vector2">
</argument>
<description>
+ Multiplies each component of the [Vector2] by the given [float].
+ [codeblock]
+ print(2.5 * Vector2(1, 1)) # Vector2(2.5, 2.5)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -81,6 +88,10 @@
<argument index="0" name="right" type="Vector2i">
</argument>
<description>
+ Multiplies each component of the [Vector2i] by the given [float].
+ [codeblock]
+ print(2.0 * Vector2i(1, 1)) # Vector2i(2.0, 2.0)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -89,6 +100,7 @@
<argument index="0" name="right" type="Vector3">
</argument>
<description>
+ Multiplies each component of the [Vector3] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -97,6 +109,7 @@
<argument index="0" name="right" type="Vector3i">
</argument>
<description>
+ Multiplies each component of the [Vector3i] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -105,6 +118,7 @@
<argument index="0" name="right" type="Quat">
</argument>
<description>
+ Multiplies each component of the [Quat] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -113,6 +127,10 @@
<argument index="0" name="right" type="Color">
</argument>
<description>
+ Multiplies each component of the [Color] by the given [float].
+ [codeblock]
+ print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -121,12 +139,17 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Multiplies a [float] and an [int]. The result is a [float].
</description>
</method>
<method name="operator +" qualifiers="operator">
<return type="float">
</return>
<description>
+ Unary plus operator. Doesn't have any effect.
+ [codeblock]
+ var a = +2.5 # a is 2.5.
+ [/codeblock]
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -135,6 +158,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Adds two floats.
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -143,12 +167,18 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Adds a [float] and an [int]. The result is a [float].
</description>
</method>
<method name="operator -" qualifiers="operator">
<return type="float">
</return>
<description>
+ Unary minus operator. Negates the number.
+ [codeblock]
+ var a = -2.5 # a is -2.5.
+ print(-a) # 2.5
+ [/codeblock]
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -157,6 +187,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Subtracts a float from a float.
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -165,6 +196,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Subtracts an [int] from a [float]. The result is a [float].
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -173,6 +205,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Divides two floats.
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -181,6 +214,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Divides a [float] by an [int]. The result is a [float].
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -189,6 +223,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is less than the right one.
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -197,6 +232,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is less than the given [int].
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -205,6 +241,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -213,6 +250,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is less than or equal to the given [int].
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -221,6 +259,8 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if both floats are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method @GlobalScope.is_equal_approx] or [method @GlobalScope.is_zero_approx] instead, which are more reliable.
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -229,6 +269,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the [float] and the given [int] are equal.
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -237,6 +278,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is greater than the right one.
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -245,6 +287,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is greater than the given [int].
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -253,6 +296,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is greater than or equal to the right one.
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -261,6 +305,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is greater than or equal to the given [int].
</description>
</method>
</methods>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index a63c509937..119cdf8eeb 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -79,6 +79,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if operands are different from each other.
</description>
</method>
<method name="operator !=" qualifiers="operator">
@@ -87,6 +88,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if operands are different from each other.
</description>
</method>
<method name="operator %" qualifiers="operator">
@@ -95,6 +97,12 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns the result of the modulo operator for two integers, i.e. the remainder after dividing both numbers.
+ [codeblock]
+ print(5 % 2) # 1
+ print(12 % 4) # 0
+ print(12 % 2) # 2
+ [/codeblock]
</description>
</method>
<method name="operator &amp;" qualifiers="operator">
@@ -103,6 +111,18 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns the result of bitwise [code]AND[/code] operation for two integers.
+ [codeblock]
+ print(3 &amp; 1) # 1
+ print(11 &amp; 3) # 3
+ [/codeblock]
+ It's useful to retrieve binary flags from a variable.
+ [codeblock]
+ var flags = 5
+ # Do something if the first bit is enabled.
+ if flags &amp; 1:
+ do_stuff()
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -111,6 +131,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Multiplies an [int] and a [float]. The result is a [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -119,6 +140,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Multiplies two [int]s.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -127,6 +149,10 @@
<argument index="0" name="right" type="Vector2">
</argument>
<description>
+ Multiplies each component of the vector by the given integer.
+ [codeblock]
+ print(2 * Vector2(1, 1)) # Vector2(2, 2)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -135,6 +161,7 @@
<argument index="0" name="right" type="Vector2i">
</argument>
<description>
+ Multiplies each component of the integer vector by the given integer.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -143,6 +170,7 @@
<argument index="0" name="right" type="Vector3">
</argument>
<description>
+ Multiplies each component of the vector by the given integer.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -151,6 +179,7 @@
<argument index="0" name="right" type="Vector3i">
</argument>
<description>
+ Multiplies each component of the integer vector by the given integer.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -159,6 +188,7 @@
<argument index="0" name="right" type="Quat">
</argument>
<description>
+ Multiplies each component of the quaternion by the given integer.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -167,12 +197,20 @@
<argument index="0" name="right" type="Color">
</argument>
<description>
+ Multiplies each component of the color by the given integer.
+ [codeblock]
+ print(2 * Color(0.5, 0.5, 0.5)) # Color(1, 1, 1)
+ [/codeblock]
</description>
</method>
<method name="operator +" qualifiers="operator">
<return type="int">
</return>
<description>
+ Unary plus operator. Doesn't have any effect.
+ [codeblock]
+ var a = +1 # a is 1.
+ [/codeblock]
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -181,6 +219,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Adds an [int] to a [float]. The result is a [float].
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -189,12 +228,18 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Adds two integers.
</description>
</method>
<method name="operator -" qualifiers="operator">
<return type="int">
</return>
<description>
+ Unary minus operator. Negates the number.
+ [codeblock]
+ var a = -1 # a is -1.
+ print(-a) # 1
+ [/codeblock]
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -203,6 +248,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Subtracts a [float] from an [int]. The result is a [float].
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -211,6 +257,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Subtracts two integers.
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -219,6 +266,10 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Divides an [int] by a [float]. The result is a [float].
+ [codeblock]
+ print(10 / 3.0) # 3.333...
+ [/codeblock]
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -227,6 +278,11 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Divides two integers. The decimal part of the result is discarded (truncated).
+ [codeblock]
+ print(10 / 2) # 5
+ print(10 / 3) # 3
+ [/codeblock]
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -235,6 +291,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if this [int] is less than the given [float].
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -243,6 +300,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] the left integer is less than the right one.
</description>
</method>
<method name="operator &lt;&lt;" qualifiers="operator">
@@ -251,6 +309,11 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Performs bitwise shift left operation on the integer. Effectively the same as multiplying by a power of 2.
+ [codeblock]
+ print(10 &lt;&lt; 1) # 20
+ print(10 &lt;&lt; 4) # 160
+ [/codeblock]
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -259,6 +322,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if this [int] is less than or equal to the given [float].
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -267,6 +331,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -275,6 +340,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if the integer is equal to the given [float].
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -283,6 +349,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if both integers are equal.
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -291,6 +358,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if this [int] is greater than the given [float].
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -299,6 +367,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] the left integer is greater than the right one.
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -307,6 +376,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if this [int] is greater than or equal to the given [float].
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -315,6 +385,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] the left integer is greater than or equal to the right one.
</description>
</method>
<method name="operator &gt;&gt;" qualifiers="operator">
@@ -323,6 +394,11 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Performs bitwise shift right operation on the integer. Effectively the same as dividing by a power of 2.
+ [codeblock]
+ print(10 &gt;&gt; 1) # 5
+ print(10 &gt;&gt; 2) # 2
+ [/codeblock]
</description>
</method>
<method name="operator ^" qualifiers="operator">
@@ -331,6 +407,11 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns the result of bitwise [code]XOR[/code] operation for two integers.
+ [codeblock]
+ print(5 ^ 1) # 4
+ print(4 ^ 7) # 3
+ [/codeblock]
</description>
</method>
<method name="operator |" qualifiers="operator">
@@ -339,12 +420,29 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns the result of bitwise [code]OR[/code] operation for two integers.
+ [codeblock]
+ print(2 | 4) # 6
+ print(1 | 3) # 3
+ [/codeblock]
+ It's useful to store binary flags in a variable.
+ [codeblock]
+ var flags = 0
+ # Turn first and third bit on.
+ flags |= 1
+ flags |= 4
+ [/codeblock]
</description>
</method>
<method name="operator ~" qualifiers="operator">
<return type="int">
</return>
<description>
+ Returns the result of bitwise [code]NOT[/code] operation for the integer. It's effectively equal to [code]-int + 1[/code].
+ [codeblock]
+ print(~4) # -3
+ print(~7) # -6
+ [/codeblock]
</description>
</method>
</methods>