summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/bind/core_bind.cpp2
-rw-r--r--core/variant_call.cpp2
-rw-r--r--doc/classes/BitMap.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml4
-rw-r--r--doc/classes/EditorInterface.xml2
-rw-r--r--doc/classes/EditorPlugin.xml12
-rw-r--r--doc/classes/GDNativeLibraryResourceLoader.xml15
-rw-r--r--doc/classes/GDNativeLibraryResourceSaver.xml15
-rw-r--r--doc/classes/GraphEdit.xml2
-rw-r--r--doc/classes/KinematicBody.xml3
-rw-r--r--doc/classes/OS.xml8
-rw-r--r--doc/classes/Object.xml2
-rw-r--r--doc/classes/PhysicsDirectBodyState.xml2
-rw-r--r--doc/classes/ResourceFormatLoader.xml16
-rw-r--r--doc/classes/ResourceFormatSaver.xml6
-rw-r--r--doc/classes/ResourceLoader.xml2
-rw-r--r--doc/classes/String.xml9
-rw-r--r--doc/classes/TileMap.xml10
-rw-r--r--doc/classes/TranslationLoaderPO.xml15
-rw-r--r--doc/classes/VisualServer.xml12
-rw-r--r--editor/editor_plugin.cpp2
-rw-r--r--editor/import/editor_import_plugin.cpp2
-rw-r--r--editor/import/resource_importer_obj.cpp8
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp137
-rw-r--r--editor/plugins/tile_set_editor_plugin.h2
-rw-r--r--modules/bullet/godot_result_callbacks.cpp1
-rw-r--r--modules/bullet/shape_bullet.cpp2
-rw-r--r--modules/mono/editor/godotsharp_editor.cpp8
-rw-r--r--modules/mono/glue/Managed/Files/Colors.cs2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml2
-rw-r--r--modules/websocket/emws_client.cpp4
-rw-r--r--scene/gui/graph_edit.cpp2
-rw-r--r--scene/gui/text_edit.cpp17
-rw-r--r--scene/resources/bit_mask.cpp2
-rw-r--r--servers/visual_server.cpp2
35 files changed, 222 insertions, 112 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 6f4561d8e6..6ea70a2916 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -132,7 +132,7 @@ bool _ResourceLoader::exists(const String &p_path, const String &p_type_hint) {
void _ResourceLoader::_bind_methods() {
ClassDB::bind_method(D_METHOD("load_interactive", "path", "type_hint"), &_ResourceLoader::load_interactive, DEFVAL(""));
- ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "p_no_cache"), &_ResourceLoader::load, DEFVAL(""), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "no_cache"), &_ResourceLoader::load, DEFVAL(""), DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_recognized_extensions_for_type", "type"), &_ResourceLoader::get_recognized_extensions_for_type);
ClassDB::bind_method(D_METHOD("set_abort_on_missing_resources", "abort"), &_ResourceLoader::set_abort_on_missing_resources);
ClassDB::bind_method(D_METHOD("get_dependencies", "path"), &_ResourceLoader::get_dependencies);
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 0c6e43fe36..aa180cd4ac 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -291,6 +291,7 @@ struct _VariantCall {
VCALL_LOCALMEM0R(String, is_valid_identifier);
VCALL_LOCALMEM0R(String, is_valid_integer);
VCALL_LOCALMEM0R(String, is_valid_float);
+ VCALL_LOCALMEM1R(String, is_valid_hex_number);
VCALL_LOCALMEM0R(String, is_valid_html_color);
VCALL_LOCALMEM0R(String, is_valid_ip_address);
VCALL_LOCALMEM0R(String, to_int);
@@ -1534,6 +1535,7 @@ void register_variant_methods() {
ADDFUNC0R(STRING, BOOL, String, is_valid_identifier, varray());
ADDFUNC0R(STRING, BOOL, String, is_valid_integer, varray());
ADDFUNC0R(STRING, BOOL, String, is_valid_float, varray());
+ ADDFUNC1R(STRING, BOOL, String, is_valid_hex_number, BOOL, "with_prefix", varray(false));
ADDFUNC0R(STRING, BOOL, String, is_valid_html_color, varray());
ADDFUNC0R(STRING, BOOL, String, is_valid_ip_address, varray());
ADDFUNC0R(STRING, INT, String, to_int, varray());
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index 7fe6a2acef..4b7f8007ca 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -88,7 +88,7 @@
<method name="set_bit_rect">
<return type="void">
</return>
- <argument index="0" name="p_rect" type="Rect2">
+ <argument index="0" name="rect" type="Rect2">
</argument>
<argument index="1" name="bit" type="bool">
</argument>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index d1e90470e1..d9ade2d1e7 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -147,9 +147,9 @@
</argument>
<argument index="2" name="options" type="Dictionary">
</argument>
- <argument index="3" name="r_platform_variants" type="Array">
+ <argument index="3" name="platform_variants" type="Array">
</argument>
- <argument index="4" name="r_gen_files" type="Array">
+ <argument index="4" name="gen_files" type="Array">
</argument>
<description>
</description>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index f073c5e40b..c7b81d7c75 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -159,7 +159,7 @@
<method name="select_file">
<return type="void">
</return>
- <argument index="0" name="p_file" type="String">
+ <argument index="0" name="file" type="String">
</argument>
<description>
</description>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index feaa24b0ab..fb376d1761 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -157,6 +157,12 @@
Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
</description>
</method>
+ <method name="disable_plugin" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="edit" qualifiers="virtual">
<return type="void">
</return>
@@ -166,6 +172,12 @@
This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
</description>
</method>
+ <method name="enable_plugin" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="forward_canvas_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
diff --git a/doc/classes/GDNativeLibraryResourceLoader.xml b/doc/classes/GDNativeLibraryResourceLoader.xml
new file mode 100644
index 0000000000..865381667d
--- /dev/null
+++ b/doc/classes/GDNativeLibraryResourceLoader.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GDNativeLibraryResourceLoader" inherits="ResourceFormatLoader" category="Core" version="3.1">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GDNativeLibraryResourceSaver.xml b/doc/classes/GDNativeLibraryResourceSaver.xml
new file mode 100644
index 0000000000..39f423d762
--- /dev/null
+++ b/doc/classes/GDNativeLibraryResourceSaver.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GDNativeLibraryResourceSaver" inherits="ResourceFormatSaver" category="Core" version="3.1">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 5ac3db1e8e..e778a6423a 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -254,7 +254,7 @@
</description>
</signal>
<signal name="popup_request">
- <argument index="0" name="p_position" type="Vector2">
+ <argument index="0" name="position" type="Vector2">
</argument>
<description>
Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent.
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 3c3a58cb9a..ad41f48ddd 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -138,10 +138,13 @@
If the body is at least this close to another body, this body will consider them to be colliding.
</member>
<member name="move_lock_x" type="bool" setter="set_axis_lock" getter="get_axis_lock">
+ Lock the body's movement in the x-axis.
</member>
<member name="move_lock_y" type="bool" setter="set_axis_lock" getter="get_axis_lock">
+ Lock the body's movement in the y-axis.
</member>
<member name="move_lock_z" type="bool" setter="set_axis_lock" getter="get_axis_lock">
+ Lock the body's movement in the z-axis.
</member>
</members>
<constants>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 579bac4a19..62c5d9b694 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -374,18 +374,18 @@
Returns the actual path to commonly used folders across different platforms. Available locations are specified in [OS.SystemDir].
</description>
</method>
- <method name="get_system_time_secs" qualifiers="const">
+ <method name="get_system_time_msecs" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the epoch time of the operating system in seconds.
+ Returns the epoch time of the operating system in milliseconds.
</description>
</method>
- <method name="get_system_time_msecs" qualifiers="const">
+ <method name="get_system_time_secs" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the epoch time of the operating system in milliseconds.
+ Returns the epoch time of the operating system in seconds.
</description>
</method>
<method name="get_ticks_msec" qualifiers="const">
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index e358ad90b5..76cbe5eebd 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Base class for all non built-in types. Everything which is not a built-in type starts the inheritance chain from this class.
- Objects can be constructed from scripting languages, using `Object.new()` in GDScript, `new Object` in C#, or the "Construct Object" node in VisualScript.
+ Objects can be constructed from scripting languages, using [code]Object.new()[/code] in GDScript, [code]new Object[/code] in C#, or the "Construct Object" node in VisualScript.
Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++).
Some derivatives add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml
index 2f3501ae5d..2b4125aef4 100644
--- a/doc/classes/PhysicsDirectBodyState.xml
+++ b/doc/classes/PhysicsDirectBodyState.xml
@@ -46,7 +46,7 @@
</argument>
<description>
Applies a single directional impulse without affecting rotation.
- This is equivalent to ``apply_impulse(Vector3(0,0,0), impulse)``.
+ This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code].
</description>
</method>
<method name="apply_impulse">
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index f03f0bbf54..97547a607a 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -4,9 +4,9 @@
Loads a specific resource type from a file.
</brief_description>
<description>
- Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They get queried when you call `load`, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoader are registered in the engine.
- Extending this class allows you to define your own. You should give it a global class name with `class_name` for it to be registered. You may as well implement a [ResourceFormatSaver].
- Note: you can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. Example: it's better to import .PNG textures as .STEX first, so they can be loaded with better efficiency on the graphics card.
+ Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They get queried when you call [code]load[/code], or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoader are registered in the engine.
+ Extending this class allows you to define your own. You should give it a global class name with [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatSaver].
+ Note: You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. Example: it's better to import .PNG textures as .STEX first, so they can be loaded with better efficiency on the graphics card.
</description>
<tutorials>
</tutorials>
@@ -21,7 +21,7 @@
<argument index="1" name="add_types" type="String">
</argument>
<description>
- If implemented, gets the dependencies of a given resource. If add_types is true, paths should be appended "::TypeName", where `TypeName` is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return "Resource" for them.
+ If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]Resource[/code] for them.
</description>
</method>
<method name="get_recognized_extensions" qualifiers="virtual">
@@ -37,7 +37,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return "". Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return "Resource" for them.
+ Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return [code]""[/code]. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
<method name="handles_type" qualifiers="virtual">
@@ -46,7 +46,7 @@
<argument index="0" name="typename" type="String">
</argument>
<description>
- Tells which resource class this loader can load. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return "Resource" for them.
+ Tells which resource class this loader can load. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them.
</description>
</method>
<method name="load" qualifiers="virtual">
@@ -57,7 +57,7 @@
<argument index="1" name="original_path" type="String">
</argument>
<description>
- Loads a resource when the engine finds this loader to be compatible. original_path: If the loaded resource is the result of an import, original_path will target the source file. Returns a resource object if succeeded, or an ERR_* constant listed in [@GlobalScope] if it failed.
+ Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a resource object if succeeded, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed.
</description>
</method>
<method name="rename_dependencies" qualifiers="virtual">
@@ -68,7 +68,7 @@
<argument index="1" name="renames" type="String">
</argument>
<description>
- If implemented, renames dependencies within the given resource and saves it. renames is a dictionary { String => String } mapping old dependency paths to new paths. Returns OK on success, or an ERR_* constant listed in [@GlobalScope] in case of failure.
+ If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String =&gt; String }[/code] mapping old dependency paths to new paths. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] in case of failure.
</description>
</method>
</methods>
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index d15d97fc84..d50027ef8e 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -4,8 +4,8 @@
Saves a specific resource type to a file.
</brief_description>
<description>
- The engine can save resources when you do it from the editor, or when you call `ResourceSaver.save(resource)`. This is accomplished with multiple `ResourceFormatSavers`, each handling its own format.
- By default, Godot saves resources as `.tres`, `.res` or another built-in format, but you can choose to create your own format by extending this class. You should give it a global class name with `class_name` for it to be registered. You may as well implement a [ResourceFormatLoader].
+ The engine can save resources when you do it from the editor, or when you call [method ResourceSaver.save]. This is accomplished with multiple [code]ResourceFormatSaver[/code]s, each handling its own format.
+ By default, Godot saves resources as [code].tres[/code], [code].res[/code] or another built-in format, but you can choose to create your own format by extending this class. You should give it a global class name with [code]class_name[/code] for it to be registered. You may as well implement a [ResourceFormatLoader].
</description>
<tutorials>
</tutorials>
@@ -40,7 +40,7 @@
<argument index="2" name="flags" type="int">
</argument>
<description>
- Saves the given resource object to a file. flags is a bitmask composed with FLAG_* constants defined in [ResourceSaver]. Returns OK on success, or an ERR_* constant listed in [@GlobalScope] if it failed.
+ Saves the given resource object to a file. [code]flags[/code] is a bitmask composed with [code]FLAG_*[/code] constants defined in [ResourceSaver]. Returns [code]OK[/code] on success, or an [code]ERR_*[/code] constant listed in [@GlobalScope] if it failed.
</description>
</method>
</methods>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index ae900e34ef..926bd63de2 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -61,7 +61,7 @@
</argument>
<argument index="1" name="type_hint" type="String" default="&quot;&quot;">
</argument>
- <argument index="2" name="p_no_cache" type="bool" default="false">
+ <argument index="2" name="no_cache" type="bool" default="false">
</argument>
<description>
</description>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 536165487d..dbef84fc15 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -439,6 +439,15 @@
Returns [code]true[/code] if this string contains a valid float.
</description>
</method>
+ <method name="is_valid_hex_number">
+ <return type="bool">
+ </return>
+ <argument index="0" name="with_prefix" type="bool" default="False">
+ </argument>
+ <description>
+ Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code].
+ </description>
+ </method>
<method name="is_valid_html_color">
<return type="bool">
</return>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index a272508f10..fb5a733ccd 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -37,6 +37,16 @@
Returns the tile index of the given cell.
</description>
</method>
+ <method name="get_cell_autotile_coord" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <argument index="1" name="y" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_cellv" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/TranslationLoaderPO.xml b/doc/classes/TranslationLoaderPO.xml
new file mode 100644
index 0000000000..58cf2f6572
--- /dev/null
+++ b/doc/classes/TranslationLoaderPO.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TranslationLoaderPO" inherits="ResourceFormatLoader" category="Core" version="3.1">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index 4fd78b9682..62dfb73b2d 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -1188,6 +1188,16 @@
<description>
</description>
</method>
+ <method name="environment_set_sky_orientation">
+ <return type="void">
+ </return>
+ <argument index="0" name="env" type="RID">
+ </argument>
+ <argument index="1" name="orientation" type="Basis">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="environment_set_ssao">
<return type="void">
</return>
@@ -3103,7 +3113,7 @@
</return>
<argument index="0" name="scenario" type="RID">
</argument>
- <argument index="1" name="p_size" type="int">
+ <argument index="1" name="size" type="int">
</argument>
<argument index="2" name="subdiv" type="int">
</argument>
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 403db4b8ba..ff8cce8057 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -273,7 +273,7 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_resource_filesystem"), &EditorInterface::get_resource_file_system);
ClassDB::bind_method(D_METHOD("get_editor_viewport"), &EditorInterface::get_editor_viewport);
ClassDB::bind_method(D_METHOD("make_mesh_previews", "meshes", "preview_size"), &EditorInterface::_make_mesh_previews);
- ClassDB::bind_method(D_METHOD("select_file", "p_file"), &EditorInterface::select_file);
+ ClassDB::bind_method(D_METHOD("select_file", "file"), &EditorInterface::select_file);
ClassDB::bind_method(D_METHOD("get_selected_path"), &EditorInterface::get_selected_path);
ClassDB::bind_method(D_METHOD("set_plugin_enabled", "plugin", "enabled"), &EditorInterface::set_plugin_enabled);
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index c1c1183692..fbb5bf9342 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -165,5 +165,5 @@ void EditorImportPlugin::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::REAL, "get_priority"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_import_order"));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "get_option_visibility", PropertyInfo(Variant::STRING, "option"), PropertyInfo(Variant::DICTIONARY, "options")));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "r_platform_variants"), PropertyInfo(Variant::ARRAY, "r_gen_files")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "platform_variants"), PropertyInfo(Variant::ARRAY, "gen_files")));
}
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index c237d2e854..ae118e3e01 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -45,6 +45,7 @@ uint32_t EditorOBJImporter::get_import_flags() const {
static Error _parse_material_library(const String &p_path, Map<String, Ref<SpatialMaterial> > &material_map, List<String> *r_missing_deps) {
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
+ ERR_EXPLAIN(vformat("Couldn't open MTL file '%s', it may not exist or not be readable.", p_path));
ERR_FAIL_COND_V(!f, ERR_CANT_OPEN);
Ref<SpatialMaterial> current;
@@ -206,7 +207,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati
static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p_single_mesh, bool p_generate_tangents, bool p_optimize, Vector3 p_scale_mesh, List<String> *r_missing_deps) {
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
-
+ ERR_EXPLAIN(vformat("Couldn't open OBJ file '%s', it may not exist or not be readable.", p_path));
ERR_FAIL_COND_V(!f, ERR_CANT_OPEN);
Ref<ArrayMesh> mesh;
@@ -217,11 +218,6 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p
bool flip_faces = false;
int mesh_flags = p_optimize ? Mesh::ARRAY_COMPRESS_DEFAULT : 0;
- //bool flip_faces = p_options["force/flip_faces"];
- //bool force_smooth = p_options["force/smooth_shading"];
- //bool weld_vertices = p_options["force/weld_vertices"];
- //float weld_tolerance = p_options["force/weld_tolerance"];
-
Vector<Vector3> vertices;
Vector<Vector3> normals;
Vector<Vector2> uvs;
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index e5551d385b..2f174cb4b6 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -375,19 +375,6 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", varray(SHAPE_DELETE));
toolbar->add_child(tools[SHAPE_DELETE]);
- separator_grid = memnew(VSeparator);
- toolbar->add_child(separator_grid);
- tools[SHAPE_KEEP_INSIDE_TILE] = memnew(ToolButton);
- tools[SHAPE_KEEP_INSIDE_TILE]->set_toggle_mode(true);
- tools[SHAPE_KEEP_INSIDE_TILE]->set_pressed(true);
- tools[SHAPE_KEEP_INSIDE_TILE]->set_tooltip(TTR("Keep polygon inside region Rect."));
- toolbar->add_child(tools[SHAPE_KEEP_INSIDE_TILE]);
- tools[TOOL_GRID_SNAP] = memnew(ToolButton);
- tools[TOOL_GRID_SNAP]->set_toggle_mode(true);
- tools[TOOL_GRID_SNAP]->set_tooltip(TTR("Enable snap and show grid (configurable via the Inspector)."));
- tools[TOOL_GRID_SNAP]->connect("toggled", this, "_on_grid_snap_toggled");
- toolbar->add_child(tools[TOOL_GRID_SNAP]);
-
spin_priority = memnew(SpinBox);
spin_priority->set_min(1);
spin_priority->set_max(255);
@@ -406,6 +393,19 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
spin_z_index->hide();
toolbar->add_child(spin_z_index);
+ separator_grid = memnew(VSeparator);
+ toolbar->add_child(separator_grid);
+ tools[SHAPE_KEEP_INSIDE_TILE] = memnew(ToolButton);
+ tools[SHAPE_KEEP_INSIDE_TILE]->set_toggle_mode(true);
+ tools[SHAPE_KEEP_INSIDE_TILE]->set_pressed(true);
+ tools[SHAPE_KEEP_INSIDE_TILE]->set_tooltip(TTR("Keep polygon inside region Rect."));
+ toolbar->add_child(tools[SHAPE_KEEP_INSIDE_TILE]);
+ tools[TOOL_GRID_SNAP] = memnew(ToolButton);
+ tools[TOOL_GRID_SNAP]->set_toggle_mode(true);
+ tools[TOOL_GRID_SNAP]->set_tooltip(TTR("Enable snap and show grid (configurable via the Inspector)."));
+ tools[TOOL_GRID_SNAP]->connect("toggled", this, "_on_grid_snap_toggled");
+ toolbar->add_child(tools[TOOL_GRID_SNAP]);
+
Control *separator = memnew(Control);
separator->set_h_size_flags(SIZE_EXPAND_FILL);
toolbar->add_child(separator);
@@ -481,7 +481,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
//---------------
helper = memnew(TilesetEditorContext(this));
- tile_names_opacity = 0;
+ tile_names_visible = false;
// config scale
max_scale = 10.0f;
@@ -631,8 +631,8 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
spin_z_index->hide();
} break;
case EDITMODE_COLLISION:
- case EDITMODE_NAVIGATION:
- case EDITMODE_OCCLUSION: {
+ case EDITMODE_OCCLUSION:
+ case EDITMODE_NAVIGATION: {
tools[TOOL_SELECT]->show();
separator_bitmask->hide();
@@ -667,9 +667,7 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
separator_delete->hide();
tools[SHAPE_DELETE]->hide();
- separator_grid->hide();
tools[SHAPE_KEEP_INSIDE_TILE]->hide();
- tools[TOOL_GRID_SNAP]->hide();
tools[TOOL_SELECT]->set_pressed(true);
tools[TOOL_SELECT]->set_tooltip(TTR("LMB: Set bit on.\nRMB: Set bit off.\nClick on another Tile to edit it."));
@@ -905,17 +903,16 @@ void TileSetEditor::_on_workspace_draw() {
}
void TileSetEditor::_on_workspace_process() {
- float a = tile_names_opacity;
- if (Input::get_singleton()->is_key_pressed(KEY_ALT) || tools[VISIBLE_INFO]->is_pressed()) {
- a += get_tree()->get_idle_process_time() * 2;
- } else {
- a -= get_tree()->get_idle_process_time() * 2;
- }
- a = CLAMP(a, 0, 1);
- if (a != tile_names_opacity)
+ if (Input::get_singleton()->is_key_pressed(KEY_ALT) || tools[VISIBLE_INFO]->is_pressed()) {
+ if (!tile_names_visible) {
+ tile_names_visible = true;
+ workspace_overlay->update();
+ }
+ } else if (tile_names_visible) {
+ tile_names_visible = false;
workspace_overlay->update();
- tile_names_opacity = a;
+ }
}
void TileSetEditor::_on_workspace_overlay_draw() {
@@ -927,7 +924,7 @@ void TileSetEditor::_on_workspace_overlay_draw() {
const Color COLOR_SINGLE = Color(0.988281, 0.909323, 0.266373);
const Color COLOR_ATLAS = Color(0.78653, 0.812835, 0.832031);
- if (tile_names_opacity > 0) {
+ if (tile_names_visible) {
RID current_texture_rid = get_current_texture()->get_rid();
List<int> *tiles = new List<int>();
tileset->get_tile_list(tiles);
@@ -944,13 +941,12 @@ void TileSetEditor::_on_workspace_overlay_draw() {
c = COLOR_AUTOTILE;
else if (tileset->tile_get_tile_mode(t_id) == TileSet::ATLAS_TILE)
c = COLOR_ATLAS;
- c.a = tile_names_opacity;
String tile_id_name = String::num(t_id, 0) + ": " + tileset->tile_get_name(t_id);
Ref<Font> font = get_font("font", "Label");
region.set_size(font->get_string_size(tile_id_name));
workspace_overlay->draw_rect(region, c);
region.position.y += region.size.y - 2;
- c = Color(0.1, 0.1, 0.1, tile_names_opacity);
+ c = Color(0.1, 0.1, 0.1);
workspace_overlay->draw_string(font, region.position, tile_id_name, c);
}
}
@@ -1787,11 +1783,12 @@ void TileSetEditor::draw_polygon_shapes() {
if (polygon.size() > 2) {
workspace->draw_polygon(polygon, colors);
}
+
if (coord == edited_shape_coord || tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
- for (int j = 0; j < shape->get_points().size() - 1; j++) {
- workspace->draw_line(shape->get_points()[j] + anchor, shape->get_points()[j + 1] + anchor, c_border, 1, true);
+ for (int j = 0; j < polygon.size() - 1; j++) {
+ workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
}
-
+ workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
if (shape == edited_collision_shape) {
draw_handles = true;
}
@@ -1810,16 +1807,23 @@ void TileSetEditor::draw_polygon_shapes() {
Vector<Color> colors;
Vector2 anchor = WORKSPACE_MARGIN;
anchor += tileset->tile_get_region(get_current_tile()).position;
- for (int j = 0; j < shape->get_polygon().size(); j++) {
- polygon.push_back(shape->get_polygon()[j] + anchor);
- colors.push_back(c_bg);
+ if (shape == edited_occlusion_shape && current_shape.size() > 2) {
+ for (int j = 0; j < current_shape.size(); j++) {
+ polygon.push_back(current_shape[j]);
+ colors.push_back(c_bg);
+ }
+ } else {
+ for (int j = 0; j < shape->get_polygon().size(); j++) {
+ polygon.push_back(shape->get_polygon()[j] + anchor);
+ colors.push_back(c_bg);
+ }
}
workspace->draw_polygon(polygon, colors);
- for (int j = 0; j < shape->get_polygon().size() - 1; j++) {
- workspace->draw_line(shape->get_polygon()[j] + anchor, shape->get_polygon()[j + 1] + anchor, c_border, 1, true);
+ for (int j = 0; j < polygon.size() - 1; j++) {
+ workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
}
- workspace->draw_line(shape->get_polygon()[shape->get_polygon().size() - 1] + anchor, shape->get_polygon()[0] + anchor, c_border, 1, true);
+ workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
if (shape == edited_occlusion_shape) {
draw_handles = true;
}
@@ -1860,11 +1864,12 @@ void TileSetEditor::draw_polygon_shapes() {
}
}
workspace->draw_polygon(polygon, colors);
+
if (coord == edited_shape_coord) {
- for (int j = 0; j < shape->get_polygon().size() - 1; j++) {
- workspace->draw_line(shape->get_polygon()[j] + anchor, shape->get_polygon()[j + 1] + anchor, c_border, 1, true);
+ for (int j = 0; j < polygon.size() - 1; j++) {
+ workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
}
- workspace->draw_line(shape->get_polygon()[shape->get_polygon().size() - 1] + anchor, shape->get_polygon()[0] + anchor, c_border, 1, true);
+ workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
if (shape == edited_occlusion_shape) {
draw_handles = true;
}
@@ -1885,24 +1890,28 @@ void TileSetEditor::draw_polygon_shapes() {
Vector<Color> colors;
Vector2 anchor = WORKSPACE_MARGIN;
anchor += tileset->tile_get_region(get_current_tile()).position;
- PoolVector<Vector2> vertices = shape->get_vertices();
- for (int j = 0; j < shape->get_polygon(0).size(); j++) {
- polygon.push_back(vertices[shape->get_polygon(0)[j]] + anchor);
- colors.push_back(c_bg);
+ if (shape == edited_navigation_shape && current_shape.size() > 2) {
+ for (int j = 0; j < current_shape.size(); j++) {
+ polygon.push_back(current_shape[j]);
+ colors.push_back(c_bg);
+ }
+ } else {
+ PoolVector<Vector2> vertices = shape->get_vertices();
+ for (int j = 0; j < shape->get_polygon(0).size(); j++) {
+ polygon.push_back(vertices[shape->get_polygon(0)[j]] + anchor);
+ colors.push_back(c_bg);
+ }
}
workspace->draw_polygon(polygon, colors);
- if (shape->get_polygon_count() > 0) {
- PoolVector<Vector2> vertices = shape->get_vertices();
- for (int j = 0; j < shape->get_polygon(0).size() - 1; j++) {
- workspace->draw_line(vertices[shape->get_polygon(0)[j]] + anchor, vertices[shape->get_polygon(0)[j + 1]] + anchor, c_border, 1, true);
- }
- if (shape == edited_navigation_shape) {
- draw_handles = true;
- }
+ for (int j = 0; j < polygon.size() - 1; j++) {
+ workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
+ }
+ workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
+ if (shape == edited_navigation_shape) {
+ draw_handles = true;
}
}
-
} else {
Map<Vector2, Ref<NavigationPolygon> > map = tileset->autotile_get_navigation_map(t_id);
for (Map<Vector2, Ref<NavigationPolygon> >::Element *E = map.front(); E; E = E->next()) {
@@ -1932,7 +1941,7 @@ void TileSetEditor::draw_polygon_shapes() {
polygon.push_back(current_shape[j]);
colors.push_back(c_bg);
}
- } else if (shape->get_polygon_count() > 0) {
+ } else {
PoolVector<Vector2> vertices = shape->get_vertices();
for (int j = 0; j < shape->get_polygon(0).size(); j++) {
polygon.push_back(vertices[shape->get_polygon(0)[j]] + anchor);
@@ -1940,15 +1949,14 @@ void TileSetEditor::draw_polygon_shapes() {
}
}
workspace->draw_polygon(polygon, colors);
+
if (coord == edited_shape_coord) {
- if (shape->get_polygon_count() > 0) {
- PoolVector<Vector2> vertices = shape->get_vertices();
- for (int j = 0; j < shape->get_polygon(0).size() - 1; j++) {
- workspace->draw_line(vertices[shape->get_polygon(0)[j]] + anchor, vertices[shape->get_polygon(0)[j + 1]] + anchor, c_border, 1, true);
- }
- if (shape == edited_navigation_shape) {
- draw_handles = true;
- }
+ for (int j = 0; j < polygon.size() - 1; j++) {
+ workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
+ }
+ workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
+ if (shape == edited_navigation_shape) {
+ draw_handles = true;
}
}
}
@@ -1957,6 +1965,7 @@ void TileSetEditor::draw_polygon_shapes() {
} break;
default: {}
}
+
if (creating_shape) {
for (int j = 0; j < current_shape.size() - 1; j++) {
workspace->draw_line(current_shape[j], current_shape[j + 1], Color(0, 1, 1), 1, true);
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index 276e23f9ee..f2e7e977cb 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -107,7 +107,7 @@ class TileSetEditor : public HSplitContainer {
bool creating_shape;
int dragging_point;
- float tile_names_opacity;
+ bool tile_names_visible;
Vector2 region_from;
Rect2 edited_region;
bool draw_edited_region;
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp
index 0117bb375f..3dc9f3fce5 100644
--- a/modules/bullet/godot_result_callbacks.cpp
+++ b/modules/bullet/godot_result_callbacks.cpp
@@ -304,6 +304,7 @@ btScalar GodotRestInfoContactResultCallback::addSingleResult(btManifoldPoint &cp
colObj = static_cast<CollisionObjectBullet *>(colObj1Wrap->getCollisionObject()->getUserPointer());
m_result->shape = cp.m_index1;
B_TO_G(cp.getPositionWorldOnB(), m_result->point);
+ B_TO_G(cp.m_normalWorldOnB, m_result->normal);
m_rest_info_bt_point = cp.getPositionWorldOnB();
m_rest_info_collision_object = colObj1Wrap->getCollisionObject();
} else {
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index 2027d8e1eb..55dcd9c323 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/modules/bullet/shape_bullet.cpp
@@ -487,7 +487,7 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
PoolByteArray im_data = l_image->get_data();
- l_heights.resize(l_image->get_width() * l_image->get_width());
+ l_heights.resize(l_image->get_width() * l_image->get_height());
PoolRealArray::Write w = l_heights.write();
PoolByteArray::Read r = im_data.read();
diff --git a/modules/mono/editor/godotsharp_editor.cpp b/modules/mono/editor/godotsharp_editor.cpp
index cce86efbf5..a1f4bb3c4c 100644
--- a/modules/mono/editor/godotsharp_editor.cpp
+++ b/modules/mono/editor/godotsharp_editor.cpp
@@ -251,6 +251,14 @@ Error GodotSharpEditor::open_in_external_editor(const Ref<Script> &p_script, int
// Try to search it again if it wasn't found last time or if it was removed from its location
vscode_path = path_which("code");
}
+ if (vscode_path.empty() || !FileAccess::exists(vscode_path)) {
+ // On some Linux distro the executable has the name vscode
+ vscode_path = path_which("vscode");
+ }
+ if (vscode_path.empty() || !FileAccess::exists(vscode_path)) {
+ // Executable name when installing VSCode directly from MS on Linux
+ vscode_path = path_which("visual-studio-code");
+ }
List<String> args;
diff --git a/modules/mono/glue/Managed/Files/Colors.cs b/modules/mono/glue/Managed/Files/Colors.cs
index 942375b0fe..bc2a1a3bd7 100644
--- a/modules/mono/glue/Managed/Files/Colors.cs
+++ b/modules/mono/glue/Managed/Files/Colors.cs
@@ -8,7 +8,7 @@ namespace Godot
// Color names and values are derived from core/color_names.inc
internal static readonly Dictionary<string, Color> namedColors = new Dictionary<string, Color> {
{"aliceblue", new Color(0.94f, 0.97f, 1.00f)},
- {"antiqueWhite", new Color(0.98f, 0.92f, 0.84f)},
+ {"antiquewhite", new Color(0.98f, 0.92f, 0.84f)},
{"aqua", new Color(0.00f, 1.00f, 1.00f)},
{"aquamarine", new Color(0.50f, 1.00f, 0.83f)},
{"azure", new Color(0.94f, 1.00f, 1.00f)},
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index 399ba8ef5d..ac3aec6c14 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -154,7 +154,7 @@
Return the lesser of the two numbers, also known as their minimum.
</constant>
<constant name="LOGIC_CLAMP" value="46" enum="BuiltinFunc">
- Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to `min(max(input, range_low), range_high)`
+ Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to [code]min(max(input, range_low), range_high)[/code].
</constant>
<constant name="LOGIC_NEAREST_PO2" value="47" enum="BuiltinFunc">
Return the nearest power of 2 to the input.
diff --git a/modules/websocket/emws_client.cpp b/modules/websocket/emws_client.cpp
index 82a577790e..522b810721 100644
--- a/modules/websocket/emws_client.cpp
+++ b/modules/websocket/emws_client.cpp
@@ -205,8 +205,8 @@ int EMWSClient::get_max_packet_size() const {
}
EMWSClient::EMWSClient() {
- _in_buf_size = GLOBAL_GET(WSC_IN_BUF);
- _in_pkt_size = GLOBAL_GET(WSC_IN_PKT);
+ _in_buf_size = nearest_shift((int)GLOBAL_GET(WSC_IN_BUF) - 1) + 10;
+ _in_pkt_size = nearest_shift((int)GLOBAL_GET(WSC_IN_PKT) - 1);
_is_connecting = false;
_peer = Ref<EMWSPeer>(memnew(EMWSPeer));
/* clang-format off */
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index eee3213fe7..81f5cf3318 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1277,7 +1277,7 @@ void GraphEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot")));
ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot")));
- ADD_SIGNAL(MethodInfo("popup_request", PropertyInfo(Variant::VECTOR2, "p_position")));
+ ADD_SIGNAL(MethodInfo("popup_request", PropertyInfo(Variant::VECTOR2, "position")));
ADD_SIGNAL(MethodInfo("duplicate_nodes_request"));
ADD_SIGNAL(MethodInfo("node_selected", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_position")));
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index b1849b7e69..003b30e035 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1108,9 +1108,10 @@ void TextEdit::_notification(int p_what) {
if (cursor.column == last_wrap_column + j && cursor.line == line && cursor_wrap_index == line_wrap_index) {
cursor_pos = Point2i(char_ofs + char_margin + ofs_x, ofs_y);
+ cursor_pos.y += (get_row_height() - cache.font->get_height()) / 2;
if (insert_mode) {
- cursor_pos.y += (get_row_height() - 3);
+ cursor_pos.y += (cache.font->get_height() - 3);
}
int caret_w = (str[j] == '\t') ? cache.font->get_char_size(' ').width : char_w;
@@ -1155,7 +1156,8 @@ void TextEdit::_notification(int p_what) {
#else
caret_w = (block_caret) ? caret_w : 2;
#endif
- VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(cursor_pos, Size2i(caret_w, get_row_height())), cache.caret_color);
+
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(cursor_pos, Size2i(caret_w, cache.font->get_height())), cache.caret_color);
}
}
}
@@ -1198,9 +1200,10 @@ void TextEdit::_notification(int p_what) {
if (cursor.column == last_wrap_column + str.length() && cursor.line == line && cursor_wrap_index == line_wrap_index && (char_ofs + char_margin) >= xmargin_beg) {
cursor_pos = Point2i(char_ofs + char_margin + ofs_x, ofs_y);
+ cursor_pos.y += (get_row_height() - cache.font->get_height()) / 2;
if (insert_mode) {
- cursor_pos.y += (get_row_height() - 3);
+ cursor_pos.y += (cache.font->get_height() - 3);
}
if (ime_text.length() > 0) {
int ofs = 0;
@@ -1245,7 +1248,8 @@ void TextEdit::_notification(int p_what) {
#else
int caret_w = (block_caret) ? char_w : 2;
#endif
- VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(cursor_pos, Size2i(caret_w, get_row_height())), cache.caret_color);
+
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(cursor_pos, Size2i(caret_w, cache.font->get_height())), cache.caret_color);
}
}
}
@@ -1289,7 +1293,7 @@ void TextEdit::_notification(int p_what) {
if (cursor_pos.y + get_row_height() + th > get_size().height) {
completion_rect.position.y = cursor_pos.y - th;
} else {
- completion_rect.position.y = cursor_pos.y + get_row_height() + csb->get_offset().y;
+ completion_rect.position.y = cursor_pos.y + get_row_height() + csb->get_offset().y - cache.font->get_height();
completion_below = true;
}
@@ -1323,7 +1327,8 @@ void TextEdit::_notification(int p_what) {
text_color = color_regions[j].color;
}
}
- draw_string(cache.font, Point2(completion_rect.position.x, completion_rect.position.y + i * get_row_height() + cache.font->get_ascent()), completion_options[l], text_color, completion_rect.size.width);
+ int yofs = (get_row_height() - cache.font->get_height()) / 2;
+ draw_string(cache.font, Point2(completion_rect.position.x, completion_rect.position.y + i * get_row_height() + cache.font->get_ascent() + yofs), completion_options[l], text_color, completion_rect.size.width);
}
if (scrollw) {
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index 587ab73dce..722df01677 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -602,7 +602,7 @@ void BitMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_bit", "position", "bit"), &BitMap::set_bit);
ClassDB::bind_method(D_METHOD("get_bit", "position"), &BitMap::get_bit);
- ClassDB::bind_method(D_METHOD("set_bit_rect", "p_rect", "bit"), &BitMap::set_bit_rect);
+ ClassDB::bind_method(D_METHOD("set_bit_rect", "rect", "bit"), &BitMap::set_bit_rect);
ClassDB::bind_method(D_METHOD("get_true_bit_count"), &BitMap::get_true_bit_count);
ClassDB::bind_method(D_METHOD("get_size"), &BitMap::get_size);
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index a92e4efcd6..acc6774019 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1924,7 +1924,7 @@ void VisualServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("scenario_create"), &VisualServer::scenario_create);
ClassDB::bind_method(D_METHOD("scenario_set_debug", "scenario", "debug_mode"), &VisualServer::scenario_set_debug);
ClassDB::bind_method(D_METHOD("scenario_set_environment", "scenario", "environment"), &VisualServer::scenario_set_environment);
- ClassDB::bind_method(D_METHOD("scenario_set_reflection_atlas_size", "scenario", "p_size", "subdiv"), &VisualServer::scenario_set_reflection_atlas_size);
+ ClassDB::bind_method(D_METHOD("scenario_set_reflection_atlas_size", "scenario", "size", "subdiv"), &VisualServer::scenario_set_reflection_atlas_size);
ClassDB::bind_method(D_METHOD("scenario_set_fallback_environment", "scenario", "environment"), &VisualServer::scenario_set_fallback_environment);
#ifndef _3D_DISABLED