1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-20 14:45:44 +00:00

InputEvent: Renamed "pos" property to "position"

Make the naming consistent with other classes.
This commit is contained in:
Andreas Haas
2017-06-03 10:54:24 +02:00
parent 5a6d4971e1
commit 9bc5348961
51 changed files with 282 additions and 282 deletions

View File

@@ -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