diff options
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/base_button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/button_array.cpp | 4 | ||||
-rw-r--r-- | scene/gui/color_picker.cpp | 22 | ||||
-rw-r--r-- | scene/gui/color_ramp_edit.cpp | 10 | ||||
-rw-r--r-- | scene/gui/dialogs.cpp | 4 | ||||
-rw-r--r-- | scene/gui/graph_edit.cpp | 14 | ||||
-rw-r--r-- | scene/gui/graph_node.cpp | 4 | ||||
-rw-r--r-- | scene/gui/item_list.cpp | 8 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 4 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 10 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 4 | ||||
-rw-r--r-- | scene/gui/scroll_bar.cpp | 6 | ||||
-rw-r--r-- | scene/gui/slider.cpp | 4 | ||||
-rw-r--r-- | scene/gui/spin_box.cpp | 6 | ||||
-rw-r--r-- | scene/gui/split_container.cpp | 10 | ||||
-rw-r--r-- | scene/gui/tab_container.cpp | 2 | ||||
-rw-r--r-- | scene/gui/tabs.cpp | 4 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 12 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 14 |
19 files changed, 72 insertions, 72 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 318db8458b..c1dbc82f3c 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -162,7 +162,7 @@ void BaseButton::_gui_input(Ref<InputEvent> p_event) { if (mm.is_valid()) { if (status.press_attempt && status.pressing_button == 0) { bool last_press_inside = status.pressing_inside; - status.pressing_inside = has_point(mm->get_pos()); + status.pressing_inside = has_point(mm->get_position()); if (last_press_inside != status.pressing_inside) update(); } diff --git a/scene/gui/button_array.cpp b/scene/gui/button_array.cpp index 0d518059c8..670246a200 100644 --- a/scene/gui/button_array.cpp +++ b/scene/gui/button_array.cpp @@ -313,7 +313,7 @@ void ButtonArray::_gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) { - int ofs = orientation == HORIZONTAL ? mb->get_pos().x : mb->get_pos().y; + int ofs = orientation == HORIZONTAL ? mb->get_position().x : mb->get_position().y; for (int i = 0; i < buttons.size(); i++) { @@ -330,7 +330,7 @@ void ButtonArray::_gui_input(const Ref<InputEvent> &p_event) { if (mm.is_valid()) { - int ofs = orientation == HORIZONTAL ? mm->get_pos().x : mm->get_pos().y; + int ofs = orientation == HORIZONTAL ? mm->get_position().x : mm->get_position().y; int new_hover = -1; for (int i = 0; i < buttons.size(); i++) { diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 662ce63946..f0e486aa50 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -304,8 +304,8 @@ void ColorPicker::_uv_input(const Ref<InputEvent> &ev) { if (bev.is_valid()) { if (bev->is_pressed() && bev->get_button_index() == BUTTON_LEFT) { changing_color = true; - float x = CLAMP((float)bev->get_pos().x, 0, 256); - float y = CLAMP((float)bev->get_pos().y, 0, 256); + float x = CLAMP((float)bev->get_position().x, 0, 256); + float y = CLAMP((float)bev->get_position().y, 0, 256); s = x / 256; v = 1.0 - y / 256.0; color.set_hsv(h, s, v, color.a); @@ -323,8 +323,8 @@ void ColorPicker::_uv_input(const Ref<InputEvent> &ev) { if (mev.is_valid()) { if (!changing_color) return; - float x = CLAMP((float)mev->get_pos().x, 0, 256); - float y = CLAMP((float)mev->get_pos().y, 0, 256); + float x = CLAMP((float)mev->get_position().x, 0, 256); + float y = CLAMP((float)mev->get_position().y, 0, 256); s = x / 256; v = 1.0 - y / 256.0; color.set_hsv(h, s, v, color.a); @@ -343,7 +343,7 @@ void ColorPicker::_w_input(const Ref<InputEvent> &ev) { if (bev->is_pressed() && bev->get_button_index() == BUTTON_LEFT) { changing_color = true; - h = 1 - ((float)bev->get_pos().y) / 256.0; + h = 1 - ((float)bev->get_position().y) / 256.0; } else { changing_color = false; @@ -361,7 +361,7 @@ void ColorPicker::_w_input(const Ref<InputEvent> &ev) { if (!changing_color) return; - float y = CLAMP((float)mev->get_pos().y, 0, 256); + float y = CLAMP((float)mev->get_position().y, 0, 256); h = 1.0 - y / 256.0; color.set_hsv(h, s, v, color.a); last_hsv = color; @@ -378,10 +378,10 @@ void ColorPicker::_preset_input(const Ref<InputEvent> &ev) { if (bev.is_valid()) { if (bev->is_pressed() && bev->get_button_index() == BUTTON_LEFT) { - int index = bev->get_pos().x / (preset->get_size().x / presets.size()); + int index = bev->get_position().x / (preset->get_size().x / presets.size()); set_pick_color(presets[index]); } else if (bev->is_pressed() && bev->get_button_index() == BUTTON_RIGHT) { - int index = bev->get_pos().x / (preset->get_size().x / presets.size()); + int index = bev->get_position().x / (preset->get_size().x / presets.size()); presets.erase(presets[index]); _update_presets(); bt_add_preset->show(); @@ -394,7 +394,7 @@ void ColorPicker::_preset_input(const Ref<InputEvent> &ev) { if (mev.is_valid()) { - int index = mev->get_pos().x * presets.size(); + int index = mev->get_position().x * presets.size(); if (preset->get_size().x != 0) { index /= preset->get_size().x; } @@ -422,7 +422,7 @@ void ColorPicker::_screen_input(const Ref<InputEvent> &ev) { if (mev.is_valid()) { Viewport *r = get_tree()->get_root(); - if (!r->get_visible_rect().has_point(Point2(mev->get_global_pos().x, mev->get_global_pos().y))) + if (!r->get_visible_rect().has_point(Point2(mev->get_global_position().x, mev->get_global_position().y))) return; Ref<Image> img = r->get_screen_capture(); if (!img.is_null()) { @@ -431,7 +431,7 @@ void ColorPicker::_screen_input(const Ref<InputEvent> &ev) { } if (last_capture.is_valid() && !last_capture->empty()) { int pw = last_capture->get_format() == Image::FORMAT_RGBA8 ? 4 : 3; - int ofs = (mev->get_global_pos().y * last_capture->get_width() + mev->get_global_pos().x) * pw; + int ofs = (mev->get_global_position().y * last_capture->get_width() + mev->get_global_position().x) * pw; PoolVector<uint8_t>::Read r = last_capture->get_data().read(); diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp index 8c47f8559a..33e4ce0403 100644 --- a/scene/gui/color_ramp_edit.cpp +++ b/scene/gui/color_ramp_edit.cpp @@ -88,14 +88,14 @@ void ColorRampEdit::_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; @@ -109,7 +109,7 @@ void ColorRampEdit::_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) { @@ -134,7 +134,7 @@ void ColorRampEdit::_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. @@ -214,7 +214,7 @@ void ColorRampEdit::_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); diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 627bc96fb1..7b4f9d57f8 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -113,7 +113,7 @@ void WindowDialog::_gui_input(const Ref<InputEvent> &p_event) { if (mb->is_pressed()) { // Begin a possible dragging operation. - drag_type = _drag_hit_test(Point2(mb->get_pos().x, mb->get_pos().y)); + drag_type = _drag_hit_test(Point2(mb->get_position().x, mb->get_position().y)); if (drag_type != DRAG_NONE) drag_offset = get_global_mouse_position() - get_position(); drag_offset_far = get_position() + get_size() - get_global_mouse_position(); @@ -131,7 +131,7 @@ void WindowDialog::_gui_input(const Ref<InputEvent> &p_event) { // Update the cursor while moving along the borders. CursorShape cursor = CURSOR_ARROW; if (resizable) { - int preview_drag_type = _drag_hit_test(Point2(mm->get_pos().x, mm->get_pos().y)); + int preview_drag_type = _drag_hit_test(Point2(mm->get_position().x, mm->get_position().y)); switch (preview_drag_type) { case DRAG_RESIZE_TOP: case DRAG_RESIZE_BOTTOM: diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index c52cdd9325..b4d24d9cdd 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -374,7 +374,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) { Ref<Texture> port = get_icon("port", "GraphNode"); - Vector2 mpos(mb->get_pos().x, mb->get_pos().y); + Vector2 mpos(mb->get_position().x, mb->get_position().y); float grab_r = port->get_width() * 0.5 * grab_r_extend; for (int i = get_child_count() - 1; i >= 0; i--) { @@ -483,12 +483,12 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { Ref<InputEventMouseMotion> mm = p_ev; if (mm.is_valid() && connecting) { - connecting_to = mm->get_pos(); + connecting_to = mm->get_position(); connecting_target = false; top_layer->update(); Ref<Texture> port = get_icon("port", "GraphNode"); - Vector2 mpos = mm->get_pos(); + Vector2 mpos = mm->get_position(); float grab_r = port->get_width() * 0.5 * grab_r_extend; for (int i = get_child_count() - 1; i >= 0; i--) { @@ -546,7 +546,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) { } else if (!just_disconected) { String from = connecting_from; int from_slot = connecting_index; - Vector2 ofs = Vector2(mb->get_pos().x, mb->get_pos().y); + Vector2 ofs = Vector2(mb->get_position().x, mb->get_position().y); emit_signal("connection_to_empty", from, from_slot, ofs); } connecting = false; @@ -817,7 +817,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) { connecting = false; top_layer->update(); } else { - emit_signal("popup_request", b->get_global_pos()); + emit_signal("popup_request", b->get_global_position()); } } } @@ -880,7 +880,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) { if (gn) { - if (_filter_input(b->get_pos())) + if (_filter_input(b->get_position())) return; dragging = true; @@ -905,7 +905,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) { } } else { - if (_filter_input(b->get_pos())) + if (_filter_input(b->get_position())) return; if (Input::get_singleton()->is_key_pressed(KEY_SPACE)) return; diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index fb0ff4f320..6d49e6251d 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -586,7 +586,7 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) { if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) { - Vector2 mpos = Vector2(mb->get_pos().x, mb->get_pos().y); + Vector2 mpos = Vector2(mb->get_position().x, mb->get_position().y); if (close_rect.size != Size2() && close_rect.has_point(mpos)) { emit_signal("close_request"); accept_event(); @@ -616,7 +616,7 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) { Ref<InputEventMouseMotion> mm = p_ev; if (resizing && mm.is_valid()) { - Vector2 mpos = mm->get_pos(); + Vector2 mpos = mm->get_position(); Vector2 diff = mpos - resizing_from; diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index a9f063280b..2cde3d1c5a 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -431,7 +431,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid() && (mb->get_button_index() == BUTTON_LEFT || (allow_rmb_select && mb->get_button_index() == BUTTON_RIGHT)) && mb->is_pressed()) { search_string = ""; //any mousepress cancels - Vector2 pos(mb->get_pos().x, mb->get_pos().y); + Vector2 pos(mb->get_position().x, mb->get_position().y); Ref<StyleBox> bg = get_stylebox("bg"); pos -= bg->get_offset(); pos.y += scroll_bar->get_value(); @@ -475,7 +475,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) { if (mb->get_button_index() == BUTTON_RIGHT) { - emit_signal("item_rmb_selected", i, Vector2(mb->get_pos().x, mb->get_pos().y)); + emit_signal("item_rmb_selected", i, Vector2(mb->get_position().x, mb->get_position().y)); } } else { @@ -486,7 +486,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) { if (items[i].selected && mb->get_button_index() == BUTTON_RIGHT) { - emit_signal("item_rmb_selected", i, Vector2(mb->get_pos().x, mb->get_pos().y)); + emit_signal("item_rmb_selected", i, Vector2(mb->get_position().x, mb->get_position().y)); } else { bool selected = !items[i].selected; @@ -501,7 +501,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) { if (mb->get_button_index() == BUTTON_RIGHT) { - emit_signal("item_rmb_selected", i, Vector2(mb->get_pos().x, mb->get_pos().y)); + emit_signal("item_rmb_selected", i, Vector2(mb->get_position().x, mb->get_position().y)); } else if (/*select_mode==SELECT_SINGLE &&*/ mb->is_doubleclick()) { emit_signal("item_activated", i); diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 38debe8a77..bc579020bd 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -64,7 +64,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { shift_selection_check_pre(b->get_shift()); - set_cursor_at_pixel_pos(b->get_pos().x); + set_cursor_at_pixel_pos(b->get_position().x); if (b->get_shift()) { @@ -118,7 +118,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { if (m->get_button_mask() & BUTTON_LEFT) { if (selection.creating) { - set_cursor_at_pixel_pos(m->get_pos().x); + set_cursor_at_pixel_pos(m->get_position().x); selection_fill_at_cursor(); } } diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 985d9addc9..0301a99600 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -284,7 +284,7 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { //update hover Ref<InputEventMouseMotion> ie; ie.instance(); - ie->set_pos(b->get_pos() + Vector2(0, s)); + ie->set_position(b->get_position() + Vector2(0, s)); _gui_input(ie); } } break; @@ -303,13 +303,13 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { //update hover Ref<InputEventMouseMotion> ie; ie.instance(); - ie->set_pos(b->get_pos() - Vector2(0, s)); + ie->set_position(b->get_position() - Vector2(0, s)); _gui_input(ie); } } break; case BUTTON_LEFT: { - int over = _get_mouse_over(b->get_pos()); + int over = _get_mouse_over(b->get_position()); if (invalidated_click) { invalidated_click = false; @@ -348,13 +348,13 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { for (List<Rect2>::Element *E = autohide_areas.front(); E; E = E->next()) { - if (!Rect2(Point2(), get_size()).has_point(m->get_pos()) && E->get().has_point(m->get_pos())) { + if (!Rect2(Point2(), get_size()).has_point(m->get_position()) && E->get().has_point(m->get_position())) { call_deferred("hide"); return; } } - int over = _get_mouse_over(m->get_pos()); + int over = _get_mouse_over(m->get_position()); int id = (over < 0 || items[over].separator || items[over].disabled) ? -1 : (items[over].ID >= 0 ? items[over].ID : over); if (id < 0) { diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index a618810c11..d3a49b06d5 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -751,7 +751,7 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event) { Item *item = NULL; bool outside; - _find_click(main, b->get_pos(), &item, &line, &outside); + _find_click(main, b->get_position(), &item, &line, &outside); if (item) { @@ -852,7 +852,7 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event) { int line = 0; Item *item = NULL; - _find_click(main, m->get_pos(), &item, &line); + _find_click(main, m->get_position(), &item, &line); if (!item) return; // do not update diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 27a16ccc33..1143bdcde2 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -72,7 +72,7 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) { if (b->is_pressed()) { - double ofs = orientation == VERTICAL ? b->get_pos().y : b->get_pos().x; + double ofs = orientation == VERTICAL ? b->get_position().y : b->get_position().x; Ref<Texture> decr = get_icon("decrement"); Ref<Texture> incr = get_icon("increment"); @@ -130,7 +130,7 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) { if (drag.active) { - double ofs = orientation == VERTICAL ? m->get_pos().y : m->get_pos().x; + double ofs = orientation == VERTICAL ? m->get_position().y : m->get_position().x; Ref<Texture> decr = get_icon("decrement"); double decr_size = orientation == VERTICAL ? decr->get_height() : decr->get_width(); @@ -141,7 +141,7 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) { set_as_ratio(drag.value_at_click + diff); } else { - double ofs = orientation == VERTICAL ? m->get_pos().y : m->get_pos().x; + double ofs = orientation == VERTICAL ? m->get_position().y : m->get_position().x; Ref<Texture> decr = get_icon("decrement"); Ref<Texture> incr = get_icon("increment"); diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index ae2bf0999e..d0e708bf73 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -46,7 +46,7 @@ void Slider::_gui_input(Ref<InputEvent> p_event) { if (mb->is_pressed()) { Ref<Texture> grabber = get_icon(mouse_inside || has_focus() ? "grabber_highlight" : "grabber"); - grab.pos = orientation == VERTICAL ? mb->get_pos().y : mb->get_pos().x; + grab.pos = orientation == VERTICAL ? mb->get_position().y : mb->get_position().x; double grab_width = (double)grabber->get_size().width; double grab_height = (double)grabber->get_size().height; @@ -75,7 +75,7 @@ void Slider::_gui_input(Ref<InputEvent> p_event) { Size2i size = get_size(); Ref<Texture> grabber = get_icon("grabber"); - float motion = (orientation == VERTICAL ? mm->get_pos().y : mm->get_pos().x) - grab.pos; + float motion = (orientation == VERTICAL ? mm->get_position().y : mm->get_position().x) - grab.pos; if (orientation == VERTICAL) motion = -motion; float areasize = orientation == VERTICAL ? size.height - grabber->get_size().height : size.width - grabber->get_size().width; diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 2eb2028391..c5b9df15b9 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -96,7 +96,7 @@ void SpinBox::_gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid() && mb->is_pressed()) { - bool up = mb->get_pos().y < (get_size().height / 2); + bool up = mb->get_position().y < (get_size().height / 2); switch (mb->get_button_index()) { @@ -135,7 +135,7 @@ void SpinBox::_gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == 1) { //set_default_cursor_shape(CURSOR_VSIZE); - Vector2 cpos = Vector2(mb->get_pos().x, mb->get_pos().y); + Vector2 cpos = Vector2(mb->get_position().x, mb->get_position().y); drag.mouse_pos = cpos; } @@ -155,7 +155,7 @@ void SpinBox::_gui_input(const Ref<InputEvent> &p_event) { if (mm.is_valid() && mm->get_button_mask() & 1) { - Vector2 cpos = mm->get_pos(); + Vector2 cpos = mm->get_position(); if (drag.enabled) { diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index 91fd18e2ed..31236fa277 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -286,16 +286,16 @@ void SplitContainer::_gui_input(const Ref<InputEvent> &p_event) { if (vertical) { - if (mb->get_pos().y > middle_sep && mb->get_pos().y < middle_sep + sep) { + if (mb->get_position().y > middle_sep && mb->get_position().y < middle_sep + sep) { dragging = true; - drag_from = mb->get_pos().y; + drag_from = mb->get_position().y; drag_ofs = expand_ofs; } } else { - if (mb->get_pos().x > middle_sep && mb->get_pos().x < middle_sep + sep) { + if (mb->get_position().x > middle_sep && mb->get_position().x < middle_sep + sep) { dragging = true; - drag_from = mb->get_pos().x; + drag_from = mb->get_position().x; drag_ofs = expand_ofs; } } @@ -312,7 +312,7 @@ void SplitContainer::_gui_input(const Ref<InputEvent> &p_event) { if (dragging) { - expand_ofs = drag_ofs + ((vertical ? mm->get_pos().y : mm->get_pos().x) - drag_from); + expand_ofs = drag_ofs + ((vertical ? mm->get_position().y : mm->get_position().x) - drag_from); queue_sort(); emit_signal("dragged", get_split_offset()); } diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 6bbfa1aeb0..5e60e0a43f 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -69,7 +69,7 @@ void TabContainer::_gui_input(const Ref<InputEvent> &p_event) { if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) { - Point2 pos(mb->get_pos().x, mb->get_pos().y); + Point2 pos(mb->get_position().x, mb->get_position().y); Size2 size = get_size(); // Click must be on tabs in the tab header area. diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index d94c33e408..c5a921bb0a 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -85,7 +85,7 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) { if (mm.is_valid()) { - Point2 pos = mm->get_pos(); + Point2 pos = mm->get_position(); highlight_arrow = -1; if (buttons_visible) { @@ -165,7 +165,7 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) { mb->get_button_index() == BUTTON_LEFT) { // clicks - Point2 pos(mb->get_pos().x, mb->get_pos().y); + Point2 pos(mb->get_position().x, mb->get_position().y); if (buttons_visible) { diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 4989a3d863..e4f63115d4 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1445,7 +1445,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { Ref<InputEventMouseButton> mb = p_gui_input; if (mb.is_valid()) { - if (completion_active && completion_rect.has_point(mb->get_pos())) { + if (completion_active && completion_rect.has_point(mb->get_position())) { if (!mb->is_pressed()) return; @@ -1468,7 +1468,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { if (mb->get_button_index() == BUTTON_LEFT) { - completion_index = CLAMP(completion_line_ofs + (mb->get_pos().y - completion_rect.pos.y) / get_row_height(), 0, completion_options.size() - 1); + completion_index = CLAMP(completion_line_ofs + (mb->get_position().y - completion_rect.pos.y) / get_row_height(), 0, completion_options.size() - 1); completion_current = completion_options[completion_index]; update(); @@ -1500,7 +1500,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { _reset_caret_blink_timer(); int row, col; - _get_mouse_pos(Point2i(mb->get_pos().x, mb->get_pos().y), row, col); + _get_mouse_pos(Point2i(mb->get_position().x, mb->get_position().y), row, col); if (mb->get_command() && highlighted_word != String()) { @@ -1511,7 +1511,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { // toggle breakpoint on gutter click if (draw_breakpoint_gutter) { int gutter = cache.style_normal->get_margin(MARGIN_LEFT); - if (mb->get_pos().x > gutter && mb->get_pos().x <= gutter + cache.breakpoint_gutter_width + 3) { + if (mb->get_position().x > gutter && mb->get_position().x <= gutter + cache.breakpoint_gutter_width + 3) { set_line_as_breakpoint(row, !is_line_set_as_breakpoint(row)); emit_signal("breakpoint_toggled", row); return; @@ -1646,7 +1646,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { if (select_identifiers_enabled) { if (mm->get_command() && mm->get_button_mask() == 0) { - String new_word = get_word_at_pos(mm->get_pos()); + String new_word = get_word_at_pos(mm->get_position()); if (new_word != highlighted_word) { highlighted_word = new_word; update(); @@ -1666,7 +1666,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { _reset_caret_blink_timer(); int row, col; - _get_mouse_pos(mm->get_pos(), row, col); + _get_mouse_pos(mm->get_position(), row, col); select(selection.selecting_line, selection.selecting_column, row, col); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index b17192fe4f..397386700e 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2122,7 +2122,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { Ref<StyleBox> bg = cache.bg; - Point2 pos = mm->get_pos() - bg->get_offset(); + Point2 pos = mm->get_position() - bg->get_offset(); Cache::ClickType old_hover = cache.hover_type; int old_index = cache.hover_index; @@ -2150,7 +2150,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { if (drop_mode_flags && root) { - Point2 mpos = mm->get_pos(); + Point2 mpos = mm->get_position(); mpos -= cache.bg->get_offset(); mpos.y -= _get_title_button_height(); if (mpos.y >= 0) { @@ -2180,7 +2180,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { if (!range_drag_enabled) { - Vector2 cpos = mm->get_pos(); + Vector2 cpos = mm->get_position(); if (cpos.distance_to(pressing_pos) > 2) { range_drag_enabled = true; range_drag_capture_pos = cpos; @@ -2217,7 +2217,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { if (b->get_button_index() == BUTTON_LEFT) { - Point2 pos = b->get_pos() - cache.bg->get_offset(); + Point2 pos = b->get_position() - cache.bg->get_offset(); if (show_column_titles) { pos.y -= _get_title_button_height(); @@ -2251,7 +2251,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { warp_mouse(range_drag_capture_pos); } else { Rect2 rect = get_selected()->get_meta("__focus_rect"); - if (rect.has_point(Point2(b->get_pos().x, b->get_pos().y))) { + if (rect.has_point(Point2(b->get_position().x, b->get_position().y))) { edit_selected(); } else { emit_signal("item_double_clicked"); @@ -2295,7 +2295,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { case BUTTON_LEFT: { Ref<StyleBox> bg = cache.bg; - Point2 pos = b->get_pos() - bg->get_offset(); + Point2 pos = b->get_position() - bg->get_offset(); cache.click_type = Cache::CLICK_NONE; if (show_column_titles && b->get_button_index() == BUTTON_LEFT) { pos.y -= _get_title_button_height(); @@ -2333,7 +2333,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { blocked--; if (pressing_for_editor) { - pressing_pos = b->get_pos(); + pressing_pos = b->get_position(); } if (b->get_button_index() == BUTTON_RIGHT) |