aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/gradient_texture_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/gradient_texture_editor_plugin.cpp')
-rw-r--r--editor/plugins/gradient_texture_editor_plugin.cpp10
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