diff options
| author | Andreas Haas | 2017-06-03 10:54:24 +0200 |
|---|---|---|
| committer | Andreas Haas | 2017-06-03 11:26:39 +0200 |
| commit | 9bc534896135322a578118f433f0dc6265839082 (patch) | |
| tree | 30316ffea9d6321c6b8292a02b6db3dac9cd1053 /editor/plugins/gradient_texture_editor_plugin.cpp | |
| parent | 5a6d4971e13157cc5f0de199de7f6d257070fc66 (diff) | |
| download | godot-9bc534896135322a578118f433f0dc6265839082.tar.gz godot-9bc534896135322a578118f433f0dc6265839082.tar.zst godot-9bc534896135322a578118f433f0dc6265839082.zip | |
InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
Diffstat (limited to 'editor/plugins/gradient_texture_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/gradient_texture_editor_plugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/plugins/gradient_texture_editor_plugin.cpp b/editor/plugins/gradient_texture_editor_plugin.cpp index 40f7de478..bc985dcdf 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 |
