diff options
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r-- | scene/main/viewport.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index f62cebe042..a1d90c143e 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -512,7 +512,7 @@ void Viewport::_notification(int p_what) { if (mm.is_valid()) { - pos = mm->get_pos(); + pos = mm->get_position(); motion_tested = true; physics_last_mousepos = pos; } @@ -520,19 +520,19 @@ void Viewport::_notification(int p_what) { Ref<InputEventMouseButton> mb = ev; if (mb.is_valid()) { - pos = mb->get_pos(); + pos = mb->get_position(); } Ref<InputEventScreenDrag> sd = ev; if (sd.is_valid()) { - pos = sd->get_pos(); + pos = sd->get_position(); } Ref<InputEventScreenTouch> st = ev; if (st.is_valid()) { - pos = st->get_pos(); + pos = st->get_position(); } if (ss2d) { @@ -1685,7 +1685,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { gui.key_event_accepted = false; - Point2 mpos = mb->get_pos(); + Point2 mpos = mb->get_position(); if (mb->is_pressed()) { Size2 pos = mpos; @@ -1740,11 +1740,11 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { mb = mb->xformed_by(Transform2D()); // make a copy of the event - mb->set_global_pos(pos); + mb->set_global_position(pos); pos = gui.focus_inv_xform.xform(pos); - mb->set_pos(pos); + mb->set_position(pos); #ifdef DEBUG_ENABLED if (ScriptDebugger::get_singleton()) { @@ -1841,9 +1841,9 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { Size2 pos = mpos; mb = mb->xformed_by(Transform2D()); //make a copy - mb->set_global_pos(pos); + mb->set_global_position(pos); pos = gui.focus_inv_xform.xform(pos); - mb->set_pos(pos); + mb->set_position(pos); if (gui.mouse_focus->can_process()) { _gui_call_input(gui.mouse_focus, mb); @@ -1869,7 +1869,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { if (mm.is_valid()) { gui.key_event_accepted = false; - Point2 mpos = mm->get_pos(); + Point2 mpos = mm->get_position(); gui.last_mouse_pos = mpos; @@ -1961,7 +1961,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { mm = mm->xformed_by(Transform2D()); //make a copy - mm->set_global_pos(mpos); + mm->set_global_position(mpos); mm->set_speed(speed); mm->set_relative(rel); @@ -1999,7 +1999,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { //pos = gui.focus_inv_xform.xform(pos); - mm->set_pos(pos); + mm->set_position(pos); Control::CursorShape cursor_shape = over->get_cursor_shape(pos); OS::get_singleton()->set_cursor_shape((OS::CursorShape)cursor_shape); @@ -2318,7 +2318,7 @@ void Viewport::_gui_grab_click_focus(Control *p_control) { //send unclic Point2 click = gui.mouse_focus->get_global_transform_with_canvas().affine_inverse().xform(gui.last_mouse_pos); - mb->set_pos(click); + mb->set_position(click); mb->set_button_index(gui.mouse_focus_button); mb->set_pressed(false); gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input, mb); @@ -2326,7 +2326,7 @@ void Viewport::_gui_grab_click_focus(Control *p_control) { gui.mouse_focus = p_control; gui.focus_inv_xform = gui.mouse_focus->get_global_transform_with_canvas().affine_inverse(); click = gui.mouse_focus->get_global_transform_with_canvas().affine_inverse().xform(gui.last_mouse_pos); - mb->set_pos(click); + mb->set_position(click); mb->set_button_index(gui.mouse_focus_button); mb->set_pressed(true); gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input, mb); |