diff options
Diffstat (limited to 'editor')
20 files changed, 89 insertions, 89 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp index a5de4fee88..ebfc0326d2 100644 --- a/editor/animation_editor.cpp +++ b/editor/animation_editor.cpp @@ -1900,13 +1900,13 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) { - Point2 mpos = mb->get_pos() - ofs; + Point2 mpos = mb->get_position() - ofs; if (selection.size() == 0) { // Auto-select on right-click if nothing is selected // Note: This code is pretty much duplicated from the left click code, // both codes could be moved into a function to avoid the duplicated code. - Point2 mpos = mb->get_pos() - ofs; + Point2 mpos = mb->get_position() - ofs; if (mpos.y < h) { return; @@ -1951,7 +1951,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) if (key == -1) { click.click = ClickOver::CLICK_SELECT_KEYS; - click.at = mb->get_pos(); + click.at = mb->get_position(); click.to = click.at; click.shift = mb->get_shift(); selected_track = idx; @@ -1974,7 +1974,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) selection.insert(sk, ki); click.click = ClickOver::CLICK_MOVE_KEYS; - click.at = mb->get_pos(); + click.at = mb->get_position(); click.to = click.at; update(); selected_track = idx; @@ -2009,14 +2009,14 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) if (mb->is_pressed()) { - Point2 mpos = mb->get_pos() - ofs; + Point2 mpos = mb->get_position() - ofs; if (mpos.y < h) { if (mpos.x < name_limit && mpos.x > (name_limit - hsep - hsize_icon->get_width())) { click.click = ClickOver::CLICK_RESIZE_NAMES; - click.at = mb->get_pos(); + click.at = mb->get_position(); click.to = click.at; click.at.y = name_limit; } @@ -2035,7 +2035,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) pos = animation->get_length(); timeline_pos = pos; click.click = ClickOver::CLICK_DRAG_TIMELINE; - click.at = mb->get_pos(); + click.at = mb->get_position(); click.to = click.at; emit_signal("timeline_changed", pos, false); } @@ -2055,7 +2055,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) if (mpos.x >= name_limit && mpos.x < settings_limit) { click.click = ClickOver::CLICK_SELECT_KEYS; - click.at = mb->get_pos(); + click.at = mb->get_position(); click.to = click.at; //drag select region } @@ -2115,7 +2115,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) if (key == -1) { click.click = ClickOver::CLICK_SELECT_KEYS; - click.at = mb->get_pos(); + click.at = mb->get_position(); click.to = click.at; click.shift = mb->get_shift(); selected_track = idx; @@ -2138,7 +2138,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) selection.insert(sk, ki); click.click = ClickOver::CLICK_MOVE_KEYS; - click.at = mb->get_pos(); + click.at = mb->get_position(); click.to = click.at; update(); selected_track = idx; @@ -2601,7 +2601,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) float clickp = click.at.x - ofs.x; float dif = base - clickp; - float target = mm->get_pos().x + dif - ofs.x; + float target = mm->get_position().x + dif - ofs.x; float ratio = target / settings_limit; @@ -2615,7 +2615,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) } break; case ClickOver::CLICK_DRAG_TIMELINE: { - Point2 mpos = mm->get_pos() - ofs; + Point2 mpos = mm->get_position() - ofs; /* if (mpos.x<name_limit) mpos.x=name_limit; @@ -2646,7 +2646,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) } break; case ClickOver::CLICK_SELECT_KEYS: { - click.to = mm->get_pos(); + click.to = mm->get_position(); if (click.to.y < h && click.at.y > h && mm->get_relative().y < 0) { float prev = v_scroll->get_value(); @@ -2665,7 +2665,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) } break; case ClickOver::CLICK_MOVE_KEYS: { - click.to = mm->get_pos(); + click.to = mm->get_position(); } break; default: {} } @@ -2680,7 +2680,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) if (mm->get_button_mask() == 0) { - Point2 mpos = mm->get_pos() - ofs; + Point2 mpos = mm->get_position() - ofs; if (mpos.y < h) { #if 0 diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 26029261b2..42adf3abcf 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -396,7 +396,7 @@ void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid() && mb->get_button_index() == 2 && mb->is_pressed()) { - Vector2 pos = Vector2(mb->get_pos().x, mb->get_pos().y); + Vector2 pos = Vector2(mb->get_position().x, mb->get_position().y); delete_popup->set_position(get_global_position() + pos); delete_popup->popup(); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index c1f422cce3..08cf5b2693 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3736,7 +3736,7 @@ void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) { if (me.is_valid()) { - Vector2 point = me->get_pos(); + Vector2 point = me->get_position(); int nrect = -1; for (int i = 0; i < DOCK_SLOT_MAX; i++) { diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp index 5aad903485..64cf275c3a 100644 --- a/editor/editor_profiler.cpp +++ b/editor/editor_profiler.cpp @@ -496,7 +496,7 @@ void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) { (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) || (mm.is_valid())) { - int x = me->get_pos().x; + int x = me->get_position().x; x = x * frame_metrics.size() / graph->get_size().width; bool show_hover = x >= 0 && x < frame_metrics.size(); diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index fccd527ed6..3977519e94 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -744,7 +744,7 @@ void AnimationTreeEditor::_gui_input(Ref<InputEvent> p_event) { if (mb->is_pressed()) { if (mb->get_button_index() == 1) { - click_pos = Point2(mb->get_pos().x, mb->get_pos().y); + click_pos = Point2(mb->get_position().x, mb->get_position().y); click_motion = click_pos; click_type = _locate_click(click_pos, &click_node, &click_slot); if (click_type != CLICK_NONE) { @@ -780,7 +780,7 @@ void AnimationTreeEditor::_gui_input(Ref<InputEvent> p_event) { } else { // try to disconnect/remove - Point2 rclick_pos = Point2(mb->get_pos().x, mb->get_pos().y); + Point2 rclick_pos = Point2(mb->get_position().x, mb->get_position().y); rclick_type = _locate_click(rclick_pos, &rclick_node, &rclick_slot); if (rclick_type == CLICK_INPUT_SLOT || rclick_type == CLICK_OUTPUT_SLOT) { @@ -820,7 +820,7 @@ void AnimationTreeEditor::_gui_input(Ref<InputEvent> p_event) { case CLICK_INPUT_SLOT: case CLICK_OUTPUT_SLOT: { - Point2 dst_click_pos = Point2(mb->get_pos().x, mb->get_pos().y); + Point2 dst_click_pos = Point2(mb->get_position().x, mb->get_position().y); StringName id; int slot; ClickType dst_click_type = _locate_click(dst_click_pos, &id, &slot); @@ -859,7 +859,7 @@ void AnimationTreeEditor::_gui_input(Ref<InputEvent> p_event) { if (mm->get_button_mask() & 1 && click_type != CLICK_NONE) { - click_motion = Point2(mm->get_pos().x, mm->get_pos().y); + click_motion = Point2(mm->get_position().x, mm->get_position().y); update(); } if ((mm->get_button_mask() & 4 || Input::get_singleton()->is_key_pressed(KEY_SPACE))) { diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index a626dffc3c..3e6adfe27a 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -962,7 +962,7 @@ bool CanvasItemEditor::get_remove_list(List<Node *> *p_list) { void CanvasItemEditor::_list_select(const Ref<InputEventMouseButton> &b) { - Point2 click = b->get_pos(); + Point2 click = b->get_position(); Node *scene = editor->get_edited_scene(); if (!scene) @@ -1016,7 +1016,7 @@ void CanvasItemEditor::_list_select(const Ref<InputEventMouseButton> &b) { additive_selection = b->get_shift(); - selection_menu->set_global_position(b->get_global_pos()); + selection_menu->set_global_position(b->get_global_position()); selection_menu->popup(); selection_menu->call_deferred("grab_click_focus"); selection_menu->set_invalidate_click_until_motion(); @@ -1053,7 +1053,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) { float prev_zoom = zoom; zoom = zoom * (1 - (0.05 * b->get_factor())); { - Point2 ofs = b->get_pos(); + Point2 ofs = b->get_position(); ofs = ofs / prev_zoom - ofs / zoom; h_scroll->set_value(h_scroll->get_value() + ofs.x); v_scroll->set_value(v_scroll->get_value() + ofs.y); @@ -1071,7 +1071,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) { float prev_zoom = zoom; zoom = zoom * ((0.95 + (0.05 * b->get_factor())) / 0.95); { - Point2 ofs = b->get_pos(); + Point2 ofs = b->get_position(); ofs = ofs / prev_zoom - ofs / zoom; h_scroll->set_value(h_scroll->get_value() + ofs.x); v_scroll->set_value(v_scroll->get_value() + ofs.y); @@ -1156,7 +1156,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) { if (b->get_button_index() == BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) { if (b->is_pressed()) { - Point2 mouse_pos = b->get_pos(); + Point2 mouse_pos = b->get_position(); mouse_pos = transform.affine_inverse().xform(mouse_pos); mouse_pos = snap_point(mouse_pos); _edit_set_pivot(mouse_pos); @@ -1274,8 +1274,8 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) { E->get().to }; - Vector2 p = Geometry::get_closest_point_to_segment_2d(b->get_pos(), s); - float d = p.distance_to(b->get_pos()); + Vector2 p = Geometry::get_closest_point_to_segment_2d(b->get_position(), s); + float d = p.distance_to(b->get_position()); if (d < bone_width && d < closest_dist) { Cbone = E; closest_dist = d; @@ -1342,7 +1342,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) { CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item); ERR_FAIL_COND(!se); - Point2 click = b->get_pos(); + Point2 click = b->get_position(); if ((b->get_control() && tool == TOOL_SELECT) || tool == TOOL_ROTATE) { @@ -1388,7 +1388,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) { //multi canvas_item edit - Point2 click = b->get_pos(); + Point2 click = b->get_position(); if ((b->get_alt() || tool == TOOL_MOVE) && get_item_count()) { _prepare_drag(click); @@ -1451,7 +1451,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) { if (box_selecting) { - box_selecting_to = transform.affine_inverse().xform(m->get_pos()); + box_selecting_to = transform.affine_inverse().xform(m->get_position()); viewport->update(); return; } @@ -1497,7 +1497,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) { } Vector2 dfrom = drag_from; - Vector2 dto = transform.affine_inverse().xform(m->get_pos()); + Vector2 dto = transform.affine_inverse().xform(m->get_position()); if (canvas_item->has_meta("_edit_lock_")) continue; diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp index b7cfcaae02..43abea0131 100644 --- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp @@ -104,7 +104,7 @@ bool CollisionPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) if (mb.is_valid()) { Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); - Vector2 gpoint = mb->get_pos(); + Vector2 gpoint = mb->get_position(); Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); cpoint = node->get_global_transform().affine_inverse().xform(cpoint); @@ -289,7 +289,7 @@ bool CollisionPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) { - Vector2 gpoint = mm->get_pos(); + Vector2 gpoint = mm->get_position(); Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint); diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index e2184c6158..9a6ee8153e 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -322,7 +322,7 @@ bool CollisionShape2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { Transform2D gt = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); - Point2 gpoint(mb->get_pos().x, mb->get_pos().y); + Point2 gpoint(mb->get_position().x, mb->get_position().y); if (mb->get_button_index() == BUTTON_LEFT) { if (mb->is_pressed()) { @@ -368,7 +368,7 @@ bool CollisionShape2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { return false; } - Point2 gpoint = mm->get_pos(); + Point2 gpoint = mm->get_position(); Point2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); cpoint = node->get_global_transform().affine_inverse().xform(cpoint); diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 6dd94863a1..d869d703f1 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -57,7 +57,7 @@ void CurveTextureEdit::_gui_input(const Ref<InputEvent> &p_event) { Vector2 size = get_size(); size.y -= font_h; - Point2 p = Vector2(mb->get_pos().x, mb->get_pos().y) / size; + Point2 p = Vector2(mb->get_position().x, mb->get_position().y) / size; p.y = CLAMP(1.0 - p.y, 0, 1) * (max - min) + min; grabbed = -1; grabbing = true; @@ -111,7 +111,7 @@ void CurveTextureEdit::_gui_input(const Ref<InputEvent> &p_event) { Vector2 size = get_size(); size.y -= font_h; - Point2 p = mm->get_pos() / size; + Point2 p = mm->get_position() / size; p.y = CLAMP(1.0 - p.y, 0, 1) * (max - min) + min; p.x = CLAMP(p.x, 0.0, 1.0); diff --git a/editor/plugins/gradient_texture_editor_plugin.cpp b/editor/plugins/gradient_texture_editor_plugin.cpp index 40f7de478d..bc985dcdf7 100644 --- a/editor/plugins/gradient_texture_editor_plugin.cpp +++ b/editor/plugins/gradient_texture_editor_plugin.cpp @@ -94,14 +94,14 @@ void GradientTextureEdit::_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; //Show color picker on double click. if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_doubleclick() && mb->is_pressed()) { - grabbed = _get_point_from_pos(mb->get_pos().x); + grabbed = _get_point_from_pos(mb->get_position().x); _show_color_picker(); accept_event(); } //Delete point on right click if (mb.is_valid() && mb->get_button_index() == 2 && mb->is_pressed()) { - grabbed = _get_point_from_pos(mb->get_pos().x); + grabbed = _get_point_from_pos(mb->get_position().x); if (grabbed != -1) { points.remove(grabbed); grabbed = -1; @@ -115,7 +115,7 @@ void GradientTextureEdit::_gui_input(const Ref<InputEvent> &p_event) { //Hold alt key to duplicate selected color if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed() && mb->get_alt()) { - int x = mb->get_pos().x; + int x = mb->get_position().x; grabbed = _get_point_from_pos(x); if (grabbed != -1) { @@ -140,7 +140,7 @@ void GradientTextureEdit::_gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) { update(); - int x = mb->get_pos().x; + int x = mb->get_position().x; int total_w = get_size().width - get_size().height - 3; //Check if color selector was clicked. @@ -220,7 +220,7 @@ void GradientTextureEdit::_gui_input(const Ref<InputEvent> &p_event) { int total_w = get_size().width - get_size().height - 3; - int x = mm->get_pos().x; + int x = mm->get_position().x; float newofs = CLAMP(x / float(total_w), 0, 1); //Snap to nearest point if holding shift diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp index 9c9e010b47..09021446dc 100644 --- a/editor/plugins/light_occluder_2d_editor_plugin.cpp +++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp @@ -118,7 +118,7 @@ bool LightOccluder2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); - Vector2 gpoint = mb->get_pos(); + Vector2 gpoint = mb->get_position(); Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); cpoint = node->get_global_transform().affine_inverse().xform(cpoint); @@ -308,7 +308,7 @@ bool LightOccluder2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) { - Vector2 gpoint = mm->get_pos(); + Vector2 gpoint = mm->get_position(); Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint); diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp index 3497af3602..76906a5b93 100644 --- a/editor/plugins/line_2d_editor_plugin.cpp +++ b/editor/plugins/line_2d_editor_plugin.cpp @@ -87,7 +87,7 @@ bool Line2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid()) { - Vector2 gpoint = mb->get_pos(); + Vector2 gpoint = mb->get_position(); Vector2 cpoint = mouse_to_local_pos(gpoint, mb->get_alt()); if (mb->is_pressed() && _dragging == false) { @@ -146,7 +146,7 @@ bool Line2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (mm.is_valid()) { if (_dragging) { - Vector2 cpoint = mouse_to_local_pos(mm->get_pos(), mm->get_alt()); + Vector2 cpoint = mouse_to_local_pos(mm->get_position(), mm->get_alt()); node->set_point_pos(action_point, cpoint); canvas_item_editor->get_viewport_control()->update(); return true; diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp index a7fc1d5adb..1457b28ed1 100644 --- a/editor/plugins/navigation_polygon_editor_plugin.cpp +++ b/editor/plugins/navigation_polygon_editor_plugin.cpp @@ -134,7 +134,7 @@ bool NavigationPolygonEditor::forward_gui_input(const Ref<InputEvent> &p_event) Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); - Vector2 gpoint = mb->get_pos(); + Vector2 gpoint = mb->get_position(); Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); cpoint = node->get_global_transform().affine_inverse().xform(cpoint); @@ -361,7 +361,7 @@ bool NavigationPolygonEditor::forward_gui_input(const Ref<InputEvent> &p_event) if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) { - Vector2 gpoint = mm->get_pos(); + Vector2 gpoint = mm->get_position(); Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint); diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index 73d5b28886..f9f16fea16 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -74,7 +74,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); - Vector2 gpoint = mb->get_pos(); + Vector2 gpoint = mb->get_position(); Vector2 cpoint = !mb->get_alt() ? canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint)) : @@ -431,7 +431,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (action != ACTION_NONE) { // Handle point/control movement. Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); - Vector2 gpoint = mm->get_pos(); + Vector2 gpoint = mm->get_position(); Vector2 cpoint = !mm->get_alt() ? canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint)) : diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp index 20535d796e..877707d77b 100644 --- a/editor/plugins/path_editor_plugin.cpp +++ b/editor/plugins/path_editor_plugin.cpp @@ -285,7 +285,7 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref<Inp if (mb.is_valid()) { - Point2 mbpos(mb->get_pos().x, mb->get_pos().y); + Point2 mbpos(mb->get_position().x, mb->get_position().y); if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && (curve_create->is_pressed() || (curve_edit->is_pressed() && mb->get_control()))) { //click into curve, break it down diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index c2edc608ab..d9963a422a 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -212,7 +212,7 @@ bool Polygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); - Vector2 gpoint = mb->get_pos(); + Vector2 gpoint = mb->get_position(); Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); cpoint = node->get_global_transform().affine_inverse().xform(cpoint); @@ -397,7 +397,7 @@ bool Polygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) { - Vector2 gpoint = mm->get_pos(); + Vector2 gpoint = mm->get_position(); Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint); cpoint = canvas_item_editor->snap_point(cpoint); edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint); @@ -465,7 +465,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { if (mb->is_pressed()) { - uv_drag_from = Vector2(mb->get_pos().x, mb->get_pos().y); + uv_drag_from = Vector2(mb->get_position().x, mb->get_position().y); uv_drag = true; uv_prev = node->get_uv(); uv_move_current = uv_mode; @@ -485,7 +485,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { for (int i = 0; i < uv_prev.size(); i++) { Vector2 tuv = mtx.xform(uv_prev[i]); - if (tuv.distance_to(Vector2(mb->get_pos().x, mb->get_pos().y)) < 8) { + if (tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y)) < 8) { uv_drag_from = tuv; uv_drag_index = i; } @@ -537,7 +537,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { } else if (uv_drag) { - Vector2 uv_drag_to = mm->get_pos(); + Vector2 uv_drag_to = mm->get_position(); Vector2 drag = mtx.affine_inverse().xform(uv_drag_to) - mtx.affine_inverse().xform(uv_drag_from); switch (uv_move_current) { diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 2d3a14e525..70bda39947 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1236,8 +1236,8 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) { int col, row; TextEdit *tx = code_editor->get_text_edit(); - tx->_get_mouse_pos(mb->get_global_pos() - tx->get_global_position(), row, col); - Vector2 mpos = mb->get_global_pos() - tx->get_global_position(); + tx->_get_mouse_pos(mb->get_global_position() - tx->get_global_position(), row, col); + Vector2 mpos = mb->get_global_position() - tx->get_global_position(); bool have_selection = (tx->get_selection_text().length() > 0); bool have_color = (tx->get_word_at_pos(mpos) == "Color"); if (have_color) { diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index ff4b5e430e..c60adf9e7b 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -636,7 +636,7 @@ void SpatialEditorViewport::_smouseenter() { void SpatialEditorViewport::_list_select(Ref<InputEventMouseButton> b) { - _find_items_at_pos(b->get_pos(), clicked_includes_current, selection_results, b->get_shift()); + _find_items_at_pos(b->get_position(), clicked_includes_current, selection_results, b->get_shift()); Node *scene = editor->get_edited_scene(); @@ -684,7 +684,7 @@ void SpatialEditorViewport::_list_select(Ref<InputEventMouseButton> b) { selection_menu->set_item_tooltip(i, String(spat->get_name()) + "\nType: " + spat->get_class() + "\nPath: " + node_path); } - selection_menu->set_global_position(b->get_global_pos()); + selection_menu->set_global_position(b->get_global_position()); selection_menu->popup(); selection_menu->call_deferred("grab_click_focus"); selection_menu->set_invalidate_click_until_motion(); @@ -818,7 +818,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { break; } - _edit.mouse_pos = b->get_pos(); + _edit.mouse_pos = b->get_position(); _edit.snap = false; _edit.mode = TRANSFORM_NONE; @@ -863,7 +863,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { break; //bye //handle rotate _edit.mode = TRANSFORM_ROTATE; - _compute_edit(b->get_pos()); + _compute_edit(b->get_position()); break; } @@ -873,7 +873,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { break; //bye //handle rotate _edit.mode = TRANSFORM_TRANSLATE; - _compute_edit(b->get_pos()); + _compute_edit(b->get_position()); break; } @@ -883,7 +883,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { break; //bye //handle rotate _edit.mode = TRANSFORM_SCALE; - _compute_edit(b->get_pos()); + _compute_edit(b->get_position()); break; } @@ -891,7 +891,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { int gizmo_handle = -1; - clicked = _select_ray(b->get_pos(), b->get_shift(), clicked_includes_current, &gizmo_handle, b->get_shift()); + clicked = _select_ray(b->get_position(), b->get_shift(), clicked_includes_current, &gizmo_handle, b->get_shift()); //clicking is always deferred to either move or release @@ -904,8 +904,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { //default to regionselect cursor.region_select = true; - cursor.region_begin = b->get_pos(); - cursor.region_end = b->get_pos(); + cursor.region_begin = b->get_position(); + cursor.region_end = b->get_position(); } if (clicked && gizmo_handle >= 0) { @@ -989,7 +989,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { if (m.is_valid()) { - _edit.mouse_pos = m->get_pos(); + _edit.mouse_pos = m->get_position(); if (spatial_editor->get_selected()) { @@ -1026,7 +1026,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { if (_edit.gizmo.is_valid()) { - _edit.gizmo->set_handle(_edit.gizmo_handle, camera, m->get_pos()); + _edit.gizmo->set_handle(_edit.gizmo_handle, camera, m->get_position()); Variant v = _edit.gizmo->get_handle_value(_edit.gizmo_handle); String n = _edit.gizmo->get_handle_name(_edit.gizmo_handle); set_message(n + ": " + String(v)); @@ -1058,7 +1058,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { if (cursor.region_select && nav_mode == NAVIGATION_NONE) { - cursor.region_end = m->get_pos(); + cursor.region_end = m->get_position(); surface->update(); return; } @@ -1066,8 +1066,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { if (_edit.mode == TRANSFORM_NONE && nav_mode == NAVIGATION_NONE) return; - Vector3 ray_pos = _get_ray_pos(m->get_pos()); - Vector3 ray = _get_ray(m->get_pos()); + Vector3 ray_pos = _get_ray_pos(m->get_position()); + Vector3 ray = _get_ray(m->get_position()); switch (_edit.mode) { diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 799bfbf358..6382164628 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -244,26 +244,26 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { mtx.basis_xform(rect.pos + Vector2(margins[2], 0)) - draw_ofs, mtx.basis_xform(rect.pos + rect.size - Vector2(margins[3], 0)) - draw_ofs }; - if (Math::abs(mb->get_pos().y - pos[0].y) < 8) { + if (Math::abs(mb->get_position().y - pos[0].y) < 8) { edited_margin = 0; prev_margin = margins[0]; - } else if (Math::abs(mb->get_pos().y - pos[1].y) < 8) { + } else if (Math::abs(mb->get_position().y - pos[1].y) < 8) { edited_margin = 1; prev_margin = margins[1]; - } else if (Math::abs(mb->get_pos().x - pos[2].x) < 8) { + } else if (Math::abs(mb->get_position().x - pos[2].x) < 8) { edited_margin = 2; prev_margin = margins[2]; - } else if (Math::abs(mb->get_pos().x - pos[3].x) < 8) { + } else if (Math::abs(mb->get_position().x - pos[3].x) < 8) { edited_margin = 3; prev_margin = margins[3]; } if (edited_margin >= 0) { - drag_from = Vector2(mb->get_pos().x, mb->get_pos().y); + drag_from = Vector2(mb->get_position().x, mb->get_position().y); drag = true; } } if (edited_margin < 0 && snap_mode == SNAP_AUTOSLICE) { - Vector2 point = mtx.affine_inverse().xform(Vector2(mb->get_pos().x, mb->get_pos().y)); + Vector2 point = mtx.affine_inverse().xform(Vector2(mb->get_position().x, mb->get_position().y)); for (List<Rect2>::Element *E = autoslice_cache.front(); E; E = E->next()) { if (E->get().has_point(point)) { rect = E->get(); @@ -301,7 +301,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { } } } else if (edited_margin < 0) { - drag_from = mtx.affine_inverse().xform(Vector2(mb->get_pos().x, mb->get_pos().y)); + drag_from = mtx.affine_inverse().xform(Vector2(mb->get_position().x, mb->get_position().y)); if (snap_mode == SNAP_PIXEL) drag_from = drag_from.snapped(Vector2(1, 1)); else if (snap_mode == SNAP_GRID) @@ -318,7 +318,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { for (int i = 0; i < 8; i++) { Vector2 tuv = endpoints[i]; - if (tuv.distance_to(Vector2(mb->get_pos().x, mb->get_pos().y)) < 8) { + if (tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y)) < 8) { drag_index = i; } } @@ -408,13 +408,13 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { if (edited_margin >= 0) { float new_margin; if (edited_margin == 0) - new_margin = prev_margin + (mm->get_pos().y - drag_from.y) / draw_zoom; + new_margin = prev_margin + (mm->get_position().y - drag_from.y) / draw_zoom; else if (edited_margin == 1) - new_margin = prev_margin - (mm->get_pos().y - drag_from.y) / draw_zoom; + new_margin = prev_margin - (mm->get_position().y - drag_from.y) / draw_zoom; else if (edited_margin == 2) - new_margin = prev_margin + (mm->get_pos().x - drag_from.x) / draw_zoom; + new_margin = prev_margin + (mm->get_position().x - drag_from.x) / draw_zoom; else if (edited_margin == 3) - new_margin = prev_margin - (mm->get_pos().x - drag_from.x) / draw_zoom; + new_margin = prev_margin - (mm->get_position().x - drag_from.x) / draw_zoom; if (new_margin < 0) new_margin = 0; static Margin m[4] = { MARGIN_TOP, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT }; @@ -423,7 +423,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { if (obj_styleBox.is_valid()) obj_styleBox->set_margin_size(m[edited_margin], new_margin); } else { - Vector2 new_pos = mtx.affine_inverse().xform(mm->get_pos()); + Vector2 new_pos = mtx.affine_inverse().xform(mm->get_position()); if (snap_mode == SNAP_PIXEL) new_pos = new_pos.snapped(Vector2(1, 1)); else if (snap_mode == SNAP_GRID) diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 9f7a41b8b6..282670e695 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -826,7 +826,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) { paint_undo.clear(); - Point2 local = node->world_to_map(xform_inv.xform(mb->get_pos())); + Point2 local = node->world_to_map(xform_inv.xform(mb->get_position())); if (mb->get_shift()) { @@ -900,7 +900,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (mm.is_valid()) { - Point2i new_over_tile = node->world_to_map(xform_inv.xform(mm->get_pos())); + Point2i new_over_tile = node->world_to_map(xform_inv.xform(mm->get_position())); if (new_over_tile != over_tile) { |