diff options
Diffstat (limited to 'modules')
6 files changed, 39 insertions, 35 deletions
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 932bfb2caa..9be9cbc749 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -54,9 +54,13 @@ void GDScriptWorkspace::_bind_methods() { } void GDScriptWorkspace::apply_new_signal(Object *obj, String function, PackedStringArray args) { - String function_signature = "func " + function; Ref<Script> script = obj->get_script(); + if (script->get_language()->get_name() != "GDScript") { + return; + } + + String function_signature = "func " + function; String source = script->get_source_code(); if (source.find(function_signature) != -1) { diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs index 30ecd22db7..1f5282e88f 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs @@ -17,7 +17,7 @@ namespace Godot { /// <summary> /// Enumerated index values for the axes. - /// Returned by <see cref="MaxAxis"/> and <see cref="MinAxis"/>. + /// Returned by <see cref="MaxAxisIndex"/> and <see cref="MinAxisIndex"/>. /// </summary> public enum Axis { @@ -365,21 +365,21 @@ namespace Godot } /// <summary> - /// Returns the axis of the vector's largest value. See <see cref="Axis"/>. + /// Returns the axis of the vector's highest value. See <see cref="Axis"/>. /// If both components are equal, this method returns <see cref="Axis.X"/>. /// </summary> - /// <returns>The index of the largest axis.</returns> - public Axis MaxAxis() + /// <returns>The index of the highest axis.</returns> + public Axis MaxAxisIndex() { return x < y ? Axis.Y : Axis.X; } /// <summary> - /// Returns the axis of the vector's smallest value. See <see cref="Axis"/>. + /// Returns the axis of the vector's lowest value. See <see cref="Axis"/>. /// If both components are equal, this method returns <see cref="Axis.Y"/>. /// </summary> - /// <returns>The index of the smallest axis.</returns> - public Axis MinAxis() + /// <returns>The index of the lowest axis.</returns> + public Axis MinAxisIndex() { return x < y ? Axis.X : Axis.Y; } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs index 3bbc2ae2ba..9b51de5c8c 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs @@ -17,7 +17,7 @@ namespace Godot { /// <summary> /// Enumerated index values for the axes. - /// Returned by <see cref="MaxAxis"/> and <see cref="MinAxis"/>. + /// Returned by <see cref="MaxAxisIndex"/> and <see cref="MinAxisIndex"/>. /// </summary> public enum Axis { @@ -218,21 +218,21 @@ namespace Godot } /// <summary> - /// Returns the axis of the vector's largest value. See <see cref="Axis"/>. + /// Returns the axis of the vector's highest value. See <see cref="Axis"/>. /// If both components are equal, this method returns <see cref="Axis.X"/>. /// </summary> - /// <returns>The index of the largest axis.</returns> - public Axis MaxAxis() + /// <returns>The index of the highest axis.</returns> + public Axis MaxAxisIndex() { return x < y ? Axis.Y : Axis.X; } /// <summary> - /// Returns the axis of the vector's smallest value. See <see cref="Axis"/>. + /// Returns the axis of the vector's lowest value. See <see cref="Axis"/>. /// If both components are equal, this method returns <see cref="Axis.Y"/>. /// </summary> - /// <returns>The index of the smallest axis.</returns> - public Axis MinAxis() + /// <returns>The index of the lowest axis.</returns> + public Axis MinAxisIndex() { return x < y ? Axis.X : Axis.Y; } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs index 15acf88f62..433a5d9dc9 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs @@ -17,7 +17,7 @@ namespace Godot { /// <summary> /// Enumerated index values for the axes. - /// Returned by <see cref="MaxAxis"/> and <see cref="MinAxis"/>. + /// Returned by <see cref="MaxAxisIndex"/> and <see cref="MinAxisIndex"/>. /// </summary> public enum Axis { @@ -364,21 +364,21 @@ namespace Godot } /// <summary> - /// Returns the axis of the vector's largest value. See <see cref="Axis"/>. + /// Returns the axis of the vector's highest value. See <see cref="Axis"/>. /// If all components are equal, this method returns <see cref="Axis.X"/>. /// </summary> - /// <returns>The index of the largest axis.</returns> - public Axis MaxAxis() + /// <returns>The index of the highest axis.</returns> + public Axis MaxAxisIndex() { return x < y ? (y < z ? Axis.Z : Axis.Y) : (x < z ? Axis.Z : Axis.X); } /// <summary> - /// Returns the axis of the vector's smallest value. See <see cref="Axis"/>. + /// Returns the axis of the vector's lowest value. See <see cref="Axis"/>. /// If all components are equal, this method returns <see cref="Axis.Z"/>. /// </summary> - /// <returns>The index of the smallest axis.</returns> - public Axis MinAxis() + /// <returns>The index of the lowest axis.</returns> + public Axis MinAxisIndex() { return x < y ? (x < z ? Axis.X : Axis.Z) : (y < z ? Axis.Y : Axis.Z); } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs index 562f653fa8..eb06d2b87e 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs @@ -17,7 +17,7 @@ namespace Godot { /// <summary> /// Enumerated index values for the axes. - /// Returned by <see cref="MaxAxis"/> and <see cref="MinAxis"/>. + /// Returned by <see cref="MaxAxisIndex"/> and <see cref="MinAxisIndex"/>. /// </summary> public enum Axis { @@ -186,21 +186,21 @@ namespace Godot } /// <summary> - /// Returns the axis of the vector's largest value. See <see cref="Axis"/>. + /// Returns the axis of the vector's highest value. See <see cref="Axis"/>. /// If all components are equal, this method returns <see cref="Axis.X"/>. /// </summary> - /// <returns>The index of the largest axis.</returns> - public Axis MaxAxis() + /// <returns>The index of the highest axis.</returns> + public Axis MaxAxisIndex() { return x < y ? (y < z ? Axis.Z : Axis.Y) : (x < z ? Axis.Z : Axis.X); } /// <summary> - /// Returns the axis of the vector's smallest value. See <see cref="Axis"/>. + /// Returns the axis of the vector's lowest value. See <see cref="Axis"/>. /// If all components are equal, this method returns <see cref="Axis.Z"/>. /// </summary> - /// <returns>The index of the smallest axis.</returns> - public Axis MinAxis() + /// <returns>The index of the lowest axis.</returns> + public Axis MinAxisIndex() { return x < y ? (x < z ? Axis.X : Axis.Z) : (y < z ? Axis.Y : Axis.Z); } diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp index 13dd1f7bc7..349537521c 100644 --- a/modules/visual_script/editor/visual_script_editor.cpp +++ b/modules/visual_script/editor/visual_script_editor.cpp @@ -1506,7 +1506,7 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt } } else if (ti->get_parent() == root->get_first_child()) { selected = ti->get_text(0); - function_name_edit->set_position(Input::get_singleton()->get_mouse_position() - Vector2(60, -10)); + function_name_edit->set_position(get_screen_position() + get_local_mouse_position() - Vector2(60, -10)); function_name_edit->popup(); function_name_box->set_text(selected); function_name_box->select_all(); @@ -1974,7 +1974,7 @@ void VisualScriptEditor::input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> key = p_event; if (key.is_valid() && !key->is_pressed()) { - mouse_up_position = Input::get_singleton()->get_mouse_position(); + mouse_up_position = get_screen_position() + get_local_mouse_position(); } } @@ -1984,7 +1984,7 @@ void VisualScriptEditor::_graph_gui_input(const Ref<InputEvent> &p_event) { if (key.is_valid() && key->is_pressed() && key->get_button_mask() == MouseButton::RIGHT) { saved_position = graph->get_local_mouse_position(); - Point2 gpos = Input::get_singleton()->get_mouse_position(); + Point2 gpos = get_screen_position() + get_local_mouse_position(); _generic_search(script->get_instance_base_type(), gpos); } } @@ -3704,7 +3704,7 @@ void VisualScriptEditor::_default_value_edited(Node *p_button, int p_id, int p_i Variant::construct(pinfo.type, existing, &existingp, 1, ce); } - default_value_edit->set_position(Object::cast_to<Control>(p_button)->get_global_position() + Vector2(0, Object::cast_to<Control>(p_button)->get_size().y)); + default_value_edit->set_position(Object::cast_to<Control>(p_button)->get_screen_position() + Vector2(0, Object::cast_to<Control>(p_button)->get_size().y)); default_value_edit->reset_size(); if (pinfo.type == Variant::NODE_PATH) { @@ -4160,10 +4160,10 @@ void VisualScriptEditor::_member_rmb_selected(const Vector2 &p_pos) { ERR_FAIL_COND(!ti); member_popup->clear(); - member_popup->set_position(members->get_global_position() + p_pos); + member_popup->set_position(members->get_screen_position() + p_pos); member_popup->reset_size(); - function_name_edit->set_position(members->get_global_position() + p_pos); + function_name_edit->set_position(members->get_screen_position() + p_pos); function_name_edit->reset_size(); TreeItem *root = members->get_root(); |