InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
This commit is contained in:
parent
5a6d4971e1
commit
9bc5348961
51 changed files with 282 additions and 282 deletions
|
|
@ -380,8 +380,8 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
ev->set_button_index(BUTTON_LEFT);
|
||||
ev->set_button_mask(BUTTON_MASK_LEFT);
|
||||
ev->set_pressed(false);
|
||||
ev->set_pos(touch[0].pos);
|
||||
ev->set_global_pos(touch[0].pos);
|
||||
ev->set_position(touch[0].pos);
|
||||
ev->set_global_position(touch[0].pos);
|
||||
input->parse_input_event(ev);
|
||||
}
|
||||
|
||||
|
|
@ -391,7 +391,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
ev.instance();
|
||||
ev->set_index(touch[i].id);
|
||||
ev->set_pressed(false);
|
||||
ev->set_pos(touch[i].pos);
|
||||
ev->set_position(touch[i].pos);
|
||||
input->parse_input_event(ev);
|
||||
}
|
||||
}
|
||||
|
|
@ -410,8 +410,8 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
ev->set_button_index(BUTTON_LEFT);
|
||||
ev->set_button_mask(BUTTON_MASK_LEFT);
|
||||
ev->set_pressed(true);
|
||||
ev->set_pos(touch[0].pos);
|
||||
ev->set_global_pos(touch[0].pos);
|
||||
ev->set_position(touch[0].pos);
|
||||
ev->set_global_position(touch[0].pos);
|
||||
input->set_mouse_position(Point2(touch[0].pos.x, touch[0].pos.y));
|
||||
last_mouse = touch[0].pos;
|
||||
input->parse_input_event(ev);
|
||||
|
|
@ -424,7 +424,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
ev.instance();
|
||||
ev->set_index(touch[i].id);
|
||||
ev->set_pressed(true);
|
||||
ev->set_pos(touch[i].pos.x);
|
||||
ev->set_position(touch[i].pos.x);
|
||||
input->parse_input_event(ev);
|
||||
}
|
||||
|
||||
|
|
@ -436,7 +436,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
Ref<InputEventMouseMotion> ev;
|
||||
ev.instance();
|
||||
ev->set_button_mask(BUTTON_MASK_LEFT);
|
||||
ev->set_pos(p_points[0].pos.x);
|
||||
ev->set_position(p_points[0].pos.x);
|
||||
input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
|
||||
ev->set_speed(input->get_last_mouse_speed());
|
||||
ev->set_relative(p_points[0].pos - last_mouse);
|
||||
|
|
@ -465,7 +465,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
Ref<InputEventScreenDrag> ev;
|
||||
ev.instance();
|
||||
ev->set_index(touch[i].id);
|
||||
ev->set_pos(p_points[idx].pos.x);
|
||||
ev->set_position(p_points[idx].pos.x);
|
||||
ev->set_relative(p_points[idx].pos - touch[i].pos);
|
||||
input->parse_input_event(ev);
|
||||
touch[i].pos = p_points[idx].pos;
|
||||
|
|
@ -481,8 +481,8 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
ev->set_button_index(BUTTON_LEFT);
|
||||
ev->set_button_mask(BUTTON_MASK_LEFT);
|
||||
ev->set_pressed(false);
|
||||
ev->set_pos(touch[0].pos.x);
|
||||
ev->set_global_pos(touch[0].pos.x);
|
||||
ev->set_position(touch[0].pos.x);
|
||||
ev->set_global_position(touch[0].pos.x);
|
||||
input->set_mouse_position(Point2(touch[0].pos.x, touch[0].pos.y));
|
||||
input->parse_input_event(ev);
|
||||
|
||||
|
|
@ -492,7 +492,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
ev.instance();
|
||||
ev->set_index(touch[i].id);
|
||||
ev->set_pressed(false);
|
||||
ev->set_pos(touch[i].pos);
|
||||
ev->set_position(touch[i].pos);
|
||||
input->parse_input_event(ev);
|
||||
}
|
||||
touch.clear();
|
||||
|
|
@ -511,7 +511,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
|
||||
ev->set_index(tp.id);
|
||||
ev->set_pressed(true);
|
||||
ev->set_pos(tp.pos);
|
||||
ev->set_position(tp.pos);
|
||||
input->parse_input_event(ev);
|
||||
|
||||
} break;
|
||||
|
|
@ -524,7 +524,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
|
|||
ev.instance();
|
||||
ev->set_index(touch[i].id);
|
||||
ev->set_pressed(false);
|
||||
ev->set_pos(touch[i].pos);
|
||||
ev->set_position(touch[i].pos);
|
||||
input->parse_input_event(ev);
|
||||
touch.remove(i);
|
||||
i--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue