diff options
| -rw-r--r-- | doc/classes/Expression.xml | 2 | ||||
| -rw-r--r-- | doc/classes/PhysicsDirectSpaceState.xml | 2 | ||||
| -rw-r--r-- | editor/code_editor.cpp | 9 | ||||
| -rw-r--r-- | editor/editor_help.cpp | 8 | ||||
| -rw-r--r-- | modules/gdscript/gdscript_function.cpp | 2 | ||||
| -rw-r--r-- | scene/main/scene_tree.cpp | 7 | ||||
| -rw-r--r-- | scene/resources/tile_set.cpp | 2 | 
7 files changed, 18 insertions, 14 deletions
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index b0a21d7f82..78623b359e 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -39,6 +39,7 @@  			</argument>  			<description>  				Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed]. +				If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order.  			</description>  		</method>  		<method name="get_error_text" qualifiers="const"> @@ -64,6 +65,7 @@  			</argument>  			<description>  				Parses the expression and returns a [enum @GlobalScope.Error]. +				You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed.  			</description>  		</method>  	</methods> diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml index c4dc103b72..118010b3cf 100644 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -21,7 +21,7 @@  			</argument>  			<description>  				Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. -				If the shape can not move, the returned array will be [code][0, 0][/code]. +				If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics.  			</description>  		</method>  		<method name="collide_shape"> diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 4ab9a72694..4609ba1036 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1226,15 +1226,16 @@ CodeTextEditor::CodeTextEditor() {  	ED_SHORTCUT("script_editor/zoom_out", TTR("Zoom Out"), KEY_MASK_CMD | KEY_MINUS);  	ED_SHORTCUT("script_editor/reset_zoom", TTR("Reset Zoom"), KEY_MASK_CMD | KEY_0); +	text_editor = memnew(TextEdit); +	add_child(text_editor); +	text_editor->set_v_size_flags(SIZE_EXPAND_FILL); + +	// Added second to it opens at the bottom, so it won't shift the entire text editor when opening  	find_replace_bar = memnew(FindReplaceBar);  	add_child(find_replace_bar);  	find_replace_bar->set_h_size_flags(SIZE_EXPAND_FILL);  	find_replace_bar->hide(); -	text_editor = memnew(TextEdit); -	add_child(text_editor); -	text_editor->set_v_size_flags(SIZE_EXPAND_FILL); -  	find_replace_bar->set_text_edit(text_editor);  	text_editor->set_show_line_numbers(true); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index f8cee6883b..7061d38a2a 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -1423,10 +1423,6 @@ EditorHelp::EditorHelp() {  	EDITOR_DEF("text_editor/help/sort_functions_alphabetically", true); -	find_bar = memnew(FindBar); -	add_child(find_bar); -	find_bar->hide(); -  	class_desc = memnew(RichTextLabel);  	add_child(class_desc);  	class_desc->set_v_size_flags(SIZE_EXPAND_FILL); @@ -1434,6 +1430,10 @@ EditorHelp::EditorHelp() {  	class_desc->connect("meta_clicked", this, "_class_desc_select");  	class_desc->connect("gui_input", this, "_class_desc_input"); +	// Added second so it opens at the bottom so it won't offset the entire widget +	find_bar = memnew(FindBar); +	add_child(find_bar); +	find_bar->hide();  	find_bar->set_rich_text_label(class_desc);  	class_desc->set_selection_enabled(true); diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 966c02d4ec..98871ddec3 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -1083,7 +1083,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a  						if (argc >= 1) {  							methodstr = String(*argptrs[0]) + " (via call)";  							if (err.error == Variant::CallError::CALL_ERROR_INVALID_ARGUMENT) { -								err.argument -= 1; +								err.argument += 1;  							}  						}  					} else if (methodstr == "free") { diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index f713851090..689f18a09d 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1154,13 +1154,14 @@ void SceneTree::_update_root_rect() {  	float viewport_aspect = desired_res.aspect();  	float video_mode_aspect = video_mode.aspect(); +	if (use_font_oversampling && stretch_aspect == STRETCH_ASPECT_IGNORE) { +		WARN_PRINT("Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'."); +	} +  	if (stretch_aspect == STRETCH_ASPECT_IGNORE || ABS(viewport_aspect - video_mode_aspect) < CMP_EPSILON) {  		//same aspect or ignore aspect  		viewport_size = desired_res;  		screen_size = video_mode; -		if (use_font_oversampling) { -			WARN_PRINT("Font oversampling only works with the following resize modes 'Keep Width', 'Keep Height', and 'Expand'.") -		}  	} else if (viewport_aspect < video_mode_aspect) {  		// screen ratio is smaller vertically diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 5a2e7245a2..3c83de91fd 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -614,7 +614,7 @@ Vector2 TileSet::autotile_get_subtile_for_bitmask(int p_id, uint16_t p_bitmask,  	if (coords.size() == 0) {  		return autotile_get_icon_coordinate(p_id);  	} else { -		return coords[Math::random(0, (int)coords.size())]; +		return coords[Math::rand() % coords.size()];  	}  }  |