summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/stream_peer.cpp25
-rw-r--r--doc/classes/@GDScript.xml6
-rw-r--r--doc/classes/AABB.xml2
-rw-r--r--doc/classes/Animation.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml2
-rw-r--r--doc/classes/AudioServer.xml2
-rw-r--r--doc/classes/AudioStream.xml2
-rw-r--r--doc/classes/BakedLightmap.xml2
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/CanvasLayer.xml2
-rw-r--r--doc/classes/CollisionShape.xml2
-rw-r--r--doc/classes/CollisionShape2D.xml2
-rw-r--r--doc/classes/Control.xml4
-rw-r--r--doc/classes/DirectionalLight.xml2
-rw-r--r--doc/classes/Directory.xml2
-rw-r--r--doc/classes/EditorPlugin.xml2
-rw-r--r--doc/classes/Environment.xml2
-rw-r--r--doc/classes/File.xml2
-rw-r--r--doc/classes/GIProbe.xml2
-rw-r--r--doc/classes/HTTPClient.xml2
-rw-r--r--doc/classes/HTTPRequest.xml2
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/Light.xml2
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml2
-rw-r--r--doc/classes/Node.xml2
-rw-r--r--doc/classes/Node2D.xml2
-rw-r--r--doc/classes/OmniLight.xml2
-rw-r--r--doc/classes/Physics2DDirectSpaceState.xml2
-rw-r--r--doc/classes/PhysicsBody.xml2
-rw-r--r--doc/classes/PhysicsBody2D.xml2
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml2
-rw-r--r--doc/classes/Plane.xml2
-rw-r--r--doc/classes/Rect2.xml2
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RichTextLabel.xml2
-rw-r--r--doc/classes/RigidBody.xml2
-rw-r--r--doc/classes/SceneTree.xml2
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/Shader.xml2
-rw-r--r--doc/classes/Shape.xml2
-rw-r--r--doc/classes/Shape2D.xml2
-rw-r--r--doc/classes/Spatial.xml2
-rw-r--r--doc/classes/SpatialMaterial.xml2
-rw-r--r--doc/classes/SpotLight.xml2
-rw-r--r--doc/classes/StreamPeer.xml24
-rw-r--r--doc/classes/StreamPeerSSL.xml2
-rw-r--r--doc/classes/TileMap.xml2
-rw-r--r--doc/classes/Transform.xml2
-rw-r--r--doc/classes/Vector2.xml2
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--doc/classes/Viewport.xml2
-rw-r--r--doc/classes/World.xml2
-rw-r--r--doc/classes/World2D.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml2
-rw-r--r--editor/code_editor.cpp150
-rw-r--r--editor/code_editor.h10
-rw-r--r--editor/editor_themes.cpp4
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp10
-rw-r--r--editor/project_manager.cpp6
-rw-r--r--modules/gdnative/gdnative/pool_arrays.cpp56
-rw-r--r--modules/gdnative/gdnative_api.json98
-rw-r--r--modules/gdnative/include/gdnative/pool_arrays.h14
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp41
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.cpp5
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.cpp1
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp49
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.h2
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml2
-rw-r--r--modules/mono/csharp_script.cpp8
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp16
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h1
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml2
-rw-r--r--platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java11
-rw-r--r--scene/gui/scroll_container.cpp4
75 files changed, 436 insertions, 215 deletions
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index fc00c26889..f6c4948fc3 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -375,18 +375,18 @@ void StreamPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_big_endian", "enable"), &StreamPeer::set_big_endian);
ClassDB::bind_method(D_METHOD("is_big_endian_enabled"), &StreamPeer::is_big_endian_enabled);
- ClassDB::bind_method(D_METHOD("put_8", "val"), &StreamPeer::put_8);
- ClassDB::bind_method(D_METHOD("put_u8", "val"), &StreamPeer::put_u8);
- ClassDB::bind_method(D_METHOD("put_16", "val"), &StreamPeer::put_16);
- ClassDB::bind_method(D_METHOD("put_u16", "val"), &StreamPeer::put_u16);
- ClassDB::bind_method(D_METHOD("put_32", "val"), &StreamPeer::put_32);
- ClassDB::bind_method(D_METHOD("put_u32", "val"), &StreamPeer::put_u32);
- ClassDB::bind_method(D_METHOD("put_64", "val"), &StreamPeer::put_64);
- ClassDB::bind_method(D_METHOD("put_u64", "val"), &StreamPeer::put_u64);
- ClassDB::bind_method(D_METHOD("put_float", "val"), &StreamPeer::put_float);
- ClassDB::bind_method(D_METHOD("put_double", "val"), &StreamPeer::put_double);
- ClassDB::bind_method(D_METHOD("put_utf8_string", "val"), &StreamPeer::put_utf8_string);
- ClassDB::bind_method(D_METHOD("put_var", "val"), &StreamPeer::put_var);
+ ClassDB::bind_method(D_METHOD("put_8", "value"), &StreamPeer::put_8);
+ ClassDB::bind_method(D_METHOD("put_u8", "value"), &StreamPeer::put_u8);
+ ClassDB::bind_method(D_METHOD("put_16", "value"), &StreamPeer::put_16);
+ ClassDB::bind_method(D_METHOD("put_u16", "value"), &StreamPeer::put_u16);
+ ClassDB::bind_method(D_METHOD("put_32", "value"), &StreamPeer::put_32);
+ ClassDB::bind_method(D_METHOD("put_u32", "value"), &StreamPeer::put_u32);
+ ClassDB::bind_method(D_METHOD("put_64", "value"), &StreamPeer::put_64);
+ ClassDB::bind_method(D_METHOD("put_u64", "value"), &StreamPeer::put_u64);
+ ClassDB::bind_method(D_METHOD("put_float", "value"), &StreamPeer::put_float);
+ ClassDB::bind_method(D_METHOD("put_double", "value"), &StreamPeer::put_double);
+ ClassDB::bind_method(D_METHOD("put_utf8_string", "value"), &StreamPeer::put_utf8_string);
+ ClassDB::bind_method(D_METHOD("put_var", "value"), &StreamPeer::put_var);
ClassDB::bind_method(D_METHOD("get_8"), &StreamPeer::get_8);
ClassDB::bind_method(D_METHOD("get_u8"), &StreamPeer::get_u8);
@@ -418,7 +418,6 @@ void StreamPeerBuffer::_bind_methods() {
ClassDB::bind_method(D_METHOD("duplicate"), &StreamPeerBuffer::duplicate);
ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "data_array"), "set_data_array", "get_data_array");
-
}
Error StreamPeerBuffer::put_data(const uint8_t *p_data, int p_bytes) {
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 9a8eaf38c4..b9694d0e6d 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -189,7 +189,7 @@
<argument index="2" name="max" type="float">
</argument>
<description>
- Clamps [code]val[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ Clamps [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
[codeblock]
speed = 1000
# a is 20
@@ -466,7 +466,7 @@
</argument>
<argument index="1" name="to" type="float">
</argument>
- <argument index="2" name="value" type="float">
+ <argument index="2" name="weight" type="float">
</argument>
<description>
Returns a normalized value considering the given range.
@@ -592,7 +592,7 @@
<argument index="0" name="value" type="int">
</argument>
<description>
- Returns the nearest larger power of 2 for integer [code]val[/code].
+ Returns the nearest larger power of 2 for integer [code]value[/code].
[codeblock]
nearest_po2(3) # returns 4
nearest_po2(4) # returns 4
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 6ca327b9df..c288e2a0c3 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -7,7 +7,7 @@
AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index e618e69258..104cdb114c 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -8,7 +8,7 @@
Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/animation/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/animation/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 50e4e9ff2b..4baef0a7f0 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -7,7 +7,7 @@
An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/animations.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/animations.html
http://docs.godotengine.org/en/3.0/learning/features/animation/index.html
</tutorials>
<demos>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index c0c7f4b4ea..c078359c11 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -7,7 +7,7 @@
AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/audio/audio_buses.html
+ http://docs.godotengine.org/en/3.0/learning/features/audio/audio_buses.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index b7ec1a017f..7de0cb91f1 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -7,7 +7,7 @@
Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or require more flexibility than a [Sample].
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/audio/audio_streams.html
+ http://docs.godotengine.org/en/3.0/learning/features/audio/audio_streams.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml
index 6a8e10485f..e193b8d89f 100644
--- a/doc/classes/BakedLightmap.xml
+++ b/doc/classes/BakedLightmap.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/baked_lightmaps.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/baked_lightmaps.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 6d5576d958..ed53bc85be 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -11,7 +11,7 @@
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
</tutorials>
<demos>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 1533a29e54..625fa217ca 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -7,7 +7,7 @@
Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [code]CanvasLayer[/code] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [code]CanvasLayer[/code] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
http://docs.godotengine.org/en/3.0/learning/features/2d/canvas_layers.html
</tutorials>
<demos>
diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml
index e2f1d81386..f7215ea09f 100644
--- a/doc/classes/CollisionShape.xml
+++ b/doc/classes/CollisionShape.xml
@@ -7,7 +7,7 @@
Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index 4382bc99db..3bfa29968b 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -7,7 +7,7 @@
Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index b974ecda64..3ce0457755 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -13,8 +13,8 @@
[Theme] resources change the Control's appearance. If you change the [Theme] on a [code]Control[/code] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/gui/index.html
- http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
+ http://docs.godotengine.org/en/3.0/learning/features/gui/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml
index 74fe8e856f..d8db695176 100644
--- a/doc/classes/DirectionalLight.xml
+++ b/doc/classes/DirectionalLight.xml
@@ -7,7 +7,7 @@
A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index bd854dde3c..776db64fe6 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -23,7 +23,7 @@
[/codeblock]
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/filesystem.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/filesystem.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 1f94ef5ddf..6ff6053b77 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -7,7 +7,7 @@
Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/development/plugins/index.html
+ http://docs.godotengine.org/en/3.0/development/plugins/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index f5fd874346..fcd7b17b18 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -12,7 +12,7 @@
- Adjustments
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/environment_and_post_processing.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/environment_and_post_processing.html
http://docs.godotengine.org/en/3.0/learning/features/3d/high_dynamic_range.html
</tutorials>
<demos>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 2491e3b614..f1106f61b7 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -22,7 +22,7 @@
[/codeblock]
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/filesystem.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/filesystem.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index 687974ba0f..487f0113f6 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/gi_probes.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/gi_probes.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index e08b902246..1c07bcf88f 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -10,7 +10,7 @@
For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/networking/http_client_class.html
+ http://docs.godotengine.org/en/3.0/learning/features/networking/http_client_class.html
http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
</tutorials>
<demos>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 02d74aba0b..be65600d81 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -8,7 +8,7 @@
Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
+ http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index bda749fc9d..747c46cced 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -9,7 +9,7 @@
Kinematic Characters: KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/kinematic_character_2d.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/kinematic_character_2d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml
index 073cc34069..e6bf39848c 100644
--- a/doc/classes/Light.xml
+++ b/doc/classes/Light.xml
@@ -7,7 +7,7 @@
Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index 441768d643..5a600319b1 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -7,7 +7,7 @@
Manages the connection to network peers. Assigns unique IDs to each client connected to the server.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/networking/high_level_multiplayer.html
+ http://docs.godotengine.org/en/3.0/learning/features/networking/high_level_multiplayer.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 657c4b443c..e7627e11c5 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -16,7 +16,7 @@
[b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) of the receiving peer. To identify which node receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers).
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/scenes_and_nodes.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/scenes_and_nodes.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 882327db0a..17fcd09384 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -7,7 +7,7 @@
A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/custom_drawing_in_2d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml
index d9f7d2c07e..b3c3ce31e1 100644
--- a/doc/classes/OmniLight.xml
+++ b/doc/classes/OmniLight.xml
@@ -7,7 +7,7 @@
An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light].
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml
index f1086e86e8..08b10da717 100644
--- a/doc/classes/Physics2DDirectSpaceState.xml
+++ b/doc/classes/Physics2DDirectSpaceState.xml
@@ -7,7 +7,7 @@
Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml
index 99b5629eba..078512ccc9 100644
--- a/doc/classes/PhysicsBody.xml
+++ b/doc/classes/PhysicsBody.xml
@@ -7,7 +7,7 @@
PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index c82e404e4f..340422aea6 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -7,7 +7,7 @@
PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
index d02f2261ea..88a567831b 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -7,7 +7,7 @@
Direct access object to a space in the [PhysicsServer]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index c69730ebee..307049e055 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -7,7 +7,7 @@
Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 8301891220..4890c2bc2c 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -7,7 +7,7 @@
Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 0a6f534fe6..50eca9699a 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/reflection_probes.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/reflection_probes.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 70631c6c61..a50d4e0393 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -8,7 +8,7 @@
Note that assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/gui/bbcode_in_richtextlabel.html
+ http://docs.godotengine.org/en/3.0/learning/features/gui/bbcode_in_richtextlabel.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index 247be1d433..ffc5c86074 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -11,7 +11,7 @@
As a warning, don't change RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 28eba6ae8f..f6b8d25488 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/scene_tree.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/scene_tree.html
http://docs.godotengine.org/en/3.0/learning/features/viewports/multiple_resolutions.html
</tutorials>
<demos>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index bbe360cb8c..14570ab611 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -8,7 +8,7 @@
The 'new' method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/step_by_step/scripting.html
+ http://docs.godotengine.org/en/3.0/learning/step_by_step/scripting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 14c47940aa..d39014fa2d 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -7,7 +7,7 @@
To be changed, ignore.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/shading/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/shading/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
index 6cedfd937c..706c66d38e 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape.xml
@@ -7,7 +7,7 @@
Base class for all 3D shape resources. All 3D shapes that inherit from this can be set into a [PhysicsBody] or [Area].
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index c835ab4922..97171fdd2c 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -7,7 +7,7 @@
Base class for all 2D Shapes. All 2D shape types inherit from this.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/physics_introduction.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index f9e53673dc..8529823467 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -9,7 +9,7 @@
Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the Spatial object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the Spatial's transform. The word local below refers to this coordinate system. The coordinate system that is attached to the Spatial object itself is referred to as object-local coordinate system.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/introduction_to_3d.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/introduction_to_3d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
index 617fc10a47..044e6fbd18 100644
--- a/doc/classes/SpatialMaterial.xml
+++ b/doc/classes/SpatialMaterial.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/spatial_material.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/spatial_material.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml
index 58489cae2c..68b2eec3a1 100644
--- a/doc/classes/SpotLight.xml
+++ b/doc/classes/SpotLight.xml
@@ -7,7 +7,7 @@
A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/lights_and_shadows.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index ec11bfc6ee..014f8b8657 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -134,7 +134,7 @@
<method name="put_16">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put a signed 16 bit value into the stream.
@@ -143,7 +143,7 @@
<method name="put_32">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put a signed 32 bit value into the stream.
@@ -152,7 +152,7 @@
<method name="put_64">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put a signed 64 bit value into the stream.
@@ -161,7 +161,7 @@
<method name="put_8">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put a signed byte into the stream.
@@ -179,7 +179,7 @@
<method name="put_double">
<return type="void">
</return>
- <argument index="0" name="val" type="float">
+ <argument index="0" name="value" type="float">
</argument>
<description>
Put a double-precision float into the stream.
@@ -188,7 +188,7 @@
<method name="put_float">
<return type="void">
</return>
- <argument index="0" name="val" type="float">
+ <argument index="0" name="value" type="float">
</argument>
<description>
Put a single-precision float into the stream.
@@ -206,7 +206,7 @@
<method name="put_u16">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put an unsigned 16 bit value into the stream.
@@ -215,7 +215,7 @@
<method name="put_u32">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put an unsigned 32 bit value into the stream.
@@ -224,7 +224,7 @@
<method name="put_u64">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put an unsigned 64 bit value into the stream.
@@ -233,7 +233,7 @@
<method name="put_u8">
<return type="void">
</return>
- <argument index="0" name="val" type="int">
+ <argument index="0" name="value" type="int">
</argument>
<description>
Put an unsigned byte into the stream.
@@ -242,7 +242,7 @@
<method name="put_utf8_string">
<return type="void">
</return>
- <argument index="0" name="val" type="String">
+ <argument index="0" name="value" type="String">
</argument>
<description>
Put a zero-terminated utf8 string into the stream.
@@ -251,7 +251,7 @@
<method name="put_var">
<return type="void">
</return>
- <argument index="0" name="val" type="Variant">
+ <argument index="0" name="value" type="Variant">
</argument>
<description>
Put a Variant into the stream.
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 6503e8ad73..23b7f71595 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -7,7 +7,7 @@
SSL Stream peer. This object can be used to connect to SSL servers.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
+ http://docs.godotengine.org/en/3.0/learning/features/networking/ssl_certificates.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 58630780c8..faecf5664c 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -7,7 +7,7 @@
Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/using_tilemaps.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/using_tilemaps.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index 4d093c8bfc..1cb808532d 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -7,7 +7,7 @@
Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index c7ed45dfce..ac54c2f09c 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -7,7 +7,7 @@
2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index a0c09a752c..dafb215177 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -7,7 +7,7 @@
Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/math/index.html
+ http://docs.godotengine.org/en/3.0/learning/features/math/index.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index ad008a0c97..8bc8913764 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -12,7 +12,7 @@
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
+ http://docs.godotengine.org/en/3.0/learning/features/2d/2d_transforms.html
http://docs.godotengine.org/en/3.0/learning/features/viewports/index.html
</tutorials>
<demos>
diff --git a/doc/classes/World.xml b/doc/classes/World.xml
index 868eed787a..97631b8e0d 100644
--- a/doc/classes/World.xml
+++ b/doc/classes/World.xml
@@ -7,7 +7,7 @@
Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index 7abc9061af..57f91b1fa9 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -7,7 +7,7 @@
Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
+ http://docs.godotengine.org/en/3.0/learning/features/physics/ray-casting.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index 5fee1eb56a..06a24c98d9 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -7,7 +7,7 @@
The [code]WorldEnvironment[/code] node can be added to a scene in order to set default [Environment] variables for the scene. The [code]WorldEnvironment[/code] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [code]WorldEnvironment[/code] may be instanced in a given scene at a time. The [code]WorldEnvironment[/code] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox).
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/environment_and_post_processing.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/environment_and_post_processing.html
</tutorials>
<demos>
</demos>
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 061f6ccc33..70334c2343 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -90,10 +90,13 @@ void FindReplaceBar::_notification(int p_what) {
hide_button->set_normal_texture(get_icon("Close", "EditorIcons"));
hide_button->set_hover_texture(get_icon("Close", "EditorIcons"));
hide_button->set_pressed_texture(get_icon("Close", "EditorIcons"));
-
+ hide_button->set_custom_minimum_size(hide_button->get_normal_texture()->get_size());
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
set_process_unhandled_input(is_visible_in_tree());
+ if (is_visible_in_tree()) {
+ call_deferred("_update_size");
+ }
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
find_prev->set_icon(get_icon("MoveUp", "EditorIcons"));
@@ -101,6 +104,7 @@ void FindReplaceBar::_notification(int p_what) {
hide_button->set_normal_texture(get_icon("Close", "EditorIcons"));
hide_button->set_hover_texture(get_icon("Close", "EditorIcons"));
hide_button->set_pressed_texture(get_icon("Close", "EditorIcons"));
+ hide_button->set_custom_minimum_size(hide_button->get_normal_texture()->get_size());
}
}
@@ -109,7 +113,7 @@ void FindReplaceBar::_unhandled_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
- if (k->is_pressed() && (text_edit->has_focus() || text_vbc->is_a_parent_of(get_focus_owner()))) {
+ if (k->is_pressed() && (text_edit->has_focus() || vbc_lineedit->is_a_parent_of(get_focus_owner()))) {
bool accepted = true;
@@ -182,6 +186,7 @@ void FindReplaceBar::_replace() {
void FindReplaceBar::_replace_all() {
+ text_edit->disconnect("text_changed", this, "_editor_text_changed");
// line as x so it gets priority in comparison, column as y
Point2i orig_cursor(text_edit->cursor_get_line(), text_edit->cursor_get_column());
Point2i prev_match = Point2(-1, -1);
@@ -255,6 +260,8 @@ void FindReplaceBar::_replace_all() {
text_edit->set_v_scroll(vsval);
set_error(vformat(TTR("Replaced %d occurrence(s)."), rc));
+
+ text_edit->call_deferred("connect", "text_changed", this, "_editor_text_changed");
}
void FindReplaceBar::_get_search_from(int &r_line, int &r_col) {
@@ -356,13 +363,13 @@ void FindReplaceBar::_hide_bar() {
text_edit->set_search_text("");
result_line = -1;
result_col = -1;
- replace_hbc->hide();
- replace_options_hbc->hide();
+ set_error("");
hide();
}
void FindReplaceBar::_show_search() {
+ hide(); // to update size correctly
show();
search_text->grab_focus();
@@ -375,21 +382,24 @@ void FindReplaceBar::_show_search() {
search_text->set_cursor_position(search_text->get_text().length());
search_current();
}
+ call_deferred("_update_size");
}
void FindReplaceBar::popup_search() {
- replace_hbc->hide();
- replace_options_hbc->hide();
+ replace_text->hide();
+ hbc_button_replace->hide();
+ hbc_option_replace->hide();
_show_search();
}
void FindReplaceBar::popup_replace() {
- if (!replace_hbc->is_visible_in_tree() || !replace_options_hbc->is_visible_in_tree()) {
+ if (!replace_text->is_visible_in_tree()) {
replace_text->clear();
- replace_hbc->show();
- replace_options_hbc->show();
+ replace_text->show();
+ hbc_button_replace->show();
+ hbc_option_replace->show();
}
selection_only->set_pressed((text_edit->is_selection_active() && text_edit->get_selection_from_line() < text_edit->get_selection_to_line()));
@@ -456,7 +466,7 @@ bool FindReplaceBar::is_selection_only() const {
void FindReplaceBar::set_error(const String &p_label) {
- error_label->set_text(p_label);
+ emit_signal("error", p_label);
}
void FindReplaceBar::set_text_edit(TextEdit *p_text_edit) {
@@ -465,6 +475,11 @@ void FindReplaceBar::set_text_edit(TextEdit *p_text_edit) {
text_edit->connect("text_changed", this, "_editor_text_changed");
}
+void FindReplaceBar::_update_size() {
+
+ container->set_custom_minimum_size(Size2(0, hbc->get_size().height));
+}
+
void FindReplaceBar::_bind_methods() {
ClassDB::bind_method("_unhandled_input", &FindReplaceBar::_unhandled_input);
@@ -480,101 +495,101 @@ void FindReplaceBar::_bind_methods() {
ClassDB::bind_method("_replace_all_pressed", &FindReplaceBar::_replace_all);
ClassDB::bind_method("_search_options_changed", &FindReplaceBar::_search_options_changed);
ClassDB::bind_method("_hide_pressed", &FindReplaceBar::_hide_bar);
+ ClassDB::bind_method("_update_size", &FindReplaceBar::_update_size);
ADD_SIGNAL(MethodInfo("search"));
+ ADD_SIGNAL(MethodInfo("error"));
}
FindReplaceBar::FindReplaceBar() {
+ container = memnew(Control);
+ add_child(container);
+ container->set_clip_contents(true);
+ container->set_h_size_flags(SIZE_EXPAND_FILL);
+
replace_all_mode = false;
preserve_cursor = false;
- text_vbc = memnew(VBoxContainer);
- add_child(text_vbc);
-
- HBoxContainer *search_hbc = memnew(HBoxContainer);
- text_vbc->add_child(search_hbc);
-
+ hbc = memnew(HBoxContainer);
+ container->add_child(hbc);
+ hbc->set_anchor_and_margin(MARGIN_RIGHT, 1, 0);
+
+ vbc_lineedit = memnew(VBoxContainer);
+ hbc->add_child(vbc_lineedit);
+ vbc_lineedit->set_h_size_flags(SIZE_EXPAND_FILL);
+ VBoxContainer *vbc_button = memnew(VBoxContainer);
+ hbc->add_child(vbc_button);
+ VBoxContainer *vbc_option = memnew(VBoxContainer);
+ hbc->add_child(vbc_option);
+
+ HBoxContainer *hbc_button_search = memnew(HBoxContainer);
+ vbc_button->add_child(hbc_button_search);
+ hbc_button_replace = memnew(HBoxContainer);
+ vbc_button->add_child(hbc_button_replace);
+
+ HBoxContainer *hbc_option_search = memnew(HBoxContainer);
+ vbc_option->add_child(hbc_option_search);
+ hbc_option_replace = memnew(HBoxContainer);
+ vbc_option->add_child(hbc_option_replace);
+
+ // search toolbar
search_text = memnew(LineEdit);
- search_hbc->add_child(search_text);
- search_text->set_custom_minimum_size(Size2(200, 0));
+ vbc_lineedit->add_child(search_text);
+ search_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
search_text->connect("text_changed", this, "_search_text_changed");
search_text->connect("text_entered", this, "_search_text_entered");
find_prev = memnew(ToolButton);
- search_hbc->add_child(find_prev);
+ hbc_button_search->add_child(find_prev);
find_prev->set_focus_mode(FOCUS_NONE);
find_prev->connect("pressed", this, "_search_prev");
find_next = memnew(ToolButton);
- search_hbc->add_child(find_next);
+ hbc_button_search->add_child(find_next);
find_next->set_focus_mode(FOCUS_NONE);
find_next->connect("pressed", this, "_search_next");
- replace_hbc = memnew(HBoxContainer);
- text_vbc->add_child(replace_hbc);
- replace_hbc->hide();
-
- replace_text = memnew(LineEdit);
- replace_hbc->add_child(replace_text);
- replace_text->set_custom_minimum_size(Size2(200, 0));
- replace_text->connect("text_entered", this, "_replace_text_entered");
-
- replace = memnew(Button);
- replace_hbc->add_child(replace);
- replace->set_text(TTR("Replace"));
- //replace->set_focus_mode(FOCUS_NONE);
- replace->connect("pressed", this, "_replace_pressed");
-
- replace_all = memnew(Button);
- replace_hbc->add_child(replace_all);
- replace_all->set_text(TTR("Replace All"));
- //replace_all->set_focus_mode(FOCUS_NONE);
- replace_all->connect("pressed", this, "_replace_all_pressed");
-
- Control *spacer_split = memnew(Control);
- spacer_split->set_custom_minimum_size(Size2(0, 1));
- text_vbc->add_child(spacer_split);
-
- VBoxContainer *options_vbc = memnew(VBoxContainer);
- add_child(options_vbc);
- options_vbc->set_h_size_flags(SIZE_EXPAND_FILL);
-
- HBoxContainer *search_options = memnew(HBoxContainer);
- options_vbc->add_child(search_options);
-
case_sensitive = memnew(CheckBox);
- search_options->add_child(case_sensitive);
+ hbc_option_search->add_child(case_sensitive);
case_sensitive->set_text(TTR("Match Case"));
case_sensitive->set_focus_mode(FOCUS_NONE);
case_sensitive->connect("toggled", this, "_search_options_changed");
whole_words = memnew(CheckBox);
- search_options->add_child(whole_words);
+ hbc_option_search->add_child(whole_words);
whole_words->set_text(TTR("Whole Words"));
whole_words->set_focus_mode(FOCUS_NONE);
whole_words->connect("toggled", this, "_search_options_changed");
- error_label = memnew(Label);
- search_options->add_child(error_label);
- error_label->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
-
- search_options->add_spacer();
+ // replace toolbar
+ replace_text = memnew(LineEdit);
+ vbc_lineedit->add_child(replace_text);
+ replace_text->set_custom_minimum_size(Size2(100 * EDSCALE, 0));
+ replace_text->connect("text_entered", this, "_replace_text_entered");
- hide_button = memnew(TextureButton);
- search_options->add_child(hide_button);
- hide_button->set_focus_mode(FOCUS_NONE);
- hide_button->connect("pressed", this, "_hide_pressed");
+ replace = memnew(Button);
+ hbc_button_replace->add_child(replace);
+ replace->set_text(TTR("Replace"));
+ replace->connect("pressed", this, "_replace_pressed");
- replace_options_hbc = memnew(HBoxContainer);
- options_vbc->add_child(replace_options_hbc);
- replace_options_hbc->hide();
+ replace_all = memnew(Button);
+ hbc_button_replace->add_child(replace_all);
+ replace_all->set_text(TTR("Replace All"));
+ replace_all->connect("pressed", this, "_replace_all_pressed");
selection_only = memnew(CheckBox);
- replace_options_hbc->add_child(selection_only);
+ hbc_option_replace->add_child(selection_only);
selection_only->set_text(TTR("Selection Only"));
selection_only->set_focus_mode(FOCUS_NONE);
selection_only->connect("toggled", this, "_search_options_changed");
+
+ hide_button = memnew(TextureButton);
+ add_child(hide_button);
+ hide_button->set_focus_mode(FOCUS_NONE);
+ hide_button->connect("pressed", this, "_hide_pressed");
+ hide_button->set_expand(true);
+ hide_button->set_stretch_mode(TextureButton::STRETCH_KEEP_CENTERED);
}
/*** CODE EDITOR ****/
@@ -859,6 +874,7 @@ CodeTextEditor::CodeTextEditor() {
error->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
error->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
error->set_h_size_flags(SIZE_EXPAND_FILL); //required for it to display, given now it's clipping contents, do not touch
+ find_replace_bar->connect("error", error, "set_text");
status_bar->add_child(memnew(Label)); //to keep the height if the other labels are not visible
diff --git a/editor/code_editor.h b/editor/code_editor.h
index 2e6340acc0..db2e25b922 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -63,12 +63,12 @@ class FindReplaceBar : public HBoxContainer {
GDCLASS(FindReplaceBar, HBoxContainer);
+ Control *container;
LineEdit *search_text;
ToolButton *find_prev;
ToolButton *find_next;
CheckBox *case_sensitive;
CheckBox *whole_words;
- Label *error_label;
TextureButton *hide_button;
LineEdit *replace_text;
@@ -76,9 +76,10 @@ class FindReplaceBar : public HBoxContainer {
Button *replace_all;
CheckBox *selection_only;
- VBoxContainer *text_vbc;
- HBoxContainer *replace_hbc;
- HBoxContainer *replace_options_hbc;
+ HBoxContainer *hbc;
+ VBoxContainer *vbc_lineedit;
+ HBoxContainer *hbc_button_replace;
+ HBoxContainer *hbc_option_replace;
TextEdit *text_edit;
@@ -98,6 +99,7 @@ class FindReplaceBar : public HBoxContainer {
void _search_text_changed(const String &p_text);
void _search_text_entered(const String &p_text);
void _replace_text_entered(const String &p_text);
+ void _update_size();
protected:
void _notification(int p_what);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 9f031b5a80..9125f5f670 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -193,6 +193,10 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
exceptions.push_back("ZoomReset");
exceptions.push_back("LockViewport");
exceptions.push_back("GroupViewport");
+ exceptions.push_back("StatusError");
+ exceptions.push_back("StatusSuccess");
+ exceptions.push_back("StatusWarning");
+ exceptions.push_back("NodeWarning");
clock_t begin_time = clock();
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index f47f9e55bb..1dedf92452 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -1235,14 +1235,14 @@ void AutotileEditor::draw_highlight_tile(Vector2 coord, const Vector<Vector2> &o
workspace->draw_rect(Rect2(0, coord.y, coord.x, size.y), Color(0.5, 0.5, 0.5, 0.5));
workspace->draw_rect(Rect2(coord.x + size.x, coord.y, region.size.x - coord.x - size.x, size.y), Color(0.5, 0.5, 0.5, 0.5));
workspace->draw_rect(Rect2(0, coord.y + size.y, region.size.x, region.size.y - size.y - coord.y), Color(0.5, 0.5, 0.5, 0.5));
- coord += Vector2(1, 1);
- workspace->draw_rect(Rect2(coord, size - Vector2(2, 2)), Color(1, 0, 0), false);
+ coord += Vector2(1, 1) / workspace->get_scale().x;
+ workspace->draw_rect(Rect2(coord, size - Vector2(2, 2) / workspace->get_scale().x), Color(1, 0, 0), false);
for (int i = 0; i < other_highlighted.size(); i++) {
coord = other_highlighted[i];
coord.x *= (size.x + spacing);
coord.y *= (size.y + spacing);
- coord += Vector2(1, 1);
- workspace->draw_rect(Rect2(coord, size - Vector2(2, 2)), Color(1, 0, 0), false);
+ coord += Vector2(1, 1) / workspace->get_scale().x;
+ workspace->draw_rect(Rect2(coord, size - Vector2(2, 2) / workspace->get_scale().x), Color(1, 0, 0), false);
}
}
@@ -1251,8 +1251,6 @@ void AutotileEditor::draw_grid_snap() {
Color grid_color = Color(0.39, 0, 1, 0.2f);
Size2 s = workspace->get_size();
- Vector2 size = tile_set->autotile_get_size(get_current_tile());
-
int width_count = (int)(s.width / (snap_step.x + snap_separation.x));
int height_count = (int)(s.height / (snap_step.y + snap_separation.y));
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 1761e9f387..33b538fd48 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -169,10 +169,10 @@ private:
if (!is_empty) {
- set_message(TTR("Your project will be created in a non empty folder (you might want to create a new folder)."), MESSAGE_WARNING);
+ set_message(TTR("Please choose an empty folder."), MESSAGE_ERROR);
memdelete(d);
- get_ok()->set_disabled(false);
- return valid_path;
+ get_ok()->set_disabled(true);
+ return "";
}
} else if (d->file_exists("project.godot")) {
diff --git a/modules/gdnative/gdnative/pool_arrays.cpp b/modules/gdnative/gdnative/pool_arrays.cpp
index 6e014905a3..6688be1a0d 100644
--- a/modules/gdnative/gdnative/pool_arrays.cpp
+++ b/modules/gdnative/gdnative/pool_arrays.cpp
@@ -700,6 +700,10 @@ void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self) {
// read accessor functions
//
+godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read_access_copy(const godot_pool_byte_array_read_access *p_other) {
+ PoolVector<uint8_t>::Read *other = (PoolVector<uint8_t>::Read *)p_other;
+ return (godot_pool_byte_array_read_access *)memnew(PoolVector<uint8_t>::Read(*other));
+}
const uint8_t GDAPI *godot_pool_byte_array_read_access_ptr(const godot_pool_byte_array_read_access *p_read) {
const PoolVector<uint8_t>::Read *read = (const PoolVector<uint8_t>::Read *)p_read;
return read->ptr();
@@ -713,6 +717,10 @@ void GDAPI godot_pool_byte_array_read_access_destroy(godot_pool_byte_array_read_
memdelete((PoolVector<uint8_t>::Read *)p_read);
}
+godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read_access_copy(const godot_pool_int_array_read_access *p_other) {
+ PoolVector<godot_int>::Read *other = (PoolVector<godot_int>::Read *)p_other;
+ return (godot_pool_int_array_read_access *)memnew(PoolVector<godot_int>::Read(*other));
+}
const godot_int GDAPI *godot_pool_int_array_read_access_ptr(const godot_pool_int_array_read_access *p_read) {
const PoolVector<godot_int>::Read *read = (const PoolVector<godot_int>::Read *)p_read;
return read->ptr();
@@ -726,6 +734,10 @@ void GDAPI godot_pool_int_array_read_access_destroy(godot_pool_int_array_read_ac
memdelete((PoolVector<godot_int>::Read *)p_read);
}
+godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read_access_copy(const godot_pool_real_array_read_access *p_other) {
+ PoolVector<godot_real>::Read *other = (PoolVector<godot_real>::Read *)p_other;
+ return (godot_pool_real_array_read_access *)memnew(PoolVector<godot_real>::Read(*other));
+}
const godot_real GDAPI *godot_pool_real_array_read_access_ptr(const godot_pool_real_array_read_access *p_read) {
const PoolVector<godot_real>::Read *read = (const PoolVector<godot_real>::Read *)p_read;
return read->ptr();
@@ -739,6 +751,10 @@ void GDAPI godot_pool_real_array_read_access_destroy(godot_pool_real_array_read_
memdelete((PoolVector<godot_real>::Read *)p_read);
}
+godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read_access_copy(const godot_pool_string_array_read_access *p_other) {
+ PoolVector<String>::Read *other = (PoolVector<String>::Read *)p_other;
+ return (godot_pool_string_array_read_access *)memnew(PoolVector<String>::Read(*other));
+}
const godot_string GDAPI *godot_pool_string_array_read_access_ptr(const godot_pool_string_array_read_access *p_read) {
const PoolVector<String>::Read *read = (const PoolVector<String>::Read *)p_read;
return (const godot_string *)read->ptr();
@@ -752,6 +768,10 @@ void GDAPI godot_pool_string_array_read_access_destroy(godot_pool_string_array_r
memdelete((PoolVector<String>::Read *)p_read);
}
+godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read_access_copy(const godot_pool_vector2_array_read_access *p_other) {
+ PoolVector<Vector2>::Read *other = (PoolVector<Vector2>::Read *)p_other;
+ return (godot_pool_vector2_array_read_access *)memnew(PoolVector<Vector2>::Read(*other));
+}
const godot_vector2 GDAPI *godot_pool_vector2_array_read_access_ptr(const godot_pool_vector2_array_read_access *p_read) {
const PoolVector<Vector2>::Read *read = (const PoolVector<Vector2>::Read *)p_read;
return (const godot_vector2 *)read->ptr();
@@ -765,6 +785,10 @@ void GDAPI godot_pool_vector2_array_read_access_destroy(godot_pool_vector2_array
memdelete((PoolVector<Vector2>::Read *)p_read);
}
+godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read_access_copy(const godot_pool_vector3_array_read_access *p_other) {
+ PoolVector<Vector3>::Read *other = (PoolVector<Vector3>::Read *)p_other;
+ return (godot_pool_vector3_array_read_access *)memnew(PoolVector<Vector3>::Read(*other));
+}
const godot_vector3 GDAPI *godot_pool_vector3_array_read_access_ptr(const godot_pool_vector3_array_read_access *p_read) {
const PoolVector<Vector3>::Read *read = (const PoolVector<Vector3>::Read *)p_read;
return (const godot_vector3 *)read->ptr();
@@ -778,6 +802,10 @@ void GDAPI godot_pool_vector3_array_read_access_destroy(godot_pool_vector3_array
memdelete((PoolVector<Vector2>::Read *)p_read);
}
+godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read_access_copy(const godot_pool_color_array_read_access *p_other) {
+ PoolVector<Color>::Read *other = (PoolVector<Color>::Read *)p_other;
+ return (godot_pool_color_array_read_access *)memnew(PoolVector<Color>::Read(*other));
+}
const godot_color GDAPI *godot_pool_color_array_read_access_ptr(const godot_pool_color_array_read_access *p_read) {
const PoolVector<Color>::Read *read = (const PoolVector<Color>::Read *)p_read;
return (const godot_color *)read->ptr();
@@ -795,6 +823,10 @@ void GDAPI godot_pool_color_array_read_access_destroy(godot_pool_color_array_rea
// write accessor functions
//
+godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write_access_copy(const godot_pool_byte_array_write_access *p_other) {
+ PoolVector<uint8_t>::Write *other = (PoolVector<uint8_t>::Write *)p_other;
+ return (godot_pool_byte_array_write_access *)memnew(PoolVector<uint8_t>::Write(*other));
+}
uint8_t GDAPI *godot_pool_byte_array_write_access_ptr(const godot_pool_byte_array_write_access *p_write) {
PoolVector<uint8_t>::Write *write = (PoolVector<uint8_t>::Write *)p_write;
return write->ptr();
@@ -808,6 +840,10 @@ void GDAPI godot_pool_byte_array_write_access_destroy(godot_pool_byte_array_writ
memdelete((PoolVector<uint8_t>::Write *)p_write);
}
+godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write_access_copy(const godot_pool_int_array_write_access *p_other) {
+ PoolVector<godot_int>::Write *other = (PoolVector<godot_int>::Write *)p_other;
+ return (godot_pool_int_array_write_access *)memnew(PoolVector<godot_int>::Write(*other));
+}
godot_int GDAPI *godot_pool_int_array_write_access_ptr(const godot_pool_int_array_write_access *p_write) {
PoolVector<godot_int>::Write *write = (PoolVector<godot_int>::Write *)p_write;
return write->ptr();
@@ -821,6 +857,10 @@ void GDAPI godot_pool_int_array_write_access_destroy(godot_pool_int_array_write_
memdelete((PoolVector<godot_int>::Write *)p_write);
}
+godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write_access_copy(const godot_pool_real_array_write_access *p_other) {
+ PoolVector<godot_real>::Write *other = (PoolVector<godot_real>::Write *)p_other;
+ return (godot_pool_real_array_write_access *)memnew(PoolVector<godot_real>::Write(*other));
+}
godot_real GDAPI *godot_pool_real_array_write_access_ptr(const godot_pool_real_array_write_access *p_write) {
PoolVector<godot_real>::Write *write = (PoolVector<godot_real>::Write *)p_write;
return write->ptr();
@@ -834,6 +874,10 @@ void GDAPI godot_pool_real_array_write_access_destroy(godot_pool_real_array_writ
memdelete((PoolVector<godot_real>::Write *)p_write);
}
+godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write_access_copy(const godot_pool_string_array_write_access *p_other) {
+ PoolVector<String>::Write *other = (PoolVector<String>::Write *)p_other;
+ return (godot_pool_string_array_write_access *)memnew(PoolVector<String>::Write(*other));
+}
godot_string GDAPI *godot_pool_string_array_write_access_ptr(const godot_pool_string_array_write_access *p_write) {
PoolVector<String>::Write *write = (PoolVector<String>::Write *)p_write;
return (godot_string *)write->ptr();
@@ -847,6 +891,10 @@ void GDAPI godot_pool_string_array_write_access_destroy(godot_pool_string_array_
memdelete((PoolVector<String>::Write *)p_write);
}
+godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write_access_copy(const godot_pool_vector2_array_write_access *p_other) {
+ PoolVector<Vector2>::Write *other = (PoolVector<Vector2>::Write *)p_other;
+ return (godot_pool_vector2_array_write_access *)memnew(PoolVector<Vector2>::Write(*other));
+}
godot_vector2 GDAPI *godot_pool_vector2_array_write_access_ptr(const godot_pool_vector2_array_write_access *p_write) {
PoolVector<Vector2>::Write *write = (PoolVector<Vector2>::Write *)p_write;
return (godot_vector2 *)write->ptr();
@@ -860,6 +908,10 @@ void GDAPI godot_pool_vector2_array_write_access_destroy(godot_pool_vector2_arra
memdelete((PoolVector<Vector2>::Write *)p_write);
}
+godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write_access_copy(const godot_pool_vector3_array_write_access *p_other) {
+ PoolVector<Vector3>::Write *other = (PoolVector<Vector3>::Write *)p_other;
+ return (godot_pool_vector3_array_write_access *)memnew(PoolVector<Vector3>::Write(*other));
+}
godot_vector3 GDAPI *godot_pool_vector3_array_write_access_ptr(const godot_pool_vector3_array_write_access *p_write) {
PoolVector<Vector3>::Write *write = (PoolVector<Vector3>::Write *)p_write;
return (godot_vector3 *)write->ptr();
@@ -873,6 +925,10 @@ void GDAPI godot_pool_vector3_array_write_access_destroy(godot_pool_vector3_arra
memdelete((PoolVector<Vector3>::Write *)p_write);
}
+godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write_access_copy(const godot_pool_color_array_write_access *p_other) {
+ PoolVector<Color>::Write *other = (PoolVector<Color>::Write *)p_other;
+ return (godot_pool_color_array_write_access *)memnew(PoolVector<Color>::Write(*other));
+}
godot_color GDAPI *godot_pool_color_array_write_access_ptr(const godot_pool_color_array_write_access *p_write) {
PoolVector<Color>::Write *write = (PoolVector<Color>::Write *)p_write;
return (godot_color *)write->ptr();
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 6e3cf16758..59a9c0b090 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -2090,6 +2090,13 @@
]
},
{
+ "name": "godot_pool_byte_array_read_access_copy",
+ "return_type": "godot_pool_byte_array_read_access *",
+ "arguments": [
+ ["const godot_pool_byte_array_read_access *", "p_read"]
+ ]
+ },
+ {
"name": "godot_pool_byte_array_read_access_ptr",
"return_type": "const uint8_t *",
"arguments": [
@@ -2112,6 +2119,13 @@
]
},
{
+ "name": "godot_pool_int_array_read_access_copy",
+ "return_type": "godot_pool_int_array_read_access *",
+ "arguments": [
+ ["const godot_pool_int_array_read_access *", "p_read"]
+ ]
+ },
+ {
"name": "godot_pool_int_array_read_access_ptr",
"return_type": "const godot_int *",
"arguments": [
@@ -2134,6 +2148,13 @@
]
},
{
+ "name": "godot_pool_real_array_read_access_copy",
+ "return_type": "godot_pool_real_array_read_access *",
+ "arguments": [
+ ["const godot_pool_real_array_read_access *", "p_read"]
+ ]
+ },
+ {
"name": "godot_pool_real_array_read_access_ptr",
"return_type": "const godot_real *",
"arguments": [
@@ -2156,6 +2177,13 @@
]
},
{
+ "name": "godot_pool_string_array_read_access_copy",
+ "return_type": "godot_pool_string_array_read_access *",
+ "arguments": [
+ ["const godot_pool_string_array_read_access *", "p_read"]
+ ]
+ },
+ {
"name": "godot_pool_string_array_read_access_ptr",
"return_type": "const godot_string *",
"arguments": [
@@ -2178,6 +2206,13 @@
]
},
{
+ "name": "godot_pool_vector2_array_read_access_copy",
+ "return_type": "godot_pool_vector2_array_read_access *",
+ "arguments": [
+ ["const godot_pool_vector2_array_read_access *", "p_read"]
+ ]
+ },
+ {
"name": "godot_pool_vector2_array_read_access_ptr",
"return_type": "const godot_vector2 *",
"arguments": [
@@ -2200,6 +2235,13 @@
]
},
{
+ "name": "godot_pool_vector3_array_read_access_copy",
+ "return_type": "godot_pool_vector3_array_read_access *",
+ "arguments": [
+ ["const godot_pool_vector3_array_read_access *", "p_read"]
+ ]
+ },
+ {
"name": "godot_pool_vector3_array_read_access_ptr",
"return_type": "const godot_vector3 *",
"arguments": [
@@ -2222,6 +2264,13 @@
]
},
{
+ "name": "godot_pool_color_array_read_access_copy",
+ "return_type": "godot_pool_color_array_read_access *",
+ "arguments": [
+ ["const godot_pool_color_array_read_access *", "p_read"]
+ ]
+ },
+ {
"name": "godot_pool_color_array_read_access_ptr",
"return_type": "const godot_color *",
"arguments": [
@@ -2244,6 +2293,13 @@
]
},
{
+ "name": "godot_pool_byte_array_write_access_copy",
+ "return_type": "godot_pool_byte_array_write_access *",
+ "arguments": [
+ ["const godot_pool_byte_array_write_access *", "p_write"]
+ ]
+ },
+ {
"name": "godot_pool_byte_array_write_access_ptr",
"return_type": "uint8_t *",
"arguments": [
@@ -2266,6 +2322,13 @@
]
},
{
+ "name": "godot_pool_int_array_write_access_copy",
+ "return_type": "godot_pool_int_array_write_access *",
+ "arguments": [
+ ["const godot_pool_int_array_write_access *", "p_write"]
+ ]
+ },
+ {
"name": "godot_pool_int_array_write_access_ptr",
"return_type": "godot_int *",
"arguments": [
@@ -2288,6 +2351,13 @@
]
},
{
+ "name": "godot_pool_real_array_write_access_copy",
+ "return_type": "godot_pool_real_array_write_access *",
+ "arguments": [
+ ["const godot_pool_real_array_write_access *", "p_write"]
+ ]
+ },
+ {
"name": "godot_pool_real_array_write_access_ptr",
"return_type": "godot_real *",
"arguments": [
@@ -2310,6 +2380,13 @@
]
},
{
+ "name": "godot_pool_string_array_write_access_copy",
+ "return_type": "godot_pool_string_array_write_access *",
+ "arguments": [
+ ["const godot_pool_string_array_write_access *", "p_write"]
+ ]
+ },
+ {
"name": "godot_pool_string_array_write_access_ptr",
"return_type": "godot_string *",
"arguments": [
@@ -2332,6 +2409,13 @@
]
},
{
+ "name": "godot_pool_vector2_array_write_access_copy",
+ "return_type": "godot_pool_vector2_array_write_access *",
+ "arguments": [
+ ["const godot_pool_vector2_array_write_access *", "p_write"]
+ ]
+ },
+ {
"name": "godot_pool_vector2_array_write_access_ptr",
"return_type": "godot_vector2 *",
"arguments": [
@@ -2354,6 +2438,13 @@
]
},
{
+ "name": "godot_pool_vector3_array_write_access_copy",
+ "return_type": "godot_pool_vector3_array_write_access *",
+ "arguments": [
+ ["const godot_pool_vector3_array_write_access *", "p_write"]
+ ]
+ },
+ {
"name": "godot_pool_vector3_array_write_access_ptr",
"return_type": "godot_vector3 *",
"arguments": [
@@ -2376,6 +2467,13 @@
]
},
{
+ "name": "godot_pool_color_array_write_access_copy",
+ "return_type": "godot_pool_color_array_write_access *",
+ "arguments": [
+ ["const godot_pool_color_array_write_access *", "p_write"]
+ ]
+ },
+ {
"name": "godot_pool_color_array_write_access_ptr",
"return_type": "godot_color *",
"arguments": [
diff --git a/modules/gdnative/include/gdnative/pool_arrays.h b/modules/gdnative/include/gdnative/pool_arrays.h
index 69a93725a8..1210039e34 100644
--- a/modules/gdnative/include/gdnative/pool_arrays.h
+++ b/modules/gdnative/include/gdnative/pool_arrays.h
@@ -383,30 +383,37 @@ void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_self);
// read accessor functions
//
+godot_pool_byte_array_read_access GDAPI *godot_pool_byte_array_read_access_copy(const godot_pool_byte_array_read_access *p_other);
const uint8_t GDAPI *godot_pool_byte_array_read_access_ptr(const godot_pool_byte_array_read_access *p_read);
void GDAPI godot_pool_byte_array_read_access_operator_assign(godot_pool_byte_array_read_access *p_read, godot_pool_byte_array_read_access *p_other);
void GDAPI godot_pool_byte_array_read_access_destroy(godot_pool_byte_array_read_access *p_read);
+godot_pool_int_array_read_access GDAPI *godot_pool_int_array_read_access_copy(const godot_pool_int_array_read_access *p_other);
const godot_int GDAPI *godot_pool_int_array_read_access_ptr(const godot_pool_int_array_read_access *p_read);
void GDAPI godot_pool_int_array_read_access_operator_assign(godot_pool_int_array_read_access *p_read, godot_pool_int_array_read_access *p_other);
void GDAPI godot_pool_int_array_read_access_destroy(godot_pool_int_array_read_access *p_read);
+godot_pool_real_array_read_access GDAPI *godot_pool_real_array_read_access_copy(const godot_pool_real_array_read_access *p_other);
const godot_real GDAPI *godot_pool_real_array_read_access_ptr(const godot_pool_real_array_read_access *p_read);
void GDAPI godot_pool_real_array_read_access_operator_assign(godot_pool_real_array_read_access *p_read, godot_pool_real_array_read_access *p_other);
void GDAPI godot_pool_real_array_read_access_destroy(godot_pool_real_array_read_access *p_read);
+godot_pool_string_array_read_access GDAPI *godot_pool_string_array_read_access_copy(const godot_pool_string_array_read_access *p_other);
const godot_string GDAPI *godot_pool_string_array_read_access_ptr(const godot_pool_string_array_read_access *p_read);
void GDAPI godot_pool_string_array_read_access_operator_assign(godot_pool_string_array_read_access *p_read, godot_pool_string_array_read_access *p_other);
void GDAPI godot_pool_string_array_read_access_destroy(godot_pool_string_array_read_access *p_read);
+godot_pool_vector2_array_read_access GDAPI *godot_pool_vector2_array_read_access_copy(const godot_pool_vector2_array_read_access *p_other);
const godot_vector2 GDAPI *godot_pool_vector2_array_read_access_ptr(const godot_pool_vector2_array_read_access *p_read);
void GDAPI godot_pool_vector2_array_read_access_operator_assign(godot_pool_vector2_array_read_access *p_read, godot_pool_vector2_array_read_access *p_other);
void GDAPI godot_pool_vector2_array_read_access_destroy(godot_pool_vector2_array_read_access *p_read);
+godot_pool_vector3_array_read_access GDAPI *godot_pool_vector3_array_read_access_copy(const godot_pool_vector3_array_read_access *p_other);
const godot_vector3 GDAPI *godot_pool_vector3_array_read_access_ptr(const godot_pool_vector3_array_read_access *p_read);
void GDAPI godot_pool_vector3_array_read_access_operator_assign(godot_pool_vector3_array_read_access *p_read, godot_pool_vector3_array_read_access *p_other);
void GDAPI godot_pool_vector3_array_read_access_destroy(godot_pool_vector3_array_read_access *p_read);
+godot_pool_color_array_read_access GDAPI *godot_pool_color_array_read_access_copy(const godot_pool_color_array_read_access *p_other);
const godot_color GDAPI *godot_pool_color_array_read_access_ptr(const godot_pool_color_array_read_access *p_read);
void GDAPI godot_pool_color_array_read_access_operator_assign(godot_pool_color_array_read_access *p_read, godot_pool_color_array_read_access *p_other);
void GDAPI godot_pool_color_array_read_access_destroy(godot_pool_color_array_read_access *p_read);
@@ -415,30 +422,37 @@ void GDAPI godot_pool_color_array_read_access_destroy(godot_pool_color_array_rea
// write accessor functions
//
+godot_pool_byte_array_write_access GDAPI *godot_pool_byte_array_write_access_copy(const godot_pool_byte_array_write_access *p_other);
uint8_t GDAPI *godot_pool_byte_array_write_access_ptr(const godot_pool_byte_array_write_access *p_write);
void GDAPI godot_pool_byte_array_write_access_operator_assign(godot_pool_byte_array_write_access *p_write, godot_pool_byte_array_write_access *p_other);
void GDAPI godot_pool_byte_array_write_access_destroy(godot_pool_byte_array_write_access *p_write);
+godot_pool_int_array_write_access GDAPI *godot_pool_int_array_write_access_copy(const godot_pool_int_array_write_access *p_other);
godot_int GDAPI *godot_pool_int_array_write_access_ptr(const godot_pool_int_array_write_access *p_write);
void GDAPI godot_pool_int_array_write_access_operator_assign(godot_pool_int_array_write_access *p_write, godot_pool_int_array_write_access *p_other);
void GDAPI godot_pool_int_array_write_access_destroy(godot_pool_int_array_write_access *p_write);
+godot_pool_real_array_write_access GDAPI *godot_pool_real_array_write_access_copy(const godot_pool_real_array_write_access *p_other);
godot_real GDAPI *godot_pool_real_array_write_access_ptr(const godot_pool_real_array_write_access *p_write);
void GDAPI godot_pool_real_array_write_access_operator_assign(godot_pool_real_array_write_access *p_write, godot_pool_real_array_write_access *p_other);
void GDAPI godot_pool_real_array_write_access_destroy(godot_pool_real_array_write_access *p_write);
+godot_pool_string_array_write_access GDAPI *godot_pool_string_array_write_access_copy(const godot_pool_string_array_write_access *p_other);
godot_string GDAPI *godot_pool_string_array_write_access_ptr(const godot_pool_string_array_write_access *p_write);
void GDAPI godot_pool_string_array_write_access_operator_assign(godot_pool_string_array_write_access *p_write, godot_pool_string_array_write_access *p_other);
void GDAPI godot_pool_string_array_write_access_destroy(godot_pool_string_array_write_access *p_write);
+godot_pool_vector2_array_write_access GDAPI *godot_pool_vector2_array_write_access_copy(const godot_pool_vector2_array_write_access *p_other);
godot_vector2 GDAPI *godot_pool_vector2_array_write_access_ptr(const godot_pool_vector2_array_write_access *p_write);
void GDAPI godot_pool_vector2_array_write_access_operator_assign(godot_pool_vector2_array_write_access *p_write, godot_pool_vector2_array_write_access *p_other);
void GDAPI godot_pool_vector2_array_write_access_destroy(godot_pool_vector2_array_write_access *p_write);
+godot_pool_vector3_array_write_access GDAPI *godot_pool_vector3_array_write_access_copy(const godot_pool_vector3_array_write_access *p_other);
godot_vector3 GDAPI *godot_pool_vector3_array_write_access_ptr(const godot_pool_vector3_array_write_access *p_write);
void GDAPI godot_pool_vector3_array_write_access_operator_assign(godot_pool_vector3_array_write_access *p_write, godot_pool_vector3_array_write_access *p_other);
void GDAPI godot_pool_vector3_array_write_access_destroy(godot_pool_vector3_array_write_access *p_write);
+godot_pool_color_array_write_access GDAPI *godot_pool_color_array_write_access_copy(const godot_pool_color_array_write_access *p_other);
godot_color GDAPI *godot_pool_color_array_write_access_ptr(const godot_pool_color_array_write_access *p_write);
void GDAPI godot_pool_color_array_write_access_operator_assign(godot_pool_color_array_write_access *p_write, godot_pool_color_array_write_access *p_other);
void GDAPI godot_pool_color_array_write_access_destroy(godot_pool_color_array_write_access *p_write);
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index cff5d9c9bd..2216be0257 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -798,11 +798,33 @@ NativeScriptLanguage *NativeScriptLanguage::singleton;
void NativeScriptLanguage::_unload_stuff(bool p_reload) {
for (Map<String, Map<StringName, NativeScriptDesc> >::Element *L = library_classes.front(); L; L = L->next()) {
- if (p_reload && library_gdnatives[L->key()].is_valid() && !library_gdnatives[L->key()]->get_library()->is_reloadable()) {
- continue;
+ String lib_path = L->key();
+ Map<StringName, NativeScriptDesc> classes = L->get();
+
+ if (p_reload) {
+
+ Map<String, Ref<GDNative> >::Element *E = library_gdnatives.find(lib_path);
+ Ref<GDNative> gdn;
+
+ if (E) {
+ gdn = E->get();
+ }
+
+ bool should_reload = false;
+
+ if (gdn.is_valid()) {
+ Ref<GDNativeLibrary> lib = gdn->get_library();
+ if (lib.is_valid()) {
+ should_reload = lib->is_reloadable();
+ }
+ }
+
+ if (!should_reload) {
+ continue;
+ }
}
- for (Map<StringName, NativeScriptDesc>::Element *C = L->get().front(); C; C = C->next()) {
+ for (Map<StringName, NativeScriptDesc>::Element *C = classes.front(); C; C = C->next()) {
// free property stuff first
for (OrderedHashMap<StringName, NativeScriptDesc::Property>::Element P = C->get().properties.front(); P; P = P.next()) {
@@ -1063,6 +1085,11 @@ void NativeScriptLanguage::unregister_script(NativeScript *script) {
void NativeScriptLanguage::call_libraries_cb(const StringName &name) {
// library_gdnatives is modified only from the main thread, so it's safe not to use mutex here
for (Map<String, Ref<GDNative> >::Element *L = library_gdnatives.front(); L; L = L->next()) {
+
+ if (L->get().is_null()) {
+ continue;
+ }
+
if (L->get()->is_initialized()) {
void *proc_ptr;
@@ -1125,6 +1152,10 @@ void NativeReloadNode::_notification(int p_what) {
Ref<GDNative> gdn = L->get();
+ if (gdn.is_null()) {
+ continue;
+ }
+
if (!gdn->get_library()->is_reloadable()) {
continue;
}
@@ -1149,6 +1180,10 @@ void NativeReloadNode::_notification(int p_what) {
Ref<GDNative> gdn = L->get();
+ if (gdn.is_null()) {
+ continue;
+ }
+
if (!gdn->get_library()->is_reloadable()) {
continue;
}
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp
index 52d112bc93..931ab0bfe4 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp
@@ -84,8 +84,9 @@ Variant PluginScriptInstance::call(const StringName &p_method, const Variant **p
godot_variant ret = _desc->call_method(
_data, (godot_string_name *)&p_method, (const godot_variant **)p_args,
p_argcount, (godot_variant_call_error *)&r_error);
- Variant *var_ret = (Variant *)&ret;
- return *var_ret;
+ Variant var_ret = *(Variant *)&ret;
+ godot_variant_destroy(&ret);
+ return var_ret;
}
#if 0 // TODO: Don't rely on default implementations provided by ScriptInstance ?
diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp
index 8101ebc6f3..8018178bd5 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_language.cpp
@@ -103,6 +103,7 @@ Ref<Script> PluginScriptLanguage::get_template(const String &p_class_name, const
if (_desc.get_template_source_code) {
godot_string src = _desc.get_template_source_code(_data, (godot_string *)&p_class_name, (godot_string *)&p_base_class_name);
script->set_source_code(*(String *)&src);
+ godot_string_destroy(&src);
}
return script;
}
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index b4525ff8aa..8290582b9b 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_script.cpp
@@ -131,13 +131,10 @@ ScriptInstance *PluginScript::instance_create(Object *p_this) {
#endif
}
- PluginScript *top = this;
- // TODO: can be optimized by storing a PluginScript::_base_parent direct pointer
- while (top->_ref_base_parent.is_valid())
- top = top->_ref_base_parent.ptr();
- if (top->_native_parent) {
- if (!ClassDB::is_parent_class(p_this->get_class_name(), top->_native_parent)) {
- String msg = "Script inherits from native type '" + String(top->_native_parent) + "', so it can't be instanced in object of type: '" + p_this->get_class() + "'";
+ StringName base_type = get_instance_base_type();
+ if (base_type) {
+ if (!ClassDB::is_parent_class(p_this->get_class_name(), base_type)) {
+ String msg = "Script inherits from native type '" + String(base_type) + "', so it can't be instanced in object of type: '" + p_this->get_class() + "'";
// TODO: implement PluginscriptLanguage::debug_break_parse
// if (ScriptDebugger::get_singleton()) {
// _language->debug_break_parse(get_path(), 0, msg);
@@ -210,29 +207,31 @@ Error PluginScript::reload(bool p_keep_state) {
// TODO: GDscript uses `ScriptDebugger` here to jump into the parsing error
return err;
}
+
+ // Script's parent is passed as base_name which can make reference to a
+ // ClassDB name (i.e. `Node2D`) or a ressource path (i.e. `res://foo/bar.gd`)
+ StringName *base_name = (StringName *)&manifest.base;
+ if (*base_name) {
+
+ if (ClassDB::class_exists(*base_name)) {
+ _native_parent = *base_name;
+ } else {
+ Ref<Script> res = ResourceLoader::load(*base_name);
+ if (res.is_valid()) {
+ _ref_base_parent = res;
+ } else {
+ String name = *(StringName *)&manifest.name;
+ ERR_EXPLAIN(_path + ": Script '" + name + "' has an invalid parent '" + *base_name + "'.");
+ ERR_FAIL_V(ERR_PARSE_ERROR);
+ }
+ }
+ }
+
_valid = true;
// Use the manifest to configure this script object
_data = manifest.data;
_name = *(StringName *)&manifest.name;
_tool = manifest.is_tool;
- // Base name is either another PluginScript or a regular class accessible
- // through ClassDB
- StringName *base_name = (StringName *)&manifest.base;
- for (SelfList<PluginScript> *e = _language->_script_list.first(); e != NULL; e = e->next()) {
- if (e->self()->_name == *base_name) {
- // Found you, base is a PluginScript !
- _ref_base_parent = Ref<PluginScript>(e->self());
- break;
- }
- }
- if (!_ref_base_parent.is_valid()) {
- // Base is a native ClassDB
- if (!ClassDB::class_exists(*base_name)) {
- ERR_EXPLAIN("Unknown script '" + String(_name) + "' parent '" + String(*base_name) + "'.");
- ERR_FAIL_V(ERR_PARSE_ERROR);
- }
- _native_parent = *base_name;
- }
Dictionary *members = (Dictionary *)&manifest.member_lines;
for (const Variant *key = members->next(); key != NULL; key = members->next(key)) {
diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h
index 6b343ad844..6729eecb32 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.h
+++ b/modules/gdnative/pluginscript/pluginscript_script.h
@@ -53,7 +53,7 @@ private:
bool _tool;
bool _valid;
- Ref<PluginScript> _ref_base_parent;
+ Ref<Script> _ref_base_parent;
StringName _native_parent;
SelfList<PluginScript> _script_list;
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index 31328ab834..ba7d56a3b2 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -8,7 +8,7 @@
[method new] creates a new instance of the script. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/scripting/gdscript/index.html
+ http://docs.godotengine.org/en/3.0/learning/scripting/gdscript/index.html
</tutorials>
<demos>
</demos>
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index 788aa5c6b3..0073631a8b 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -10,7 +10,7 @@
A GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/features/3d/using_gridmaps.html
+ http://docs.godotengine.org/en/3.0/learning/features/3d/using_gridmaps.html
</tutorials>
<demos>
</demos>
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 7df2043a62..aee2481366 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1044,7 +1044,7 @@ bool CSharpInstance::get(const StringName &p_name, Variant &r_ret) const {
if (field) {
MonoObject *value = field->get_value(mono_object);
- r_ret = GDMonoMarshal::mono_object_to_variant(value, field->get_type());
+ r_ret = GDMonoMarshal::mono_object_to_variant(value);
return true;
}
@@ -1057,7 +1057,7 @@ bool CSharpInstance::get(const StringName &p_name, Variant &r_ret) const {
r_ret = Variant();
GDMonoUtils::print_unhandled_exception(exc);
} else {
- r_ret = GDMonoMarshal::mono_object_to_variant(value, property->get_type());
+ r_ret = GDMonoMarshal::mono_object_to_variant(value);
}
return true;
}
@@ -1147,7 +1147,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args,
MonoObject *return_value = method->invoke(mono_object, p_args);
if (return_value) {
- return GDMonoMarshal::mono_object_to_variant(return_value, method->get_return_type());
+ return GDMonoMarshal::mono_object_to_variant(return_value);
} else {
return Variant();
}
@@ -1633,7 +1633,7 @@ Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, i
MonoObject *result = method->invoke(NULL, p_args);
if (result) {
- return GDMonoMarshal::mono_object_to_variant(result, method->get_return_type());
+ return GDMonoMarshal::mono_object_to_variant(result);
} else {
return Variant();
}
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index 1ec8f41c91..aa1a8e39c7 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -459,11 +459,7 @@ Variant mono_object_to_variant(MonoObject *p_obj) {
type.type_encoding = mono_type_get_type(raw_type);
type.type_class = tclass;
- return mono_object_to_variant(p_obj, type);
-}
-
-Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) {
- switch (p_type.type_encoding) {
+ switch (type.type_encoding) {
case MONO_TYPE_BOOLEAN:
return (bool)unbox<MonoBoolean>(p_obj);
@@ -497,7 +493,7 @@ Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) {
} break;
case MONO_TYPE_VALUETYPE: {
- GDMonoClass *tclass = p_type.type_class;
+ GDMonoClass *tclass = type.type_class;
if (tclass == CACHED_CLASS(Vector2))
RETURN_UNBOXED_STRUCT(Vector2, p_obj);
@@ -535,7 +531,7 @@ Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) {
case MONO_TYPE_ARRAY:
case MONO_TYPE_SZARRAY: {
- MonoArrayType *array_type = mono_type_get_array_type(GDMonoClass::get_raw_type(p_type.type_class));
+ MonoArrayType *array_type = mono_type_get_array_type(GDMonoClass::get_raw_type(type.type_class));
if (array_type->eklass == CACHED_CLASS_RAW(MonoObject))
return mono_array_to_Array((MonoArray *)p_obj);
@@ -566,7 +562,7 @@ Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) {
} break;
case MONO_TYPE_CLASS: {
- GDMonoClass *type_class = p_type.type_class;
+ GDMonoClass *type_class = type.type_class;
// GodotObject
if (CACHED_CLASS(GodotObject)->is_assignable_from(type_class)) {
@@ -586,14 +582,14 @@ Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) {
} break;
case MONO_TYPE_GENERICINST: {
- if (CACHED_RAW_MONO_CLASS(Dictionary) == p_type.type_class->get_mono_ptr()) {
+ if (CACHED_RAW_MONO_CLASS(Dictionary) == type.type_class->get_mono_ptr()) {
return mono_object_to_Dictionary(p_obj);
}
} break;
}
ERR_EXPLAIN(String() + "Attempted to convert an unmarshallable managed type to Variant. Name: \'" +
- p_type.type_class->get_name() + "\' Encoding: " + itos(p_type.type_encoding));
+ type.type_class->get_name() + "\' Encoding: " + itos(type.type_encoding));
ERR_FAIL_V(Variant());
}
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 727b9fa230..6572408ab5 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -102,7 +102,6 @@ _FORCE_INLINE_ MonoObject *variant_to_mono_object(Variant p_var) {
}
Variant mono_object_to_variant(MonoObject *p_obj);
-Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type);
// Array
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index fa94e9ef86..a037344c70 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -9,7 +9,7 @@
You are most likely to use this class via the Visual Script editor or when writing plugins for it.
</description>
<tutorials>
- http://docs.godotengine.org/en/3.0/learning/scripting/visual_script/index.html
+ http://docs.godotengine.org/en/3.0/learning/scripting/visual_script/index.html
</tutorials>
<demos>
</demos>
diff --git a/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java b/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
index 1102ab7450..5d13f17ffb 100644
--- a/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
+++ b/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
@@ -103,13 +103,16 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
public void onTextChanged(final CharSequence pCharSequence, final int start, final int before, final int count) {
//Log.d(TAG, "onTextChanged(" + pCharSequence + ")start: " + start + ",count: " + count + ",before: " + before);
+ final int[] newChars = new int[count];
+ for (int i = start; i < start + count; ++i) {
+ newChars[i - start] = pCharSequence.charAt(i);
+ }
mView.queueEvent(new Runnable() {
@Override
public void run() {
- for (int i = start; i < start + count; ++i) {
- final int ch = pCharSequence.charAt(i);
- GodotLib.key(0, ch, true);
- GodotLib.key(0, ch, false);
+ for (int i = 0; i < count; ++i) {
+ GodotLib.key(0, newChars[i], true);
+ GodotLib.key(0, newChars[i], false);
}
}
});
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 413edca218..33b3d46486 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -462,9 +462,9 @@ void ScrollContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_enable_v_scroll", "enable"), &ScrollContainer::set_enable_v_scroll);
ClassDB::bind_method(D_METHOD("is_v_scroll_enabled"), &ScrollContainer::is_v_scroll_enabled);
ClassDB::bind_method(D_METHOD("_update_scrollbar_position"), &ScrollContainer::_update_scrollbar_position);
- ClassDB::bind_method(D_METHOD("set_h_scroll", "val"), &ScrollContainer::set_h_scroll);
+ ClassDB::bind_method(D_METHOD("set_h_scroll", "value"), &ScrollContainer::set_h_scroll);
ClassDB::bind_method(D_METHOD("get_h_scroll"), &ScrollContainer::get_h_scroll);
- ClassDB::bind_method(D_METHOD("set_v_scroll", "val"), &ScrollContainer::set_v_scroll);
+ ClassDB::bind_method(D_METHOD("set_v_scroll", "value"), &ScrollContainer::set_v_scroll);
ClassDB::bind_method(D_METHOD("get_v_scroll"), &ScrollContainer::get_v_scroll);
ADD_GROUP("Scroll", "scroll_");