diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 9bdd6a77..5a44ada8 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -1461,6 +1461,7 @@ void ClassDB::get_argument_options(const StringName &p_function, int p_idx, List } #endif + void ClassDB::_bind_methods() { ::ClassDB::bind_method(D_METHOD("get_class_list"), &ClassDB::get_class_list); ::ClassDB::bind_method(D_METHOD("get_inheriters_from_class", "class"), &ClassDB::get_inheriters_from_class); diff --git a/modules/gdscript/tests/scripts/.editorconfig b/modules/gdscript/tests/scripts/.editorconfig new file mode 100644 index 00000000..f28239ba --- /dev/null +++ b/modules/gdscript/tests/scripts/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/modules/gdscript/tests/scripts/analyzer/features/boolean_operators_for_all_types.gd b/modules/gdscript/tests/scripts/analyzer/features/boolean_operators_for_all_types.gd index 78e631a4..373146d8 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/boolean_operators_for_all_types.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/boolean_operators_for_all_types.gd @@ -157,15 +157,6 @@ func test(): prints(x or false) prints(x or true) - # TYPE_TRANSFORM3D - x = Transform3D.IDENTITY - prints("TYPE_TRANSFORM3D") - prints(not x) - prints(x and false) - prints(x and true) - prints(x or false) - prints(x or true) - # TYPE_PROJECTION x = Projection.IDENTITY prints("TYPE_PROJECTION") diff --git a/modules/gdscript/tests/scripts/analyzer/features/boolean_operators_for_all_types.out b/modules/gdscript/tests/scripts/analyzer/features/boolean_operators_for_all_types.out index e2999fab..55be7b7b 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/boolean_operators_for_all_types.out +++ b/modules/gdscript/tests/scripts/analyzer/features/boolean_operators_for_all_types.out @@ -101,12 +101,6 @@ false false false true -TYPE_TRANSFORM3D -true -false -false -false -true TYPE_PROJECTION true false diff --git a/modules/gdscript/tests/scripts/runtime/features/chain_assignment_works.gd b/modules/gdscript/tests/scripts/runtime/features/chain_assignment_works.gd index d2f3a3e1..5333e2ba 100644 --- a/modules/gdscript/tests/scripts/runtime/features/chain_assignment_works.gd +++ b/modules/gdscript/tests/scripts/runtime/features/chain_assignment_works.gd @@ -9,11 +9,8 @@ func test(): array2[0][0].x = 6 var array3: Array[Array] = [[Vector2()]] array3[0][0].x = 7 - var transform = Transform3D() - transform.basis.x = Vector3(8.0, 9.0, 7.0) print(dictionary1) print(dictionary2) print(array1) print(array2) print(array3) - print(transform) diff --git a/modules/gdscript/tests/scripts/runtime/features/compare_builtin_equals_null.gd b/modules/gdscript/tests/scripts/runtime/features/compare_builtin_equals_null.gd index 74070cf8..1959d2ac 100644 --- a/modules/gdscript/tests/scripts/runtime/features/compare_builtin_equals_null.gd +++ b/modules/gdscript/tests/scripts/runtime/features/compare_builtin_equals_null.gd @@ -61,10 +61,6 @@ func test(): value = Basis() print(value == null) - # Transform3D - value = Transform3D() - print(value == null) - # Projection value = Projection() print(value == null) @@ -136,7 +132,3 @@ func test(): # PackedColorArray value = PackedColorArray() print(value == null) - - # PackedVector4Array - value = PackedVector4Array() - print(value == null) diff --git a/modules/gdscript/tests/scripts/runtime/features/compare_builtin_not_equals_null.gd b/modules/gdscript/tests/scripts/runtime/features/compare_builtin_not_equals_null.gd index ed0a300f..dbc6cb6a 100644 --- a/modules/gdscript/tests/scripts/runtime/features/compare_builtin_not_equals_null.gd +++ b/modules/gdscript/tests/scripts/runtime/features/compare_builtin_not_equals_null.gd @@ -61,10 +61,6 @@ func test(): value = Basis() print(value != null) - # Transform3D - value = Transform3D() - print(value != null) - # Projection value = Projection() print(value != null) @@ -136,7 +132,3 @@ func test(): # PackedColorArray value = PackedColorArray() print(value != null) - - # PackedVector4Array - value = PackedVector4Array() - print(value != null) diff --git a/modules/gdscript/tests/scripts/runtime/features/compare_null_equals_builtin.gd b/modules/gdscript/tests/scripts/runtime/features/compare_null_equals_builtin.gd index b72e2e60..3bfca73f 100644 --- a/modules/gdscript/tests/scripts/runtime/features/compare_null_equals_builtin.gd +++ b/modules/gdscript/tests/scripts/runtime/features/compare_null_equals_builtin.gd @@ -61,10 +61,6 @@ func test(): value = Basis() print(null == value) - # Transform3D - value = Transform3D() - print(null == value) - # Color value = Color() print(null == value) @@ -132,7 +128,3 @@ func test(): # PackedColorArray value = PackedColorArray() print(null == value) - - # PackedVector4Array - value = PackedVector4Array() - print(null == value) diff --git a/modules/gdscript/tests/scripts/runtime/features/compare_null_not_equals_builtin.gd b/modules/gdscript/tests/scripts/runtime/features/compare_null_not_equals_builtin.gd index 3d897360..5b7f1774 100644 --- a/modules/gdscript/tests/scripts/runtime/features/compare_null_not_equals_builtin.gd +++ b/modules/gdscript/tests/scripts/runtime/features/compare_null_not_equals_builtin.gd @@ -61,10 +61,6 @@ func test(): value = Basis() print(null != value) - # Transform3D - value = Transform3D() - print(null != value) - # Color value = Color() print(null != value) @@ -132,7 +128,3 @@ func test(): # PackedColorArray value = PackedColorArray() print(null != value) - - # PackedVector4Array - value = PackedVector4Array() - print(null != value) diff --git a/modules/gdscript/tests/scripts/runtime/features/stringify.gd b/modules/gdscript/tests/scripts/runtime/features/stringify.gd index 1506e5c6..67c71291 100644 --- a/modules/gdscript/tests/scripts/runtime/features/stringify.gd +++ b/modules/gdscript/tests/scripts/runtime/features/stringify.gd @@ -17,7 +17,6 @@ func test(): print(Plane(1, 2, 3, 4)) print(AABB(Vector3.ZERO, Vector3.ONE)) print(Basis.from_euler(Vector3(0, 0, 0))) - print(Transform3D.IDENTITY) print(Color(1, 2, 3, 4)) print(StringName("hello")) @@ -39,4 +38,3 @@ func test(): print(PackedVector2Array([Vector2.ONE, Vector2.ZERO])) print(PackedVector3Array([Vector3.ONE, Vector3.ZERO])) print(PackedColorArray([Color.RED, Color.BLUE, Color.GREEN])) - print(PackedVector4Array([Vector4.ONE, Vector4.ZERO])) diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index c8f8f2df..ae212a75 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -52,6 +52,7 @@ void LineEdit::edit() { if (!has_focus()) { grab_focus(); + return; } if (!editable || editing) { @@ -564,6 +565,7 @@ void LineEdit::gui_input(const Ref &p_event) { if (editable && !editing && k->is_action_pressed("ui_text_submit", false)) { edit(); emit_signal(SNAME("editing_toggled"), true); + accept_event(); return; } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index d4a5a57f..19c845e7 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3069,8 +3069,8 @@ Control::CursorShape TextEdit::get_cursor_shape(const Point2 &p_pos) const { return CURSOR_ARROW; } - int xmargin_end = get_size().width - style->get_margin(SIDE_RIGHT); - if (draw_minimap && p_pos.x > xmargin_end - minimap_width && p_pos.x <= xmargin_end) { + int xmargin_end = get_size().width - style->get_margin(SIDE_RIGHT) - (v_scroll->is_visible_in_tree() ? v_scroll->get_combined_minimum_size().width : 0); + if (draw_minimap && p_pos.x >= xmargin_end - minimap_width && p_pos.x <= xmargin_end) { return CURSOR_ARROW; } return get_default_cursor_shape(); @@ -4428,7 +4428,6 @@ Rect2i TextEdit::get_rect_at_line_column(int p_line, int p_column) const { int TextEdit::get_minimap_line_at_pos(const Point2i &p_pos) const { float rows = p_pos.y; - rows -= theme_cache.style_normal->get_margin(SIDE_TOP); rows /= (minimap_char_size.y + minimap_line_spacing); rows += _get_v_scroll_offset(); @@ -8111,9 +8110,9 @@ void TextEdit::_scroll_lines_down() { void TextEdit::_update_minimap_hover() { const Point2 mp = get_local_mouse_pos(); Ref style = editable ? theme_cache.style_normal : theme_cache.style_readonly; - const int xmargin_end = get_size().width - style->get_margin(SIDE_RIGHT); + const int xmargin_end = get_size().width - style->get_margin(SIDE_RIGHT) - (v_scroll->is_visible_in_tree() ? v_scroll->get_combined_minimum_size().width : 0); - bool hovering_sidebar = mp.x > xmargin_end - minimap_width && mp.x < xmargin_end; + bool hovering_sidebar = mp.x >= xmargin_end - minimap_width && mp.x <= xmargin_end; if (!hovering_sidebar) { if (hovering_minimap) { // Only redraw if the hovering status changed. @@ -8139,7 +8138,7 @@ void TextEdit::_update_minimap_click() { Point2 mp = get_local_mouse_pos(); Ref style = editable ? theme_cache.style_normal : theme_cache.style_readonly; - int xmargin_end = get_size().width - style->get_margin(SIDE_RIGHT); + int xmargin_end = get_size().width - style->get_margin(SIDE_RIGHT) - (v_scroll->is_visible_in_tree() ? v_scroll->get_combined_minimum_size().width : 0); if (!dragging_minimap && (mp.x < xmargin_end - minimap_width || mp.x > xmargin_end)) { minimap_clicked = false; return; diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index ef0c2f19..4533edb3 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1505,19 +1505,18 @@ void Viewport::_gui_input_event(Ref p_event) { // If the tooltip timer isn't running, start it. // Otherwise, only reset the timer if the mouse has moved more than 5 pixels. - if (!is_tooltip_shown && over->can_process() && - (gui.tooltip_timer.is_null() || - Math::is_zero_approx(gui.tooltip_timer->get_time_left()) || - mm->get_relative().length() > 5.0)) { - if (gui.tooltip_timer.is_valid()) { - gui.tooltip_timer->release_connections(); - gui.tooltip_timer = Ref(); + if (!is_tooltip_shown && over->can_process()) { + Vector2 new_tooltip_pos = over->get_screen_transform().xform(pos); + if (gui.tooltip_pos.distance_squared_to(new_tooltip_pos) > 25) { + if (gui.tooltip_timer.is_valid()) { + gui.tooltip_timer->release_connections(); + } + gui.tooltip_control = over; + gui.tooltip_pos = new_tooltip_pos; + gui.tooltip_timer = get_tree()->create_timer(gui.tooltip_delay); + gui.tooltip_timer->set_ignore_time_scale(true); + gui.tooltip_timer->connect("timeout", callable_mp(this, &Viewport::_gui_show_tooltip)); } - gui.tooltip_control = over; - gui.tooltip_pos = over->get_screen_transform().xform(pos); - gui.tooltip_timer = get_tree()->create_timer(gui.tooltip_delay); - gui.tooltip_timer->set_ignore_time_scale(true); - gui.tooltip_timer->connect("timeout", callable_mp(this, &Viewport::_gui_show_tooltip)); } } diff --git a/tests/core/object/test_class_db.h b/tests/core/object/test_class_db.h index c95164f7..3a4eeabf 100644 --- a/tests/core/object/test_class_db.h +++ b/tests/core/object/test_class_db.h @@ -238,7 +238,6 @@ bool arg_default_value_is_assignable_to_type(const Context &p_context, const Var p_arg_type.name == p_context.names_cache.node_path_type; case Variant::NODE_PATH: return p_arg_type.name == p_context.names_cache.node_path_type; - case Variant::TRANSFORM3D: case Variant::TRANSFORM2D: case Variant::BASIS: case Variant::PLANE: diff --git a/tests/core/object/test_object.h b/tests/core/object/test_object.h index f1bb62cb..c6142812 100644 --- a/tests/core/object/test_object.h +++ b/tests/core/object/test_object.h @@ -108,9 +108,6 @@ class _MockScriptInstance : public ScriptInstance { Ref