summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/bind/core_bind.cpp6
-rw-r--r--core/bind/core_bind.h2
-rw-r--r--core/os/input.cpp2
-rw-r--r--core/os/input.h2
-rw-r--r--core/os/os.h2
-rw-r--r--doc/base/classes.xml16
-rw-r--r--drivers/unix/os_unix.h2
-rw-r--r--editor/animation_editor.cpp18
-rw-r--r--editor/call_dialog.cpp4
-rw-r--r--editor/code_editor.cpp2
-rw-r--r--editor/editor_audio_buses.cpp8
-rw-r--r--editor/editor_node.cpp18
-rw-r--r--editor/editor_path.cpp2
-rw-r--r--editor/filesystem_dock.cpp4
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp6
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp46
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp36
-rw-r--r--editor/plugins/cube_grid_theme_editor_plugin.cpp2
-rw-r--r--editor/plugins/gradient_texture_editor_plugin.cpp2
-rw-r--r--editor/plugins/sample_editor_plugin.cpp4
-rw-r--r--editor/plugins/sample_library_editor_plugin.cpp2
-rw-r--r--editor/plugins/sample_player_editor_plugin.cpp4
-rw-r--r--editor/plugins/script_text_editor.cpp8
-rw-r--r--editor/plugins/shader_editor_plugin.cpp4
-rw-r--r--editor/plugins/shader_graph_editor_plugin.cpp16
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp20
-rw-r--r--editor/plugins/stream_editor_plugin.cpp2
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp4
-rw-r--r--editor/plugins/theme_editor_plugin.cpp28
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp2
-rw-r--r--editor/project_manager.cpp8
-rw-r--r--editor/project_settings.cpp6
-rw-r--r--editor/property_editor.cpp42
-rw-r--r--editor/reparent_dialog.cpp2
-rw-r--r--editor/scene_tree_dock.cpp8
-rw-r--r--editor/scene_tree_editor.cpp8
-rw-r--r--main/input_default.cpp10
-rw-r--r--main/input_default.h4
-rw-r--r--main/tests/test_gui.cpp36
-rw-r--r--modules/gdnative/gdnative.cpp24
-rw-r--r--modules/visual_script/visual_script_editor.cpp6
-rw-r--r--platform/android/os_android.cpp8
-rw-r--r--platform/android/os_android.h2
-rw-r--r--platform/bb10/os_bb10.cpp4
-rw-r--r--platform/bb10/os_bb10.h2
-rw-r--r--platform/haiku/haiku_direct_window.cpp2
-rw-r--r--platform/haiku/os_haiku.cpp2
-rw-r--r--platform/haiku/os_haiku.h2
-rw-r--r--platform/iphone/os_iphone.cpp6
-rw-r--r--platform/iphone/os_iphone.h2
-rw-r--r--platform/javascript/os_javascript.cpp8
-rw-r--r--platform/javascript/os_javascript.h2
-rw-r--r--platform/osx/os_osx.h2
-rw-r--r--platform/osx/os_osx.mm4
-rw-r--r--platform/server/os_server.cpp2
-rw-r--r--platform/server/os_server.h2
-rw-r--r--platform/uwp/os_uwp.cpp2
-rw-r--r--platform/uwp/os_uwp.h2
-rw-r--r--platform/windows/os_windows.cpp4
-rw-r--r--platform/windows/os_windows.h2
-rw-r--r--platform/x11/os_x11.cpp6
-rw-r--r--platform/x11/os_x11.h2
-rw-r--r--scene/2d/canvas_item.cpp8
-rw-r--r--scene/2d/canvas_item.h2
-rw-r--r--scene/animation/animation_player.cpp2
-rw-r--r--scene/gui/color_picker.cpp2
-rw-r--r--scene/gui/color_ramp_edit.cpp2
-rw-r--r--scene/gui/container.cpp2
-rw-r--r--scene/gui/control.cpp34
-rw-r--r--scene/gui/control.h8
-rw-r--r--scene/gui/dialogs.cpp16
-rw-r--r--scene/gui/graph_edit.cpp20
-rw-r--r--scene/gui/line_edit.cpp2
-rw-r--r--scene/gui/menu_button.cpp6
-rw-r--r--scene/gui/option_button.cpp2
-rw-r--r--scene/gui/popup.cpp16
-rw-r--r--scene/gui/popup_menu.cpp18
-rw-r--r--scene/gui/tab_container.cpp4
-rw-r--r--scene/gui/text_edit.cpp4
-rw-r--r--scene/gui/tree.cpp24
-rw-r--r--scene/io/resource_format_wav.cpp2
-rw-r--r--scene/main/viewport.cpp14
-rw-r--r--scene/main/viewport.h2
83 files changed, 342 insertions, 344 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 7523d30e18..bd41e48a30 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -163,9 +163,9 @@ _ResourceSaver::_ResourceSaver() {
/////////////////OS
-Point2 _OS::get_mouse_pos() const {
+Point2 _OS::get_mouse_position() const {
- return OS::get_singleton()->get_mouse_pos();
+ return OS::get_singleton()->get_mouse_position();
}
void _OS::set_window_title(const String &p_title) {
@@ -954,7 +954,7 @@ _OS *_OS::singleton = NULL;
void _OS::_bind_methods() {
- //ClassDB::bind_method(D_METHOD("get_mouse_pos"),&_OS::get_mouse_pos);
+ //ClassDB::bind_method(D_METHOD("get_mouse_position"),&_OS::get_mouse_position);
//ClassDB::bind_method(D_METHOD("is_mouse_grab_enabled"),&_OS::is_mouse_grab_enabled);
ClassDB::bind_method(D_METHOD("set_clipboard", "clipboard"), &_OS::set_clipboard);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index ab27296b27..222339bce1 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -120,7 +120,7 @@ public:
MONTH_DECEMBER
};
- Point2 get_mouse_pos() const;
+ Point2 get_mouse_position() const;
void set_window_title(const String &p_title);
int get_mouse_button_state() const;
diff --git a/core/os/input.cpp b/core/os/input.cpp
index 6215ad3732..bc388d0bca 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -75,7 +75,7 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_accelerometer"), &Input::get_accelerometer);
ClassDB::bind_method(D_METHOD("get_magnetometer"), &Input::get_magnetometer);
ClassDB::bind_method(D_METHOD("get_gyroscope"), &Input::get_gyroscope);
- //ClassDB::bind_method(D_METHOD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want
+ //ClassDB::bind_method(D_METHOD("get_mouse_position"),&Input::get_mouse_position); - this is not the function you want
ClassDB::bind_method(D_METHOD("get_last_mouse_speed"), &Input::get_last_mouse_speed);
ClassDB::bind_method(D_METHOD("get_mouse_button_mask"), &Input::get_mouse_button_mask);
ClassDB::bind_method(D_METHOD("set_mouse_mode", "mode"), &Input::set_mouse_mode);
diff --git a/core/os/input.h b/core/os/input.h
index 4b297a7eef..4f26f097c2 100644
--- a/core/os/input.h
+++ b/core/os/input.h
@@ -77,7 +77,7 @@ public:
virtual void start_joy_vibration(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration = 0) = 0;
virtual void stop_joy_vibration(int p_device) = 0;
- virtual Point2 get_mouse_pos() const = 0;
+ virtual Point2 get_mouse_position() const = 0;
virtual Point2 get_last_mouse_speed() const = 0;
virtual int get_mouse_button_mask() const = 0;
diff --git a/core/os/os.h b/core/os/os.h
index 0abc91e35e..ff2a24f40d 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -144,7 +144,7 @@ public:
virtual MouseMode get_mouse_mode() const;
virtual void warp_mouse_pos(const Point2 &p_to) {}
- virtual Point2 get_mouse_pos() const = 0;
+ virtual Point2 get_mouse_position() const = 0;
virtual int get_mouse_button_state() const = 0;
virtual void set_window_title(const String &p_title) = 0;
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index f108a48310..7f9bb4a972 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -2985,7 +2985,7 @@
Return the default blend time between animations.
</description>
</method>
- <method name="get_pos" qualifiers="const">
+ <method name="get_position" qualifiers="const">
<return type="float">
</return>
<description>
@@ -6005,7 +6005,7 @@
<description>
</description>
</method>
- <method name="get_pos">
+ <method name="get_position">
<return type="float">
</return>
<description>
@@ -8357,7 +8357,7 @@
Get the transform matrix of this item's canvas.
</description>
</method>
- <method name="get_global_mouse_pos" qualifiers="const">
+ <method name="get_global_mouse_position" qualifiers="const">
<return type="Vector2">
</return>
<description>
@@ -10847,7 +10847,7 @@
<description>
</description>
</method>
- <method name="get_pos" qualifiers="const">
+ <method name="get_position" qualifiers="const">
<return type="Vector2">
</return>
<description>
@@ -11174,7 +11174,7 @@
Set when the control is ignoring mouse events (even touchpad events send mouse events). (see the MOUSE_FILTER_* constants)
</description>
</method>
- <method name="set_pos">
+ <method name="set_position">
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
@@ -14872,7 +14872,7 @@
Get a [String] saved in Pascal format from the file.
</description>
</method>
- <method name="get_pos" qualifiers="const">
+ <method name="get_position" qualifiers="const">
<return type="int">
</return>
<description>
@@ -41788,7 +41788,7 @@
<description>
</description>
</method>
- <method name="get_pos" qualifiers="const">
+ <method name="get_position" qualifiers="const">
<return type="int">
</return>
<description>
@@ -48846,7 +48846,7 @@ do_property].
Get whether the rendered texture has filters enabled.
</description>
</method>
- <method name="get_mouse_pos" qualifiers="const">
+ <method name="get_mouse_position" qualifiers="const">
<return type="Vector2">
</return>
<description>
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 206559ab3d..67eb5cefdf 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -76,7 +76,7 @@ public:
//virtual void set_mouse_show(bool p_show);
//virtual void set_mouse_grab(bool p_grab);
//virtual bool is_mouse_grab_enabled() const = 0;
- //virtual void get_mouse_pos(int &x, int &y) const;
+ //virtual void get_mouse_position(int &x, int &y) const;
//virtual void set_window_title(const String& p_title);
//virtual void set_video_mode(const VideoMode& p_video_mode);
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index 16606b5d12..447f57a73f 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -1724,7 +1724,7 @@ bool AnimationKeyEditor::_edit_if_single_selection() {
curve_edit->set_transition(animation->track_get_key_transition(idx, key));
/*key_edit_dialog->set_size( Size2( 200,200) );
- key_edit_dialog->set_pos( track_editor->get_global_pos() + ofs + mpos +Point2(-100,20));
+ key_edit_dialog->set_position( track_editor->get_global_position() + ofs + mpos +Point2(-100,20));
key_edit_dialog->popup();*/
}
@@ -1983,7 +1983,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
track_menu->add_item(TTR("Duplicate Transposed"), RIGHT_MENU_DUPLICATE_TRANSPOSE);
track_menu->add_item(TTR("Remove Selection"), RIGHT_MENU_REMOVE);
- track_menu->set_pos(te->get_global_pos() + mpos);
+ track_menu->set_position(te->get_global_position() + mpos);
interp_editing = -1;
cont_editing = -1;
@@ -2064,7 +2064,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
Rect2 area(ofs.x, ofs.y + ((int(mpos.y) / h) + 1) * h, name_limit, h);
track_name->set_text(animation->track_get_path(idx));
- track_name->set_pos(te->get_global_pos() + area.pos);
+ track_name->set_position(te->get_global_position() + area.pos);
track_name->set_size(area.size);
track_name->show_modal();
track_name->grab_focus();
@@ -2214,7 +2214,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
int popup_x = size.width - track_ofs[1];
- track_menu->set_pos(te->get_global_pos() + Point2(popup_x, popup_y));
+ track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
wrap_editing = idx;
interp_editing = -1;
@@ -2237,7 +2237,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
int popup_x = size.width - track_ofs[2];
- track_menu->set_pos(te->get_global_pos() + Point2(popup_x, popup_y));
+ track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
interp_editing = idx;
cont_editing = -1;
@@ -2260,7 +2260,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
int popup_x = size.width - track_ofs[3];
- track_menu->set_pos(te->get_global_pos() + Point2(popup_x, popup_y));
+ track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
interp_editing = -1;
wrap_editing = -1;
@@ -2309,7 +2309,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
cvi_track = idx;
cvi_pos = pos;
- type_menu->set_pos(get_global_pos() + mpos + ofs);
+ type_menu->set_position(get_global_position() + mpos + ofs);
type_menu->popup();
return;
}
@@ -3749,7 +3749,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
root = NULL;
//menu = memnew( MenuButton );
//menu->set_flat(true);
- //menu->set_pos(Point2());
+ //menu->set_position(Point2());
//add_child(menu);
zoomicon = memnew(TextureRect);
@@ -3891,7 +3891,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
/* l = memnew( Label );
l->set_text("Base: ");
- l->set_pos(Point2(0,3));
+ l->set_position(Point2(0,3));
//dr_panel->add_child(l);*/
//menu->get_popup()->connect("id_pressed",this,"_menu_callback");
diff --git a/editor/call_dialog.cpp b/editor/call_dialog.cpp
index d2b46863b0..8cf9ed6ef4 100644
--- a/editor/call_dialog.cpp
+++ b/editor/call_dialog.cpp
@@ -290,8 +290,8 @@ CallDialog::CallDialog() {
property_editor->hide_top_label();
add_child(property_editor);
- method_label = memnew( Label );
- method_label->set_pos( Point2( 15,25) );
+ method_label = memnew(Label);
+ method_label->set_position(Point2( 15,25));
method_label->set_text(TTR("Method List:"));
add_child(method_label);
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index cc20912612..20525dd028 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -64,7 +64,7 @@ GotoLineDialog::GotoLineDialog() {
set_title(TTR("Go to Line"));
Label *l = memnew(Label);
l->set_text(TTR("Line Number:"));
- l->set_pos(Point2(5, 5));
+ l->set_position(Point2(5, 5));
add_child(l);
line = memnew(LineEdit);
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 67d9977149..6ef32a6afd 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -342,7 +342,7 @@ void EditorAudioBus::_effect_edited() {
if (effect->get_metadata(0) == Variant()) {
Rect2 area = effects->get_item_rect(effect);
- effect_options->set_pos(effects->get_global_pos() + area.pos + Vector2(0, area.size.y));
+ effect_options->set_position(effects->get_global_position() + area.pos + Vector2(0, area.size.y));
effect_options->popup();
//add effect
} else {
@@ -394,7 +394,7 @@ void EditorAudioBus::_gui_input(const InputEvent &p_event) {
if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 2 && p_event.mouse_button.pressed) {
Vector2 pos = Vector2(p_event.mouse_button.x, p_event.mouse_button.y);
- delete_popup->set_pos(get_global_pos() + pos);
+ delete_popup->set_position(get_global_position() + pos);
delete_popup->popup();
}
}
@@ -420,7 +420,7 @@ Variant EditorAudioBus::get_drag_data(const Point2 &p_point) {
c->add_child(p);
p->add_style_override("panel", get_stylebox("focus", "Button"));
p->set_size(get_size());
- p->set_pos(-p_point);
+ p->set_position(-p_point);
set_drag_preview(c);
Dictionary d;
d["type"] = "move_audio_bus";
@@ -576,7 +576,7 @@ void EditorAudioBus::_effect_rmb(const Vector2 &p_pos) {
if (item->get_metadata(0).get_type() != Variant::INT)
return;
- delete_effect_popup->set_pos(get_global_mouse_pos());
+ delete_effect_popup->set_position(get_global_mouse_position());
delete_effect_popup->popup();
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 06f1b9a673..9baa203790 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -236,7 +236,7 @@ void EditorNode::_notification(int p_what) {
Rect2 grect = scene_root_base->get_global_rect();
Rect2 grectsrp = scene_root_parent->get_global_rect();
if (grect!=grectsrp) {
- scene_root_parent->set_pos(grect.pos);
+ scene_root_parent->set_position(grect.pos);
scene_root_parent->set_size(grect.size);
}
}
@@ -4469,7 +4469,7 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) {
p_from->set_drag_preview(drag_control); //wait until it enters scene
- label->set_pos(Point2((preview->get_width() - label->get_minimum_size().width) / 2, preview->get_height()));
+ label->set_position(Point2((preview->get_width() - label->get_minimum_size().width) / 2, preview->get_height()));
Dictionary drag_data;
drag_data["type"] = "resource";
@@ -5152,7 +5152,7 @@ EditorNode::EditorNode() {
//left_menu_hb->add_child( prev_scene );
prev_scene->connect("pressed", this, "_menu_option", make_binds(FILE_OPEN_PREV));
gui_base->add_child(prev_scene);
- prev_scene->set_pos(Point2(3, 24));
+ prev_scene->set_position(Point2(3, 24));
prev_scene->hide();
ED_SHORTCUT("editor/next_tab", TTR("Next tab"), KEY_MASK_CMD + KEY_TAB);
@@ -5232,7 +5232,7 @@ EditorNode::EditorNode() {
#if 0
node_menu = memnew( MenuButton );
node_menu->set_text("Node");
- node_menu->set_pos( Point2( 50,0) );
+ node_menu->set_position( Point2( 50,0) );
menu_panel->add_child( node_menu );
p=node_menu->get_popup();
@@ -5253,7 +5253,7 @@ EditorNode::EditorNode() {
resource_menu = memnew( MenuButton );
resource_menu->set_text("Resource");
- resource_menu->set_pos( Point2( 90,0) );
+ resource_menu->set_position( Point2( 90,0) );
menu_panel->add_child( resource_menu );
#endif
@@ -5288,7 +5288,7 @@ EditorNode::EditorNode() {
//Separator *s1 = memnew( VSeparator );
//menu_panel->add_child(s1);
- //s1->set_pos(Point2(210,4));
+ //s1->set_position(Point2(210,4));
//s1->set_size(Point2(10,15));
play_cc = memnew(CenterContainer);
@@ -5403,7 +5403,7 @@ EditorNode::EditorNode() {
/*
run_settings_button = memnew( ToolButton );
menu_panel->add_child(run_settings_button);
- run_settings_button->set_pos(Point2(305,0));
+ run_settings_button->set_position(Point2(305,0));
run_settings_button->set_focus_mode(Control::FOCUS_NONE);
run_settings_button->set_icon(gui_base->get_icon("Run","EditorIcons"));
run_settings_button->connect("pressed", this,"_menu_option",make_binds(RUN_SETTINGS));
@@ -5496,7 +5496,7 @@ EditorNode::EditorNode() {
/*
Separator *s2 = memnew( VSeparator );
menu_panel->add_child(s2);
- s2->set_pos(Point2(338,4));
+ s2->set_position(Point2(338,4));
s2->set_size(Point2(10,15));
*/
@@ -5728,7 +5728,7 @@ EditorNode::EditorNode() {
/*
animation_menu = memnew( ToolButton );
- animation_menu->set_pos(Point2(500,0));
+ animation_menu->set_position(Point2(500,0));
animation_menu->set_size(Size2(20,20));
animation_menu->set_toggle_mode(true);
animation_menu->set_focus_mode(Control::FOCUS_NONE);
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 33dc30fb73..98e0808ba5 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -80,7 +80,7 @@ void EditorPath::_gui_input(const InputEvent &p_event) {
objects.clear();
popup->clear();
_add_children_to_popup(obj);
- popup->set_pos(get_global_pos() + Vector2(0, get_size().height));
+ popup->set_position(get_global_position() + Vector2(0, get_size().height));
popup->set_size(Size2(get_size().width, 1));
popup->popup();
}
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 79bce2c150..9d10117418 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1102,7 +1102,7 @@ void FileSystemDock::_dir_rmb_pressed(const Vector2 &p_pos) {
folder_options->add_item(TTR("Expand all"), FOLDER_EXPAND_ALL);
folder_options->add_item(TTR("Collapse all"), FOLDER_COLLAPSE_ALL);
- folder_options->set_pos(tree->get_global_pos() + p_pos);
+ folder_options->set_position(tree->get_global_position() + p_pos);
folder_options->popup();
}
@@ -1526,7 +1526,7 @@ void FileSystemDock::_files_list_rmb_select(int p_item, const Vector2 &p_pos) {
*/
}
- file_options->set_pos(files->get_global_pos() + p_pos);
+ file_options->set_position(files->get_global_position() + p_pos);
file_options->popup();
}
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index c79bdef71d..0be7b202a8 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -87,7 +87,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
}
last_active = player->is_playing();
- //seek->set_val(player->get_pos());
+ //seek->set_val(player->get_position());
updating = false;
}
@@ -1386,13 +1386,13 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
add_child(name_dialog);
name = memnew(LineEdit);
name_dialog->add_child(name);
- name->set_pos(Point2(18, 30));
+ name->set_position(Point2(18, 30));
name->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 10);
name_dialog->register_text_enter(name);
l = memnew(Label);
l->set_text(TTR("Animation Name:"));
- l->set_pos(Point2(10, 10));
+ l->set_position(Point2(10, 10));
name_dialog->add_child(l);
name_title = l;
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index eb669f95b5..e126cdf40f 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -261,12 +261,12 @@ void AnimationTreeEditor::_popup_edit_dialog() {
Ref<StyleBox> style = get_stylebox("panel", "PopupMenu");
Size2 size = get_node_size(edited_node);
Point2 popup_pos(pos.x + style->get_margin(MARGIN_LEFT), pos.y + size.y - style->get_margin(MARGIN_BOTTOM));
- popup_pos += get_global_pos();
+ popup_pos += get_global_position();
if (renaming_edit) {
edit_label[0]->set_text(TTR("New name:"));
- edit_label[0]->set_pos(Point2(5, 5));
+ edit_label[0]->set_position(Point2(5, 5));
edit_label[0]->show();
edit_line[0]->set_begin(Point2(15, 25));
edit_line[0]->set_text(edited_node);
@@ -294,18 +294,18 @@ void AnimationTreeEditor::_popup_edit_dialog() {
master_anim_popup->add_item(E->get());
}
- master_anim_popup->set_pos(popup_pos);
+ master_anim_popup->set_position(popup_pos);
master_anim_popup->popup();
} else {
property_editor->edit(this, "", Variant::OBJECT, anim_tree->animation_node_get_animation(edited_node), PROPERTY_HINT_RESOURCE_TYPE, "Animation");
- property_editor->set_pos(popup_pos);
+ property_editor->set_position(popup_pos);
property_editor->popup();
updating_edit = false;
}
return;
case AnimationTreePlayer::NODE_TIMESCALE:
edit_label[0]->set_text(TTR("Scale:"));
- edit_label[0]->set_pos(Point2(5, 5));
+ edit_label[0]->set_position(Point2(5, 5));
edit_label[0]->show();
edit_line[0]->set_begin(Point2(15, 25));
edit_line[0]->set_text(rtos(anim_tree->timescale_node_get_scale(edited_node)));
@@ -314,13 +314,13 @@ void AnimationTreeEditor::_popup_edit_dialog() {
break;
case AnimationTreePlayer::NODE_ONESHOT:
edit_label[0]->set_text(TTR("Fade In (s):"));
- edit_label[0]->set_pos(Point2(5, 5));
+ edit_label[0]->set_position(Point2(5, 5));
edit_label[0]->show();
edit_line[0]->set_begin(Point2(15, 25));
edit_line[0]->set_text(rtos(anim_tree->oneshot_node_get_fadein_time(edited_node)));
edit_line[0]->show();
edit_label[1]->set_text(TTR("Fade Out (s):"));
- edit_label[1]->set_pos(Point2(5, 55));
+ edit_label[1]->set_position(Point2(5, 55));
edit_label[1]->show();
edit_line[1]->set_begin(Point2(15, 75));
edit_line[1]->set_text(rtos(anim_tree->oneshot_node_get_fadeout_time(edited_node)));
@@ -340,13 +340,13 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_check->show();
edit_label[2]->set_text(TTR("Restart (s):"));
- edit_label[2]->set_pos(Point2(5, 145));
+ edit_label[2]->set_position(Point2(5, 145));
edit_label[2]->show();
edit_line[2]->set_begin(Point2(15, 165));
edit_line[2]->set_text(rtos(anim_tree->oneshot_node_get_autorestart_delay(edited_node)));
edit_line[2]->show();
edit_label[3]->set_text(TTR("Random Restart (s):"));
- edit_label[3]->set_pos(Point2(5, 195));
+ edit_label[3]->set_position(Point2(5, 195));
edit_label[3]->show();
edit_line[3]->set_begin(Point2(15, 215));
edit_line[3]->set_text(rtos(anim_tree->oneshot_node_get_autorestart_random_delay(edited_node)));
@@ -367,7 +367,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
case AnimationTreePlayer::NODE_MIX:
edit_label[0]->set_text(TTR("Amount:"));
- edit_label[0]->set_pos(Point2(5, 5));
+ edit_label[0]->set_position(Point2(5, 5));
edit_label[0]->show();
edit_scroll[0]->set_min(0);
edit_scroll[0]->set_max(1);
@@ -379,7 +379,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
break;
case AnimationTreePlayer::NODE_BLEND2:
edit_label[0]->set_text(TTR("Blend:"));
- edit_label[0]->set_pos(Point2(5, 5));
+ edit_label[0]->set_position(Point2(5, 5));
edit_label[0]->show();
edit_scroll[0]->set_min(0);
edit_scroll[0]->set_max(1);
@@ -394,7 +394,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
case AnimationTreePlayer::NODE_BLEND3:
edit_label[0]->set_text(TTR("Blend:"));
- edit_label[0]->set_pos(Point2(5, 5));
+ edit_label[0]->set_position(Point2(5, 5));
edit_label[0]->show();
edit_scroll[0]->set_min(-1);
edit_scroll[0]->set_max(1);
@@ -407,7 +407,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
case AnimationTreePlayer::NODE_BLEND4:
edit_label[0]->set_text(TTR("Blend 0:"));
- edit_label[0]->set_pos(Point2(5, 5));
+ edit_label[0]->set_position(Point2(5, 5));
edit_label[0]->show();
edit_scroll[0]->set_min(0);
edit_scroll[0]->set_max(1);
@@ -415,7 +415,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_scroll[0]->set_begin(Point2(15, 25));
edit_scroll[0]->show();
edit_label[1]->set_text(TTR("Blend 1:"));
- edit_label[1]->set_pos(Point2(5, 55));
+ edit_label[1]->set_position(Point2(5, 55));
edit_label[1]->show();
edit_scroll[1]->set_min(0);
edit_scroll[1]->set_max(1);
@@ -429,14 +429,14 @@ void AnimationTreeEditor::_popup_edit_dialog() {
case AnimationTreePlayer::NODE_TRANSITION: {
edit_label[0]->set_text(TTR("X-Fade Time (s):"));
- edit_label[0]->set_pos(Point2(5, 5));
+ edit_label[0]->set_position(Point2(5, 5));
edit_label[0]->show();
edit_line[0]->set_begin(Point2(15, 25));
edit_line[0]->set_text(rtos(anim_tree->transition_node_get_xfade_time(edited_node)));
edit_line[0]->show();
edit_label[1]->set_text(TTR("Current:"));
- edit_label[1]->set_pos(Point2(5, 55));
+ edit_label[1]->set_position(Point2(5, 55));
edit_label[1]->show();
edit_option->set_begin(Point2(15, 75));
@@ -455,7 +455,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
}
}
- edit_dialog->set_pos(popup_pos);
+ edit_dialog->set_position(popup_pos);
edit_dialog->popup();
updating_edit = false;
@@ -727,8 +727,8 @@ void AnimationTreeEditor::_node_edit_property(const StringName& p_node) {
property_editor->edit(NULL,ph.name,ph.type,anim_tree->node_get_param(p_node),ph.hint,ph.hint_string);
Point2 popup_pos=Point2( pos.x+(size.width-property_editor->get_size().width)/2.0,pos.y+(size.y-style->get_margin(MARGIN_BOTTOM))).floor();
- popup_pos+=get_global_pos();
- property_editor->set_pos(popup_pos);
+ popup_pos+=get_global_position();
+ property_editor->set_position(popup_pos);
property_editor->popup();
@@ -797,7 +797,7 @@ void AnimationTreeEditor::_gui_input(InputEvent p_event) {
}
}
- node_popup->set_pos(rclick_pos + get_global_pos());
+ node_popup->set_position(rclick_pos + get_global_position());
node_popup->popup();
}
@@ -807,7 +807,7 @@ void AnimationTreeEditor::_gui_input(InputEvent p_event) {
node_popup->add_item(TTR("Remove"), NODE_ERASE);
if (anim_tree->node_get_type(rclick_node) == AnimationTreePlayer::NODE_TRANSITION)
node_popup->add_item(TTR("Add Input"), NODE_ADD_INPUT);
- node_popup->set_pos(rclick_pos + get_global_pos());
+ node_popup->set_position(rclick_pos + get_global_position());
node_popup->popup();
}
}
@@ -1302,7 +1302,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
add_menu = memnew(MenuButton);
//add_menu->set_
- add_menu->set_pos(Point2(0, 0));
+ add_menu->set_position(Point2(0, 0));
add_menu->set_size(Point2(25, 15));
add_child(add_menu);
@@ -1324,7 +1324,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
p->connect("id_pressed", this, "_add_menu_item");
play_button = memnew(Button);
- play_button->set_pos(Point2(25, 0));
+ play_button->set_position(Point2(25, 0));
play_button->set_size(Point2(25, 15));
add_child(play_button);
play_button->set_toggle_mode(true);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 0c32671acc..1a533dce32 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -186,17 +186,17 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2 &mouse_pos) {
Vector2 motion_ofs = gpos - local_mouse_pos;
- undo_redo->add_do_method(n2d, "set_global_pos", local_mouse_pos);
+ undo_redo->add_do_method(n2d, "set_global_position", local_mouse_pos);
undo_redo->add_do_method(n2d, "edit_set_pivot", offset + n2d->get_global_transform().affine_inverse().basis_xform(motion_ofs));
- undo_redo->add_undo_method(n2d, "set_global_pos", gpos);
+ undo_redo->add_undo_method(n2d, "set_global_position", gpos);
undo_redo->add_undo_method(n2d, "edit_set_pivot", offset);
for (int i = 0; i < n2d->get_child_count(); i++) {
Node2D *n2dc = n2d->get_child(i)->cast_to<Node2D>();
if (!n2dc)
continue;
- undo_redo->add_do_method(n2dc, "set_global_pos", n2dc->get_global_position());
- undo_redo->add_undo_method(n2dc, "set_global_pos", n2dc->get_global_position());
+ undo_redo->add_do_method(n2dc, "set_global_position", n2dc->get_global_position());
+ undo_redo->add_undo_method(n2dc, "set_global_position", n2dc->get_global_position());
}
}
}
@@ -666,7 +666,7 @@ void CanvasItemEditor::_key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE
} else if (Control *control = canvas_item->cast_to<Control>()) {
- control->set_pos(control->get_pos() + drag);
+ control->set_position(control->get_position() + drag);
}
}
}
@@ -1014,7 +1014,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton &b) {
additive_selection = b.mod.shift;
- selection_menu->set_global_pos(Vector2(b.global_x, b.global_y));
+ selection_menu->set_global_position(Vector2(b.global_x, b.global_y));
selection_menu->popup();
selection_menu->call_deferred("grab_click_focus");
selection_menu->set_invalidate_click_until_motion();
@@ -1135,7 +1135,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
Node* scene = get_scene()->get_root_node()->cast_to<EditorNode>()->get_edited_scene();
if ( scene ) ref_item =_select_canvas_item_at_pos( Point2( b.x, b.y ), scene, transform );
#endif
- //popup->set_pos(Point2(b.x,b.y));
+ //popup->set_position(Point2(b.x,b.y));
//popup->popup();
}
return;
@@ -2703,7 +2703,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Control *ctrl = canvas_item->cast_to<Control>();
if (key_pos)
- AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl, "rect/pos", ctrl->get_pos(), existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl, "rect/pos", ctrl->get_position(), existing);
if (key_scale)
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl, "rect/size", ctrl->get_size(), existing);
}
@@ -2789,10 +2789,10 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Node2D *n2d = o->cast_to<Node2D>();
if (!n2d)
continue;
- undo_redo->add_do_method(n2d, "set_pos", E->get().pos);
+ undo_redo->add_do_method(n2d, "set_position", E->get().pos);
undo_redo->add_do_method(n2d, "set_rot", E->get().rot);
undo_redo->add_do_method(n2d, "set_scale", E->get().scale);
- undo_redo->add_undo_method(n2d, "set_pos", n2d->get_position());
+ undo_redo->add_undo_method(n2d, "set_position", n2d->get_position());
undo_redo->add_undo_method(n2d, "set_rot", n2d->get_rotation());
undo_redo->add_undo_method(n2d, "set_scale", n2d->get_scale());
}
@@ -2826,7 +2826,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Control *ctrl = canvas_item->cast_to<Control>();
if (key_pos)
- ctrl->set_pos(Point2());
+ ctrl->set_position(Point2());
/*
if (key_scale)
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size());
@@ -3354,7 +3354,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
Label *l = memnew(Label);
l->set_text(TTR("Snap (Pixels):"));
- l->set_pos(Point2(5, 5));
+ l->set_position(Point2(5, 5));
value_dialog->add_child(l);
dialog_label = l;
@@ -3474,8 +3474,8 @@ void CanvasItemEditorViewport::_on_change_type() {
}
void CanvasItemEditorViewport::_create_preview(const Vector<String> &files) const {
- label->set_pos(get_global_pos() + Point2(14, 14));
- label_desc->set_pos(label->get_pos() + Point2(0, label->get_size().height));
+ label->set_position(get_global_position() + Point2(14, 14));
+ label_desc->set_position(label->get_position() + Point2(0, label->get_size().height));
for (int i = 0; i < files.size(); i++) {
String path = files[i];
RES res = ResourceLoader::load(path);
@@ -3576,8 +3576,8 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
// locate at preview position
Point2 pos;
- if (parent->has_method("get_global_pos")) {
- pos = parent->call("get_global_pos");
+ if (parent->has_method("get_global_position")) {
+ pos = parent->call("get_global_position");
}
Transform2D trans = canvas->get_canvas_transform();
Point2 target_pos = (p_point - trans.get_origin()) / trans.get_scale().x - pos;
@@ -3626,7 +3626,7 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
} else {
Control *parent_control = parent->cast_to<Control>();
if (parent_control) {
- pos = parent_control->get_global_pos();
+ pos = parent_control->get_global_position();
}
}
Transform2D trans = canvas->get_canvas_transform();
@@ -3834,7 +3834,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
for (int i = 0; i < types.size(); i++) {
CheckBox *check = memnew(CheckBox);
check->set_text(types[i]);
- check->connect("button_selected", this, "_on_select_type", varray(check));
+ check->connect("button_down", this, "_on_select_type", varray(check));
btn_group->add_child(check);
check->set_button_group(button_group);
}
diff --git a/editor/plugins/cube_grid_theme_editor_plugin.cpp b/editor/plugins/cube_grid_theme_editor_plugin.cpp
index 4633d5fe33..17149ef868 100644
--- a/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -303,7 +303,7 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
add_child(panel);
MenuButton * options = memnew( MenuButton );
panel->add_child(options);
- options->set_pos(Point2(1,1));
+ options->set_position(Point2(1,1));
options->set_text("Theme");
options->get_popup()->add_item(TTR("Add Item"),MENU_OPTION_ADD_ITEM);
options->get_popup()->add_item(TTR("Remove Selected Item"),MENU_OPTION_REMOVE_ITEM);
diff --git a/editor/plugins/gradient_texture_editor_plugin.cpp b/editor/plugins/gradient_texture_editor_plugin.cpp
index 1e82a1105a..9551fe19fa 100644
--- a/editor/plugins/gradient_texture_editor_plugin.cpp
+++ b/editor/plugins/gradient_texture_editor_plugin.cpp
@@ -39,7 +39,7 @@ void GradientTextureEdit::_show_color_picker() {
return;
Size2 ms = Size2(350, picker->get_combined_minimum_size().height + 10);
picker->set_pick_color(points[grabbed].color);
- popup->set_pos(get_global_pos() - Vector2(ms.width - get_size().width, ms.height));
+ popup->set_position(get_global_position() - Vector2(ms.width - get_size().width, ms.height));
popup->set_size(ms);
popup->popup();
}
diff --git a/editor/plugins/sample_editor_plugin.cpp b/editor/plugins/sample_editor_plugin.cpp
index 0c4a85230c..a9af5823e3 100644
--- a/editor/plugins/sample_editor_plugin.cpp
+++ b/editor/plugins/sample_editor_plugin.cpp
@@ -381,14 +381,14 @@ SampleEditor::SampleEditor() {
play = memnew( Button );
- play->set_pos(Point2( 5, 5 ));
+ play->set_position(Point2( 5, 5 ));
play->set_size( Size2(1,1 ) );
play->set_toggle_mode(true);
add_child(play);
stop = memnew( Button );
- stop->set_pos(Point2( 35, 5 ));
+ stop->set_position(Point2( 35, 5 ));
stop->set_size( Size2(1,1 ) );
stop->set_toggle_mode(true);
add_child(stop);
diff --git a/editor/plugins/sample_library_editor_plugin.cpp b/editor/plugins/sample_library_editor_plugin.cpp
index 17f24d1a6b..9eb1af70d1 100644
--- a/editor/plugins/sample_library_editor_plugin.cpp
+++ b/editor/plugins/sample_library_editor_plugin.cpp
@@ -436,7 +436,7 @@ SampleLibraryEditor::SampleLibraryEditor() {
load = memnew( Button );
- load->set_pos(Point2( 5, 5 ));
+ load->set_position(Point2( 5, 5 ));
load->set_size( Size2(1,1 ) );
add_child(load);
diff --git a/editor/plugins/sample_player_editor_plugin.cpp b/editor/plugins/sample_player_editor_plugin.cpp
index 944f41637f..25f1fe9e17 100644
--- a/editor/plugins/sample_player_editor_plugin.cpp
+++ b/editor/plugins/sample_player_editor_plugin.cpp
@@ -118,7 +118,7 @@ SamplePlayerEditor::SamplePlayerEditor() {
play = memnew( Button );
- play->set_pos(Point2( 5, 5 ));
+ play->set_position(Point2( 5, 5 ));
play->set_toggle_mode(true);
play->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,250);
play->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,230);
@@ -129,7 +129,7 @@ SamplePlayerEditor::SamplePlayerEditor() {
stop = memnew( Button );
- stop->set_pos(Point2( 35, 5 ));
+ stop->set_position(Point2( 35, 5 ));
stop->set_toggle_mode(true);
stop->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,220);
stop->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,200);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 159fc0d51f..f020e36247 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1095,8 +1095,8 @@ void ScriptTextEditor::_text_edit_gui_input(const InputEvent &ev) {
int col, row;
TextEdit *tx = code_editor->get_text_edit();
- tx->_get_mouse_pos(Point2i(mb.global_x, mb.global_y) - tx->get_global_pos(), row, col);
- Vector2 mpos = Vector2(mb.global_x, mb.global_y) - tx->get_global_pos();
+ tx->_get_mouse_pos(Point2i(mb.global_x, mb.global_y) - tx->get_global_position(), row, col);
+ Vector2 mpos = Vector2(mb.global_x, mb.global_y) - tx->get_global_position();
bool have_selection = (tx->get_selection_text().length() > 0);
bool have_color = (tx->get_word_at_pos(mpos) == "Color");
if (have_color) {
@@ -1124,7 +1124,7 @@ void ScriptTextEditor::_text_edit_gui_input(const InputEvent &ev) {
float alpha = color.size() > 3 ? color[3] : 1.0f;
color_picker->set_pick_color(Color(color[0], color[1], color[2], alpha));
}
- color_panel->set_pos(get_global_transform().xform(get_local_mouse_pos()));
+ color_panel->set_position(get_global_transform().xform(get_local_mouse_pos()));
Size2 ms = Size2(300, color_picker->get_combined_minimum_size().height + 10);
color_panel->set_size(ms);
} else {
@@ -1174,7 +1174,7 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color) {
context_menu->add_separator();
context_menu->add_item(TTR("Pick Color"), EDIT_PICK_COLOR);
}
- context_menu->set_pos(get_global_transform().xform(get_local_mouse_pos()));
+ context_menu->set_position(get_global_transform().xform(get_local_mouse_pos()));
context_menu->set_size(Vector2(1, 1));
context_menu->popup();
}
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index dcb126a754..b693913e45 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -445,7 +445,7 @@ ShaderEditor::ShaderEditor() {
edit_menu = memnew(MenuButton);
hbc->add_child(edit_menu);
- edit_menu->set_pos(Point2(5, -1));
+ edit_menu->set_position(Point2(5, -1));
edit_menu->set_text(TTR("Edit"));
edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/undo", TTR("Undo"), KEY_MASK_CMD | KEY_Z), EDIT_UNDO);
edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/redo", TTR("Redo"), KEY_MASK_CMD | KEY_Y), EDIT_REDO);
@@ -459,7 +459,7 @@ ShaderEditor::ShaderEditor() {
search_menu = memnew(MenuButton);
hbc->add_child(search_menu);
- search_menu->set_pos(Point2(38, -1));
+ search_menu->set_position(Point2(38, -1));
search_menu->set_text(TTR("Search"));
search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find.."), KEY_MASK_CMD | KEY_F), SEARCH_FIND);
search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), SEARCH_FIND_NEXT);
diff --git a/editor/plugins/shader_graph_editor_plugin.cpp b/editor/plugins/shader_graph_editor_plugin.cpp
index 04dae641bc..0fd28a0b59 100644
--- a/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/editor/plugins/shader_graph_editor_plugin.cpp
@@ -60,7 +60,7 @@ void GraphColorRampEdit::_gui_input(const InputEvent& p_event) {
return;
Size2 ms = Size2(350, picker->get_combined_minimum_size().height+10);
picker->set_color(points[grabbed].color);
- popup->set_pos(get_global_pos()-Size2(0,ms.height));
+ popup->set_position(get_global_position()-Size2(0,ms.height));
popup->set_size(ms);
popup->popup();
return;
@@ -840,7 +840,7 @@ void ShaderGraphView::_xform_input_changed(int p_id, Node *p_button){
ToolButton *tb = p_button->cast_to<ToolButton>();
- ped_popup->set_pos(tb->get_global_pos()+Vector2(0,tb->get_size().height));
+ ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
edited_def=-1;
@@ -851,7 +851,7 @@ void ShaderGraphView::_xform_input_changed(int p_id, Node *p_button){
void ShaderGraphView::_xform_const_changed(int p_id, Node *p_button){
ToolButton *tb = p_button->cast_to<ToolButton>();
- ped_popup->set_pos(tb->get_global_pos()+Vector2(0,tb->get_size().height));
+ ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
edited_def=-1;
@@ -1075,7 +1075,7 @@ void ShaderGraphView::_input_name_changed(const String& p_name, int p_id, Node *
void ShaderGraphView::_tex_edited(int p_id,Node* p_button) {
ToolButton *tb = p_button->cast_to<ToolButton>();
- ped_popup->set_pos(tb->get_global_pos()+Vector2(0,tb->get_size().height));
+ ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
edited_def=-1;
@@ -1085,7 +1085,7 @@ void ShaderGraphView::_tex_edited(int p_id,Node* p_button) {
void ShaderGraphView::_cube_edited(int p_id,Node* p_button) {
ToolButton *tb = p_button->cast_to<ToolButton>();
- ped_popup->set_pos(tb->get_global_pos()+Vector2(0,tb->get_size().height));
+ ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
edited_def=-1;
@@ -1300,7 +1300,7 @@ void ShaderGraphView::_delete_nodes_request()
void ShaderGraphView::_default_changed(int p_id, Node *p_button, int p_param, int v_type, String p_hint)
{
ToolButton *tb = p_button->cast_to<ToolButton>();
- ped_popup->set_pos(tb->get_global_pos()+Vector2(0,tb->get_size().height));
+ ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
edited_def=p_param;
@@ -2751,7 +2751,7 @@ ShaderGraphView::ShaderGraphView(ShaderGraph::ShaderType p_type) {
graph_edit->get_top_layer()->add_child(status);
graph_edit->connect("_begin_node_move", this, "_begin_node_move");
graph_edit->connect("_end_node_move", this, "_end_node_move");
- status->set_pos(Vector2(5,5));
+ status->set_position(Vector2(5,5));
status->add_color_override("font_color_shadow",Color(0,0,0));
status->add_color_override("font_color",Color(1,0.4,0.3));
status->add_constant_override("shadow_as_outline",1);
@@ -2779,7 +2779,7 @@ void ShaderGraphEditor::_popup_requested(const Vector2 &p_position)
{
Vector2 scroll_ofs=graph_edits[tabs->get_current_tab()]->get_graph_edit()->get_scroll_ofs();
next_location = get_local_mouse_pos() + scroll_ofs;
- popup->set_global_pos(p_position);
+ popup->set_global_position(p_position);
popup->set_size( Size2( 200, 0) );
popup->popup();
popup->call_deferred("grab_click_focus");
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 4961de56d3..d73349f773 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -673,7 +673,7 @@ void SpatialEditorViewport::_list_select(InputEventMouseButton b) {
"\nType: " + spat->get_class() + "\nPath: " + node_path);
}
- selection_menu->set_global_pos(Vector2(b.global_x, b.global_y));
+ selection_menu->set_global_position(Vector2(b.global_x, b.global_y));
selection_menu->popup();
selection_menu->call_deferred("grab_click_focus");
selection_menu->set_invalidate_click_until_motion();
@@ -2166,7 +2166,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
view_menu = memnew(MenuButton);
surface->add_child(view_menu);
- view_menu->set_pos(Point2(4, 4));
+ view_menu->set_position(Point2(4, 4));
view_menu->set_self_modulate(Color(1, 1, 1, 0.5));
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/top_view"), VIEW_TOP);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/bottom_view"), VIEW_BOTTOM);
@@ -3572,7 +3572,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
view_menu = memnew(MenuButton);
view_menu->set_text(TTR("View"));
- view_menu->set_pos(Point2(212, 0));
+ view_menu->set_position(Point2(212, 0));
hbc_menu->add_child(view_menu);
p = view_menu->get_popup();
@@ -3717,44 +3717,44 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
add_child(xform_dialog);
Label *l = memnew(Label);
l->set_text(TTR("Translate:"));
- l->set_pos(Point2(5, 5));
+ l->set_position(Point2(5, 5));
xform_dialog->add_child(l);
for (int i = 0; i < 3; i++) {
xform_translate[i] = memnew(LineEdit);
- xform_translate[i]->set_pos(Point2(15 + i * 60, 22));
+ xform_translate[i]->set_position(Point2(15 + i * 60, 22));
xform_translate[i]->set_size(Size2(50, 12));
xform_dialog->add_child(xform_translate[i]);
}
l = memnew(Label);
l->set_text(TTR("Rotate (deg.):"));
- l->set_pos(Point2(5, 45));
+ l->set_position(Point2(5, 45));
xform_dialog->add_child(l);
for (int i = 0; i < 3; i++) {
xform_rotate[i] = memnew(LineEdit);
- xform_rotate[i]->set_pos(Point2(15 + i * 60, 62));
+ xform_rotate[i]->set_position(Point2(15 + i * 60, 62));
xform_rotate[i]->set_size(Size2(50, 22));
xform_dialog->add_child(xform_rotate[i]);
}
l = memnew(Label);
l->set_text(TTR("Scale (ratio):"));
- l->set_pos(Point2(5, 85));
+ l->set_position(Point2(5, 85));
xform_dialog->add_child(l);
for (int i = 0; i < 3; i++) {
xform_scale[i] = memnew(LineEdit);
- xform_scale[i]->set_pos(Point2(15 + i * 60, 102));
+ xform_scale[i]->set_position(Point2(15 + i * 60, 102));
xform_scale[i]->set_size(Size2(50, 22));
xform_dialog->add_child(xform_scale[i]);
}
l = memnew(Label);
l->set_text(TTR("Transform Type"));
- l->set_pos(Point2(5, 125));
+ l->set_position(Point2(5, 125));
xform_dialog->add_child(l);
xform_type = memnew(OptionButton);
diff --git a/editor/plugins/stream_editor_plugin.cpp b/editor/plugins/stream_editor_plugin.cpp
index 43f770ab10..dd97ce936d 100644
--- a/editor/plugins/stream_editor_plugin.cpp
+++ b/editor/plugins/stream_editor_plugin.cpp
@@ -84,7 +84,7 @@ StreamEditor::StreamEditor() {
stop = memnew( Button );
- stop->set_pos(Point2( 35, 5 ));
+ stop->set_position(Point2( 35, 5 ));
stop->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,30);
stop->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,10);
stop->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0);
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index 1d067ff975..d421b203e9 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -61,12 +61,12 @@ StyleBoxEditor::StyleBoxEditor() {
Label *l = memnew(Label);
l->set_text(TTR("StyleBox Preview:"));
- l->set_pos(Point2(5, 5));
+ l->set_position(Point2(5, 5));
panel->add_child(l);
preview = memnew(Panel);
panel->add_child(preview);
- preview->set_pos(Point2(50, 50));
+ preview->set_position(Point2(50, 50));
preview->set_size(Size2(200, 100));
}
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 4ff5951049..a83ea70508 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -640,7 +640,7 @@ ThemeEditor::ThemeEditor() {
theme_menu->get_popup()->add_item(TTR("Create Empty Editor Template"), POPUP_CREATE_EDITOR_EMPTY);
add_child(theme_menu);
- theme_menu->set_pos(Vector2(3, 3) * EDSCALE);
+ theme_menu->set_position(Vector2(3, 3) * EDSCALE);
theme_menu->get_popup()->connect("id_pressed", this, "_theme_menu_cbk");
HBoxContainer *main_hb = memnew(HBoxContainer);
@@ -778,23 +778,23 @@ ThemeEditor::ThemeEditor() {
/*
test_h_scroll = memnew( HScrollBar );
- test_h_scroll->set_pos( Point2( 25, 225 ) );
+ test_h_scroll->set_position( Point2( 25, 225 ) );
test_h_scroll->set_size( Point2( 150, 5 ) );
panel->add_child(test_h_scroll);
line_edit = memnew( LineEdit );
- line_edit->set_pos( Point2( 25, 275 ) );
+ line_edit->set_position( Point2( 25, 275 ) );
line_edit->set_size( Point2( 150, 5 ) );
line_edit->set_text("Line Edit");
panel->add_child(line_edit);
test_v_scroll = memnew( VScrollBar );
- test_v_scroll->set_pos( Point2( 200, 25 ) );
+ test_v_scroll->set_position( Point2( 200, 25 ) );
test_v_scroll->set_size( Point2( 5, 150 ) );
panel->add_child(test_v_scroll);
test_tree = memnew(Tree);
- test_tree->set_pos( Point2( 300, 25 ) );
+ test_tree->set_position( Point2( 300, 25 ) );
test_tree->set_size( Point2( 200, 200 ) );
panel->add_child(test_tree);
@@ -818,7 +818,7 @@ ThemeEditor::ThemeEditor() {
item->set_range(0,2);
Button *fd_button= memnew( Button );
- fd_button->set_pos(Point2(300,275));
+ fd_button->set_position(Point2(300,275));
fd_button->set_text("Open File Dialog");
panel->add_child(fd_button);
@@ -833,17 +833,17 @@ ThemeEditor::ThemeEditor() {
add_child(add_del_dialog);
Label *l = memnew(Label);
- l->set_pos(Point2(5, 5) * EDSCALE);
+ l->set_position(Point2(5, 5) * EDSCALE);
l->set_text(TTR("Type:"));
add_del_dialog->add_child(l);
dtype_select_label = l;
type_edit = memnew(LineEdit);
- type_edit->set_pos(Point2(5, 25) * EDSCALE);
+ type_edit->set_position(Point2(5, 25) * EDSCALE);
type_edit->set_size(Point2(150, 5) * EDSCALE);
add_del_dialog->add_child(type_edit);
type_menu = memnew(MenuButton);
- type_menu->set_pos(Point2(160, 25) * EDSCALE);
+ type_menu->set_position(Point2(160, 25) * EDSCALE);
type_menu->set_size(Point2(30, 5) * EDSCALE);
type_menu->set_text("..");
add_del_dialog->add_child(type_menu);
@@ -851,17 +851,17 @@ ThemeEditor::ThemeEditor() {
type_menu->get_popup()->connect("id_pressed", this, "_type_menu_cbk");
l = memnew(Label);
- l->set_pos(Point2(200, 5) * EDSCALE);
+ l->set_position(Point2(200, 5) * EDSCALE);
l->set_text(TTR("Name:"));
add_del_dialog->add_child(l);
name_select_label = l;
name_edit = memnew(LineEdit);
- name_edit->set_pos(Point2(200, 25) * EDSCALE);
+ name_edit->set_position(Point2(200, 25) * EDSCALE);
name_edit->set_size(Point2(150, 5) * EDSCALE);
add_del_dialog->add_child(name_edit);
name_menu = memnew(MenuButton);
- name_menu->set_pos(Point2(360, 25) * EDSCALE);
+ name_menu->set_position(Point2(360, 25) * EDSCALE);
name_menu->set_size(Point2(30, 5) * EDSCALE);
name_menu->set_text("..");
@@ -871,7 +871,7 @@ ThemeEditor::ThemeEditor() {
name_menu->get_popup()->connect("id_pressed", this, "_name_menu_cbk");
type_select_label = memnew(Label);
- type_select_label->set_pos(Point2(400, 5) * EDSCALE);
+ type_select_label->set_position(Point2(400, 5) * EDSCALE);
type_select_label->set_text(TTR("Data Type:"));
add_del_dialog->add_child(type_select_label);
@@ -881,7 +881,7 @@ ThemeEditor::ThemeEditor() {
type_select->add_item(TTR("Font"));
type_select->add_item(TTR("Color"));
type_select->add_item(TTR("Constant"));
- type_select->set_pos(Point2(400, 25) * EDSCALE);
+ type_select->set_position(Point2(400, 25) * EDSCALE);
type_select->set_size(Point2(80, 5) * EDSCALE);
add_del_dialog->add_child(type_select);
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index cbd300a53c..e79cbd0d35 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -225,7 +225,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
add_child(panel);
MenuButton *options = memnew(MenuButton);
panel->add_child(options);
- options->set_pos(Point2(1, 1));
+ options->set_position(Point2(1, 1));
options->set_text("Theme");
options->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM);
options->get_popup()->add_item(TTR("Remove Item"), MENU_OPTION_REMOVE_ITEM);
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index cb67d706c3..7e9dc5f4f1 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -405,7 +405,7 @@ public:
l = memnew(Label);
l->set_text(TTR("Project Name:"));
- l->set_pos(Point2(5, 50));
+ l->set_position(Point2(5, 50));
vb->add_child(l);
pn = l;
@@ -624,7 +624,7 @@ void ProjectManager::_unhandled_input(const InputEvent &p_ev) {
selected_list.clear();
selected_list.insert(current, hb->get_meta("main_scene"));
- int offset_diff = scroll->get_v_scroll() - hb->get_pos().y;
+ int offset_diff = scroll->get_v_scroll() - hb->get_position().y;
if (offset_diff > 0)
scroll->set_v_scroll(scroll->get_v_scroll() - offset_diff);
@@ -662,7 +662,7 @@ void ProjectManager::_unhandled_input(const InputEvent &p_ev) {
selected_list.insert(current, hb->get_meta("main_scene"));
int last_y_visible = scroll->get_v_scroll() + scroll->get_size().y;
- int offset_diff = (hb->get_pos().y + hb->get_size().y) - last_y_visible;
+ int offset_diff = (hb->get_position().y + hb->get_size().y) - last_y_visible;
if (offset_diff > 0)
scroll->set_v_scroll(scroll->get_v_scroll() + offset_diff);
@@ -912,7 +912,7 @@ void ProjectManager::_update_scroll_pos(const String &dir) {
selected_list.insert(hb->get_meta("name"), hb->get_meta("main_scene"));
_update_project_buttons();
int last_y_visible = scroll->get_v_scroll() + scroll->get_size().y;
- int offset_diff = (hb->get_pos().y + hb->get_size().y) - last_y_visible;
+ int offset_diff = (hb->get_position().y + hb->get_size().y) - last_y_visible;
if (offset_diff > 0)
scroll->set_v_scroll(scroll->get_v_scroll() + offset_diff);
diff --git a/editor/project_settings.cpp b/editor/project_settings.cpp
index 77af64d9e3..a45ea26086 100644
--- a/editor/project_settings.cpp
+++ b/editor/project_settings.cpp
@@ -397,12 +397,12 @@ void ProjectSettings::_action_button_pressed(Object *p_obj, int p_column, int p_
ERR_FAIL_COND(!ti);
if (p_id == 1) {
- Point2 ofs = input_editor->get_global_pos();
+ Point2 ofs = input_editor->get_global_position();
Rect2 ir = input_editor->get_item_rect(ti);
ir.pos.y -= input_editor->get_scroll().y;
ofs += ir.pos + ir.size;
ofs.x -= 100;
- popup_add->set_pos(ofs);
+ popup_add->set_position(ofs);
popup_add->popup();
add_at = "input/" + ti->get_text(0);
@@ -1326,7 +1326,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
l = memnew(Label);
vbc->add_child(l);
- l->set_pos(Point2(6, 5));
+ l->set_position(Point2(6, 5));
l->set_text(TTR("Action:"));
hbc = memnew(HBoxContainer);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 406dbac5d9..86136fa78b 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -319,12 +319,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
CheckBox *c = checks20[0];
c->set_text("True");
- checks20gc->set_pos(Vector2(4, 4));
+ checks20gc->set_position(Vector2(4, 4));
c->set_pressed(v);
c->show();
checks20gc->set_size(checks20gc->get_minimum_size());
- set_size(checks20gc->get_pos() + checks20gc->get_size() + Vector2(4, 4) * EDSCALE);
+ set_size(checks20gc->get_position() + checks20gc->get_size() + Vector2(4, 4) * EDSCALE);
} break;
case Variant::INT:
@@ -374,7 +374,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
for (int i = 0; i < options.size(); i++) {
menu->add_item(options[i], i);
}
- menu->set_pos(get_pos());
+ menu->set_position(get_position());
menu->popup();
hide();
updating = false;
@@ -423,12 +423,12 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
value_label[0]->set_text(title);
value_label[0]->show();
- value_label[0]->set_pos(Vector2(4, 4) * EDSCALE);
+ value_label[0]->set_position(Vector2(4, 4) * EDSCALE);
- checks20gc->set_pos(Vector2(4, 4) * EDSCALE + Vector2(0, value_label[0]->get_size().height + 4 * EDSCALE));
+ checks20gc->set_position(Vector2(4, 4) * EDSCALE + Vector2(0, value_label[0]->get_size().height + 4 * EDSCALE));
checks20gc->set_size(checks20gc->get_minimum_size());
- set_size(Vector2(4, 4) * EDSCALE + checks20gc->get_pos() + checks20gc->get_size());
+ set_size(Vector2(4, 4) * EDSCALE + checks20gc->get_position() + checks20gc->get_size());
} else if (hint == PROPERTY_HINT_EXP_EASING) {
@@ -466,7 +466,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
if (f & (1 << i))
menu->set_item_checked(menu->get_item_index(i), true);
}
- menu->set_pos(get_pos());
+ menu->set_position(get_position());
menu->popup();
hide();
updating = false;
@@ -502,7 +502,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
for (int i = 0; i < options.size(); i++) {
menu->add_item(options[i], i);
}
- menu->set_pos(get_pos());
+ menu->set_position(get_position());
menu->popup();
hide();
updating = false;
@@ -838,15 +838,15 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
value_editor[i]->show();
value_label[i]->show();
- value_label[i]->set_pos(Point2(ofs,y));
+ value_label[i]->set_position(Point2(ofs,y));
scroll[i]->set_min(0);
scroll[i]->set_max(1.0);
scroll[i]->set_page(0);
- scroll[i]->set_pos(Point2(ofs+15,y+Math::floor((h-scroll[i]->get_minimum_size().height)/2.0)));
+ scroll[i]->set_position(Point2(ofs+15,y+Math::floor((h-scroll[i]->get_minimum_size().height)/2.0)));
scroll[i]->set_val(values[i]);
scroll[i]->set_size(Size2(120,1));
scroll[i]->show();
- value_editor[i]->set_pos(Point2(ofs+140,y));
+ value_editor[i]->set_position(Point2(ofs+140,y));
value_editor[i]->set_size(Size2(40,h));
value_editor[i]->set_text( String::num(values[i],2 ));
@@ -857,7 +857,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
value_label[2]->set_text("B");
value_label[3]->set_text("A");
- Size2 new_size = value_editor[3]->get_pos() + value_editor[3]->get_size() + Point2(10,10);
+ Size2 new_size = value_editor[3]->get_position() + value_editor[3]->get_size() + Point2(10,10);
set_size( new_size );
*/
@@ -981,7 +981,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
}
}
- menu->set_pos(get_pos());
+ menu->set_position(get_position());
menu->popup();
hide();
updating = false;
@@ -1868,7 +1868,7 @@ void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings)
if (i < p_strings.size()) {
action_buttons[i]->show();
action_buttons[i]->set_text(p_strings[i]);
- action_buttons[i]->set_pos(Point2(m, m + i * (h + m)));
+ action_buttons[i]->set_position(Point2(m, m + i * (h + m)));
action_buttons[i]->set_size(Size2(w - m * 2, h));
action_buttons[i]->set_flat(true);
} else {
@@ -1896,9 +1896,9 @@ void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int
value_editor[i]->show();
value_label[i]->show();
value_label[i]->set_text(i < p_strings.size() ? p_strings[i] : String(""));
- value_editor[i]->set_pos(Point2(m + p_label_w + c * (w + m + p_label_w), m + r * (h + m)));
+ value_editor[i]->set_position(Point2(m + p_label_w + c * (w + m + p_label_w), m + r * (h + m)));
value_editor[i]->set_size(Size2(w, h));
- value_label[i]->set_pos(Point2(m + c * (w + m + p_label_w), m + r * (h + m)));
+ value_label[i]->set_position(Point2(m + c * (w + m + p_label_w), m + r * (h + m)));
value_editor[i]->set_editable(!read_only);
} else {
value_editor[i]->hide();
@@ -3989,7 +3989,7 @@ void PropertyEditor::_custom_editor_request(bool p_arrow) {
int hint = d.has("hint") ? d["hint"].operator int() : -1;
String hint_text = d.has("hint_text") ? d["hint_text"] : "";
Rect2 where = tree->get_custom_popup_rect();
- custom_editor->set_pos(where.pos);
+ custom_editor->set_position(where.pos);
if (custom_editor->edit(obj, name, type, v, hint, hint_text)) {
custom_editor->popup();
@@ -4097,8 +4097,8 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
custom_editor->edit(obj, n, (Variant::Type)t, v, h, ht);
Rect2 where = tree->get_item_rect(ti, 1);
where.pos -= tree->get_scroll();
- where.pos += tree->get_global_pos();
- custom_editor->set_pos(where.pos);
+ where.pos += tree->get_global_position();
+ custom_editor->set_position(where.pos);
custom_editor->popup();
} else if (t == Variant::STRING) {
@@ -4110,8 +4110,8 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
Rect2 where = tree->get_item_rect(ti, 1);
where.pos -= tree->get_scroll();
- where.pos += tree->get_global_pos();
- custom_editor->set_pos(where.pos);
+ where.pos += tree->get_global_position();
+ custom_editor->set_position(where.pos);
custom_editor->popup();
} else {
custom_editor->popup_centered_ratio();
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index ffd4d704d5..acc511e004 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -95,7 +95,7 @@ ReparentDialog::ReparentDialog() {
tree->get_scene_tree()->connect("item_activated", this, "_reparent");
//Label *label = memnew( Label );
- //label->set_pos( Point2( 15,8) );
+ //label->set_position( Point2( 15,8) );
//label->set_text("Reparent Location (Select new Parent):");
keep_transform = memnew(CheckBox);
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 1a0e67e71a..69b8723431 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -1112,7 +1112,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
if (node->cast_to<Spatial>())
editor_data->get_undo_redo().add_do_method(node, "set_global_transform", node->cast_to<Spatial>()->get_global_transform());
if (node->cast_to<Control>())
- editor_data->get_undo_redo().add_do_method(node, "set_global_pos", node->cast_to<Control>()->get_global_pos());
+ editor_data->get_undo_redo().add_do_method(node, "set_global_position", node->cast_to<Control>()->get_global_position());
}
editor_data->get_undo_redo().add_do_method(this, "_set_owners", edited_scene, owners);
@@ -1154,7 +1154,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
if (node->cast_to<Spatial>())
editor_data->get_undo_redo().add_undo_method(node, "set_transform", node->cast_to<Spatial>()->get_transform());
if (node->cast_to<Control>())
- editor_data->get_undo_redo().add_undo_method(node, "set_pos", node->cast_to<Control>()->get_pos());
+ editor_data->get_undo_redo().add_undo_method(node, "set_position", node->cast_to<Control>()->get_position());
}
}
@@ -1669,7 +1669,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_icon_shortcut(get_icon("Instance", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANCE);
menu->set_size(Size2(1, 1));
- menu->set_pos(p_menu_pos);
+ menu->set_position(p_menu_pos);
menu->popup();
return;
}
@@ -1710,7 +1710,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_separator();
menu->add_icon_shortcut(get_icon("Remove", "EditorIcons"), ED_SHORTCUT("scene_tree/delete", TTR("Delete Node(s)"), KEY_DELETE), TOOL_ERASE);
menu->set_size(Size2(1, 1));
- menu->set_pos(p_menu_pos);
+ menu->set_position(p_menu_pos);
menu->popup();
}
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index b8bbe2c832..8fd0d13b32 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -162,16 +162,16 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
//open scene request
Rect2 item_rect = tree->get_item_rect(item, 0);
item_rect.pos.y -= tree->get_scroll().y;
- item_rect.pos += tree->get_global_pos();
+ item_rect.pos += tree->get_global_position();
if (n == get_scene_node()) {
- inheritance_menu->set_pos(item_rect.pos + Vector2(0, item_rect.size.y));
+ inheritance_menu->set_position(item_rect.pos + Vector2(0, item_rect.size.y));
inheritance_menu->set_size(Vector2(item_rect.size.x, 0));
inheritance_menu->popup();
instance_node = n->get_instance_ID();
} else {
- instance_menu->set_pos(item_rect.pos + Vector2(0, item_rect.size.y));
+ instance_menu->set_position(item_rect.pos + Vector2(0, item_rect.size.y));
instance_menu->set_size(Vector2(item_rect.size.x, 0));
if (EditorNode::get_singleton()->get_edited_scene()->is_editable_instance(n))
instance_menu->set_item_checked(0, true);
@@ -1103,7 +1103,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
if (p_label) {
Label *label = memnew(Label);
- label->set_pos(Point2(10, 0));
+ label->set_position(Point2(10, 0));
label->set_text(TTR("Scene Tree (Nodes):"));
add_child(label);
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 918f3c150c..81e04a84a9 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -340,7 +340,7 @@ void InputDefault::parse_input_event(const InputEvent &p_event) {
Point2 pos = Point2(p_event.mouse_button.global_x, p_event.mouse_button.global_y);
if (mouse_pos != pos) {
- set_mouse_pos(pos);
+ set_mouse_position(pos);
}
} break;
case InputEvent::MOUSE_MOTION: {
@@ -456,16 +456,16 @@ void InputDefault::set_main_loop(MainLoop *p_main_loop) {
main_loop = p_main_loop;
}
-void InputDefault::set_mouse_pos(const Point2 &p_posf) {
+void InputDefault::set_mouse_position(const Point2 &p_posf) {
mouse_speed_track.update(p_posf - mouse_pos);
mouse_pos = p_posf;
if (custom_cursor.is_valid()) {
- VisualServer::get_singleton()->cursor_set_pos(get_mouse_pos());
+ VisualServer::get_singleton()->cursor_set_pos(get_mouse_position());
}
}
-Point2 InputDefault::get_mouse_pos() const {
+Point2 InputDefault::get_mouse_position() const {
return mouse_pos;
}
@@ -560,7 +560,7 @@ void InputDefault::set_custom_mouse_cursor(const RES &p_cursor, const Vector2 &p
set_mouse_mode(MOUSE_MODE_HIDDEN);
VisualServer::get_singleton()->cursor_set_visible(true);
VisualServer::get_singleton()->cursor_set_texture(custom_cursor->get_rid(), p_hotspot, 0, region);
- VisualServer::get_singleton()->cursor_set_pos(get_mouse_pos());
+ VisualServer::get_singleton()->cursor_set_pos(get_mouse_position());
}
}
diff --git a/main/input_default.h b/main/input_default.h
index a611047cb3..55b7555ef9 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -196,7 +196,7 @@ public:
virtual Vector3 get_magnetometer() const;
virtual Vector3 get_gyroscope() const;
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual Point2 get_last_mouse_speed() const;
virtual int get_mouse_button_mask() const;
@@ -215,7 +215,7 @@ public:
virtual void stop_joy_vibration(int p_device);
void set_main_loop(MainLoop *main_loop);
- void set_mouse_pos(const Point2 &p_posf);
+ void set_mouse_position(const Point2 &p_posf);
void action_press(const StringName &p_action);
void action_release(const StringName &p_action);
diff --git a/main/tests/test_gui.cpp b/main/tests/test_gui.cpp
index cf32bf7073..3d0b96ae5b 100644
--- a/main/tests/test_gui.cpp
+++ b/main/tests/test_gui.cpp
@@ -94,7 +94,7 @@ public:
Sprite *sp = memnew( Sprite );
sp->set_texture( vp->get_render_target_texture() );
//sp->set_texture( ResourceLoader::load("res://ball.png") );
- sp->set_pos(Point2(300,300));
+ sp->set_position(Point2(300,300));
get_root()->add_child(sp);
@@ -113,7 +113,7 @@ public:
Label *label = memnew(Label);
- label->set_pos(Point2(80, 90));
+ label->set_position(Point2(80, 90));
label->set_size(Point2(170, 80));
label->set_align(Label::ALIGN_FILL);
//label->set_text("There");
@@ -123,7 +123,7 @@ public:
Button *button = memnew(Button);
- button->set_pos(Point2(20, 20));
+ button->set_position(Point2(20, 20));
button->set_size(Point2(1, 1));
button->set_text("This is a biggie button");
@@ -141,7 +141,7 @@ public:
Ref<ImageTexture> tt = memnew( ImageTexture );
tt->create_from_image(img);
tf->set_texture(tt);
- tf->set_pos(Point2(50,50));
+ tf->set_position(Point2(50,50));
//tf->set_scale(Point2(0.3,0.3));
@@ -151,7 +151,7 @@ public:
Tree *tree = memnew(Tree);
tree->set_columns(2);
- tree->set_pos(Point2(230, 210));
+ tree->set_position(Point2(230, 210));
tree->set_size(Point2(150, 250));
TreeItem *item = tree->create_item();
@@ -192,14 +192,14 @@ public:
LineEdit *line_edit = memnew(LineEdit);
- line_edit->set_pos(Point2(30, 190));
+ line_edit->set_position(Point2(30, 190));
line_edit->set_size(Point2(180, 1));
frame->add_child(line_edit);
HScrollBar *hscroll = memnew(HScrollBar);
- hscroll->set_pos(Point2(30, 290));
+ hscroll->set_position(Point2(30, 290));
hscroll->set_size(Point2(180, 1));
hscroll->set_max(10);
hscroll->set_page(4);
@@ -208,7 +208,7 @@ public:
SpinBox *spin = memnew(SpinBox);
- spin->set_pos(Point2(30, 260));
+ spin->set_position(Point2(30, 260));
spin->set_size(Point2(120, 1));
frame->add_child(spin);
@@ -216,7 +216,7 @@ public:
ProgressBar *progress = memnew(ProgressBar);
- progress->set_pos(Point2(30, 330));
+ progress->set_position(Point2(30, 330));
progress->set_size(Point2(120, 1));
frame->add_child(progress);
@@ -225,7 +225,7 @@ public:
MenuButton *menu_button = memnew(MenuButton);
menu_button->set_text("I'm a menu!");
- menu_button->set_pos(Point2(30, 380));
+ menu_button->set_position(Point2(30, 380));
menu_button->set_size(Point2(1, 1));
frame->add_child(menu_button);
@@ -244,7 +244,7 @@ public:
options->add_item("Hello, testing");
options->add_item("My Dearest");
- options->set_pos(Point2(230, 180));
+ options->set_position(Point2(230, 180));
options->set_size(Point2(1, 1));
frame->add_child(options);
@@ -253,7 +253,7 @@ public:
Tree * tree = memnew( Tree );
tree->set_columns(2);
- tree->set_pos( Point2( 230,210 ) );
+ tree->set_position( Point2( 230,210 ) );
tree->set_size( Point2( 150,250 ) );
@@ -281,7 +281,7 @@ public:
RichTextLabel *richtext = memnew(RichTextLabel);
- richtext->set_pos(Point2(600, 210));
+ richtext->set_position(Point2(600, 210));
richtext->set_size(Point2(180, 250));
richtext->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, 20);
@@ -337,21 +337,21 @@ public:
tabc->add_child(ctl);
label = memnew(Label);
label->set_text("Some Label");
- label->set_pos(Point2(20, 20));
+ label->set_position(Point2(20, 20));
ctl->add_child(label);
ctl = memnew(Control);
ctl->set_name("tab 3");
button = memnew(Button);
button->set_text("Some Button");
- button->set_pos(Point2(30, 50));
+ button->set_position(Point2(30, 50));
ctl->add_child(button);
tabc->add_child(ctl);
frame->add_child(tabc);
- tabc->set_pos(Point2(400, 210));
+ tabc->set_position(Point2(400, 210));
tabc->set_size(Point2(180, 250));
/*Ref<ImageTexture> text = memnew( ImageTexture );
@@ -359,14 +359,14 @@ public:
Sprite* sprite = memnew(Sprite);
sprite->set_texture(text);
- sprite->set_pos(Point2(300, 300));
+ sprite->set_position(Point2(300, 300));
frame->add_child(sprite);
sprite->show();
Sprite* sprite2 = memnew(Sprite);
sprite->set_texture(text);
sprite->add_child(sprite2);
- sprite2->set_pos(Point2(50, 50));
+ sprite2->set_position(Point2(50, 50));
sprite2->show();*/
}
};
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 43b309ae36..f646060d49 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -1167,27 +1167,25 @@ void GDNativeReloadNode::_notification(int p_what) {
// update placeholders (if any)
- GDNativeScript *script = NULL;
+ Set<GDNativeScript *> scripts;
for (Set<GDNativeScript *>::Element *S = GDNativeScriptLanguage::get_singleton()->script_list.front(); S; S = S->next()) {
if (lib->native_library->scripts.has(S->get()->get_script_name())) {
- script = S->get();
+ GDNativeScript *script = S->get();
script->script_data = lib->get_script_data(script->get_script_name());
- break;
+ scripts.insert(script);
}
}
- if (script == NULL) {
- // new class, cool. Nothing to do here
- continue;
- }
-
- if (script->placeholders.size() == 0)
- continue;
+ for (Set<GDNativeScript *>::Element *S = scripts.front(); S; S = S->next()) {
+ GDNativeScript *script = S->get();
+ if (script->placeholders.size() == 0)
+ continue;
- for (Set<PlaceHolderScriptInstance *>::Element *P = script->placeholders.front(); P; P = P->next()) {
- PlaceHolderScriptInstance *p = P->get();
- script->_update_placeholder(p);
+ for (Set<PlaceHolderScriptInstance *>::Element *P = script->placeholders.front(); P; P = P->next()) {
+ PlaceHolderScriptInstance *p = P->get();
+ script->_update_placeholder(p);
+ }
}
}
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index ee5bd66aa2..7247636920 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -1017,7 +1017,7 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
}
Rect2 pos = members->get_item_rect(ti);
- new_function_menu->set_pos(members->get_global_pos() + pos.pos + Vector2(0, pos.size.y));
+ new_function_menu->set_position(members->get_global_position() + pos.pos + Vector2(0, pos.size.y));
new_function_menu->popup();
return;
} else if (p_button == 0) {
@@ -2517,7 +2517,7 @@ void VisualScriptEditor::_graph_connect_to_empty(const String &p_from, int p_fro
port_action_pos = p_release_pos;
port_action_popup->set_size(Size2(1, 1));
- port_action_popup->set_pos(graph->get_global_pos() + p_release_pos);
+ port_action_popup->set_position(graph->get_global_position() + p_release_pos);
port_action_popup->popup();
}
@@ -2806,7 +2806,7 @@ void VisualScriptEditor::_default_value_edited(Node *p_button, int p_id, int p_i
existing = Variant::construct(pinfo.type, &existingp, 1, ce, false);
}
- default_value_edit->set_pos(p_button->cast_to<Control>()->get_global_pos() + Vector2(0, p_button->cast_to<Control>()->get_size().y));
+ default_value_edit->set_position(p_button->cast_to<Control>()->get_global_position() + Vector2(0, p_button->cast_to<Control>()->get_size().y));
default_value_edit->set_size(Size2(1, 1));
if (default_value_edit->edit(NULL, pinfo.name, pinfo.type, existing, pinfo.hint, pinfo.hint_string)) {
if (pinfo.hint == PROPERTY_HINT_MULTILINE_TEXT)
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 0cdc2bbddf..6772964c2f 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -245,7 +245,7 @@ bool OS_Android::is_mouse_grab_enabled() const {
return false;
}
-Point2 OS_Android::get_mouse_pos() const {
+Point2 OS_Android::get_mouse_position() const {
return Point2();
}
@@ -414,7 +414,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ev.mouse_button.y = touch[0].pos.y;
ev.mouse_button.global_x = touch[0].pos.x;
ev.mouse_button.global_y = touch[0].pos.y;
- input->set_mouse_pos(Point2(touch[0].pos.x, touch[0].pos.y));
+ input->set_mouse_position(Point2(touch[0].pos.x, touch[0].pos.y));
last_mouse = touch[0].pos;
input->parse_input_event(ev);
}
@@ -441,7 +441,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ev.mouse_motion.button_mask = BUTTON_MASK_LEFT;
ev.mouse_motion.x = p_points[0].pos.x;
ev.mouse_motion.y = p_points[0].pos.y;
- input->set_mouse_pos(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
+ input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
ev.mouse_motion.speed_x = input->get_last_mouse_speed().x;
ev.mouse_motion.speed_y = input->get_last_mouse_speed().y;
ev.mouse_motion.relative_x = p_points[0].pos.x - last_mouse.x;
@@ -493,7 +493,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ev.mouse_button.y = touch[0].pos.y;
ev.mouse_button.global_x = touch[0].pos.x;
ev.mouse_button.global_y = touch[0].pos.y;
- input->set_mouse_pos(Point2(touch[0].pos.x, touch[0].pos.y));
+ input->set_mouse_position(Point2(touch[0].pos.x, touch[0].pos.y));
input->parse_input_event(ev);
for (int i = 0; i < touch.size(); i++) {
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index 87ab0bb757..f1da2867f0 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -171,7 +171,7 @@ public:
virtual void set_mouse_show(bool p_show);
virtual void set_mouse_grab(bool p_grab);
virtual bool is_mouse_grab_enabled() const;
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/platform/bb10/os_bb10.cpp b/platform/bb10/os_bb10.cpp
index 0bfeff80da..b571d1640c 100644
--- a/platform/bb10/os_bb10.cpp
+++ b/platform/bb10/os_bb10.cpp
@@ -217,7 +217,7 @@ bool OSBB10::is_mouse_grab_enabled() const {
//*sigh* technology has evolved so much since i was a kid..
return false;
}
-Point2 OSBB10::get_mouse_pos() const {
+Point2 OSBB10::get_mouse_position() const {
return Point2();
}
@@ -348,7 +348,7 @@ void OSBB10::handle_screen_event(bps_event_t *event) {
ievent.device = 0;
ievent.mouse_motion.x = ievent.mouse_motion.global_x = mpos.x;
ievent.mouse_motion.y = ievent.mouse_motion.global_y = mpos.y;
- input->set_mouse_pos(Point2(ievent.mouse_motion.x, ievent.mouse_motion.y));
+ input->set_mouse_position(Point2(ievent.mouse_motion.x, ievent.mouse_motion.y));
ievent.mouse_motion.speed_x = input->get_last_mouse_speed().x;
ievent.mouse_motion.speed_y = input->get_last_mouse_speed().y;
ievent.mouse_motion.relative_x = mrel.x;
diff --git a/platform/bb10/os_bb10.h b/platform/bb10/os_bb10.h
index 42781c85d8..91149b6f68 100644
--- a/platform/bb10/os_bb10.h
+++ b/platform/bb10/os_bb10.h
@@ -113,7 +113,7 @@ public:
virtual void set_mouse_show(bool p_show);
virtual void set_mouse_grab(bool p_grab);
virtual bool is_mouse_grab_enabled() const;
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
index bb2495d99c..fb6d9afd85 100644
--- a/platform/haiku/haiku_direct_window.cpp
+++ b/platform/haiku/haiku_direct_window.cpp
@@ -215,7 +215,7 @@ void HaikuDirectWindow::HandleMouseMoved(BMessage *message) {
motion_event.mouse_motion.button_mask = GetMouseButtonState(buttons);
motion_event.mouse_motion.x = pos.x;
motion_event.mouse_motion.y = pos.y;
- input->set_mouse_pos(pos);
+ input->set_mouse_position(pos);
motion_event.mouse_motion.global_x = pos.x;
motion_event.mouse_motion.global_y = pos.y;
motion_event.mouse_motion.speed_x = input->get_last_mouse_speed().x;
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index 38aa6ae74d..3131f2bf1e 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -207,7 +207,7 @@ void OS_Haiku::swap_buffers() {
context_gl->swap_buffers();
}
-Point2 OS_Haiku::get_mouse_pos() const {
+Point2 OS_Haiku::get_mouse_position() const {
return window->GetLastMousePosition();
}
diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h
index 1d6c31e39d..83e44734a6 100644
--- a/platform/haiku/os_haiku.h
+++ b/platform/haiku/os_haiku.h
@@ -89,7 +89,7 @@ public:
virtual void make_rendering_thread();
virtual void swap_buffers();
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_cursor_shape(CursorShape p_shape);
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 0f693cd2cc..bc25afabea 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -233,7 +233,7 @@ void OSIPhone::mouse_button(int p_idx, int p_x, int p_y, bool p_pressed, bool p_
//mouse_list.pressed[p_idx] = p_pressed;
- input->set_mouse_pos(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
+ input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
ev.mouse_button.button_index = BUTTON_LEFT;
ev.mouse_button.doubleclick = p_doubleclick;
ev.mouse_button.pressed = p_pressed;
@@ -276,7 +276,7 @@ void OSIPhone::mouse_move(int p_idx, int p_prev_x, int p_prev_y, int p_x, int p_
ev.mouse_motion.relative_y = ev.mouse_motion.y - p_prev_x;
};
- input->set_mouse_pos(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
+ input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
ev.mouse_motion.speed_x = input->get_last_mouse_speed().x;
ev.mouse_motion.speed_y = input->get_last_mouse_speed().y;
ev.mouse_motion.button_mask = 1; // pressed
@@ -393,7 +393,7 @@ bool OSIPhone::is_mouse_grab_enabled() const {
return true;
};
-Point2 OSIPhone::get_mouse_pos() const {
+Point2 OSIPhone::get_mouse_position() const {
return Point2();
};
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h
index b5fe93240a..754dea073f 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/iphone/os_iphone.h
@@ -150,7 +150,7 @@ public:
virtual void set_mouse_show(bool p_show);
virtual void set_mouse_grab(bool p_grab);
virtual bool is_mouse_grab_enabled() const;
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 84312fd059..71754502cb 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -332,9 +332,9 @@ bool OS_JavaScript::is_mouse_grab_enabled() const {
return false;
}
-Point2 OS_JavaScript::get_mouse_pos() const {
+Point2 OS_JavaScript::get_mouse_position() const {
- return input->get_mouse_pos();
+ return input->get_mouse_position();
}
int OS_JavaScript::get_mouse_button_state() const {
@@ -522,7 +522,7 @@ void OS_JavaScript::push_input(const InputEvent &p_ev) {
InputEvent ev = p_ev;
if (ev.type == InputEvent::MOUSE_MOTION) {
- input->set_mouse_pos(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
+ input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
} else if (ev.type == InputEvent::MOUSE_BUTTON) {
last_button_mask = ev.mouse_button.button_mask;
}
@@ -604,7 +604,7 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP
ev.mouse_motion.button_mask = BUTTON_MASK_LEFT;
ev.mouse_motion.x = p_points[0].pos.x;
ev.mouse_motion.y = p_points[0].pos.y;
- input->set_mouse_pos(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
+ input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
ev.mouse_motion.speed_x = input->get_last_mouse_speed().x;
ev.mouse_motion.speed_y = input->get_last_mouse_speed().y;
ev.mouse_motion.relative_x = p_points[0].pos.x - last_mouse.x;
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index fe0be859e2..ea906c560f 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -122,7 +122,7 @@ public:
virtual void set_mouse_show(bool p_show);
virtual void set_mouse_grab(bool p_grab);
virtual bool is_mouse_grab_enabled() const;
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 01817d1b88..2ecc379a7f 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -145,7 +145,7 @@ public:
virtual void set_mouse_grab(bool p_grab);
virtual bool is_mouse_grab_enabled() const;
virtual void warp_mouse_pos(const Point2 &p_to);
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index b52890cafb..c6c2e6dab1 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -391,7 +391,7 @@ static int button_mask = 0;
ev.mouse_motion.relative_y = [event deltaY] * OS_OSX::singleton->_mouse_scale([[event window] backingScaleFactor]);
ev.mouse_motion.mod = translateFlags([event modifierFlags]);
- OS_OSX::singleton->input->set_mouse_pos(Point2(mouse_x, mouse_y));
+ OS_OSX::singleton->input->set_mouse_position(Point2(mouse_x, mouse_y));
OS_OSX::singleton->push_input(ev);
/*
@@ -1224,7 +1224,7 @@ void OS_OSX::warp_mouse_pos(const Point2 &p_to) {
}
}
-Point2 OS_OSX::get_mouse_pos() const {
+Point2 OS_OSX::get_mouse_position() const {
return Vector2(mouse_x, mouse_y);
}
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 5e1034a392..89af785d29 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -143,7 +143,7 @@ int OS_Server::get_mouse_button_state() const {
return 0;
}
-Point2 OS_Server::get_mouse_pos() const {
+Point2 OS_Server::get_mouse_position() const {
return Point2();
}
diff --git a/platform/server/os_server.h b/platform/server/os_server.h
index b360a1e183..7c29b1e232 100644
--- a/platform/server/os_server.h
+++ b/platform/server/os_server.h
@@ -88,7 +88,7 @@ public:
virtual void set_mouse_show(bool p_show);
virtual void set_mouse_grab(bool p_grab);
virtual bool is_mouse_grab_enabled() const;
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index bcce368ac4..8b7e821ab3 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -532,7 +532,7 @@ OSUWP::MouseMode OSUWP::get_mouse_mode() const {
return mouse_mode;
}
-Point2 OSUWP::get_mouse_pos() const {
+Point2 OSUWP::get_mouse_position() const {
return Point2(old_x, old_y);
}
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index eac98c80a1..88a1dddae3 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -190,7 +190,7 @@ public:
void set_mouse_mode(MouseMode p_mode);
MouseMode get_mouse_mode() const;
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 13c4da58e0..5b57da46d7 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -402,7 +402,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
SetCursorPos(pos.x, pos.y);
}
- input->set_mouse_pos(Point2(mm.x, mm.y));
+ input->set_mouse_position(Point2(mm.x, mm.y));
mm.speed_x = input->get_last_mouse_speed().x;
mm.speed_y = input->get_last_mouse_speed().y;
@@ -1318,7 +1318,7 @@ void OS_Windows::warp_mouse_pos(const Point2 &p_to) {
}
}
-Point2 OS_Windows::get_mouse_pos() const {
+Point2 OS_Windows::get_mouse_position() const {
return Point2(old_x, old_y);
}
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 4c8c2c950f..87eceafa02 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -191,7 +191,7 @@ public:
MouseMode get_mouse_mode() const;
virtual void warp_mouse_pos(const Point2 &p_to);
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index d2650684c3..2e2fe3ba8a 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -548,7 +548,7 @@ void OS_X11::set_mouse_mode(MouseMode p_mode) {
XWarpPointer(x11_display, None, x11_window,
0, 0, 0, 0, (int)center.x, (int)center.y);
- input->set_mouse_pos(center);
+ input->set_mouse_position(center);
} else {
do_mouse_warp = false;
}
@@ -580,7 +580,7 @@ int OS_X11::get_mouse_button_state() const {
return last_button_state;
}
-Point2 OS_X11::get_mouse_pos() const {
+Point2 OS_X11::get_mouse_position() const {
return last_mouse_pos;
}
@@ -1451,7 +1451,7 @@ void OS_X11::process_xevents() {
motion_event.mouse_motion.button_mask = get_mouse_button_state(event.xmotion.state);
motion_event.mouse_motion.x = pos.x;
motion_event.mouse_motion.y = pos.y;
- input->set_mouse_pos(pos);
+ input->set_mouse_position(pos);
motion_event.mouse_motion.global_x = pos.x;
motion_event.mouse_motion.global_y = pos.y;
motion_event.mouse_motion.speed_x = input->get_last_mouse_speed().x;
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 6bc072099c..44994e40ec 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -202,7 +202,7 @@ public:
MouseMode get_mouse_mode() const;
virtual void warp_mouse_pos(const Point2 &p_to);
- virtual Point2 get_mouse_pos() const;
+ virtual Point2 get_mouse_position() const;
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 8c8ac835e8..f699c8f0e8 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -695,16 +695,16 @@ InputEvent CanvasItem::make_input_local(const InputEvent &p_event) const {
return p_event.xform_by((get_canvas_transform() * get_global_transform()).affine_inverse());
}
-Vector2 CanvasItem::get_global_mouse_pos() const {
+Vector2 CanvasItem::get_global_mouse_position() const {
ERR_FAIL_COND_V(!get_viewport(), Vector2());
- return get_canvas_transform().affine_inverse().xform(get_viewport()->get_mouse_pos());
+ return get_canvas_transform().affine_inverse().xform(get_viewport()->get_mouse_position());
}
Vector2 CanvasItem::get_local_mouse_pos() const {
ERR_FAIL_COND_V(!get_viewport(), Vector2());
- return get_global_transform().affine_inverse().xform(get_global_mouse_pos());
+ return get_global_transform().affine_inverse().xform(get_global_mouse_position());
}
void CanvasItem::_bind_methods() {
@@ -771,7 +771,7 @@ void CanvasItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_viewport_rect"), &CanvasItem::get_viewport_rect);
ClassDB::bind_method(D_METHOD("get_canvas_transform"), &CanvasItem::get_canvas_transform);
ClassDB::bind_method(D_METHOD("get_local_mouse_pos"), &CanvasItem::get_local_mouse_pos);
- ClassDB::bind_method(D_METHOD("get_global_mouse_pos"), &CanvasItem::get_global_mouse_pos);
+ ClassDB::bind_method(D_METHOD("get_global_mouse_position"), &CanvasItem::get_global_mouse_position);
ClassDB::bind_method(D_METHOD("get_canvas"), &CanvasItem::get_canvas);
ClassDB::bind_method(D_METHOD("get_world_2d"), &CanvasItem::get_world_2d);
//ClassDB::bind_method(D_METHOD("get_viewport"),&CanvasItem::get_viewport);
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index ce72f7e0c9..72fe5b93da 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -212,7 +212,7 @@ public:
InputEvent make_input_local(const InputEvent &pevent) const;
Vector2 make_canvas_pos_local(const Vector2 &screen_point) const;
- Vector2 get_global_mouse_pos() const;
+ Vector2 get_global_mouse_position() const;
Vector2 get_local_mouse_pos() const;
void set_notify_local_transform(bool p_enable);
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index d6c68a1d82..c4ea42d461 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -611,7 +611,7 @@ void AnimationPlayer::_animation_update_transforms() {
case SP_NONE: pa->object->set(pa->prop,pa->value_accum); break; //you are not speshul
- case SP_NODE2D_POS: static_cast<Node2D*>(pa->object)->set_pos(pa->value_accum); break;
+ case SP_NODE2D_POS: static_cast<Node2D*>(pa->object)->set_position(pa->value_accum); break;
case SP_NODE2D_ROT: static_cast<Node2D*>(pa->object)->set_rot(Math::deg2rad(pa->value_accum)); break;
case SP_NODE2D_SCALE: static_cast<Node2D*>(pa->object)->set_scale(pa->value_accum); break;
}*/
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 8a94d4918f..adb5e2f0b6 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -591,7 +591,7 @@ void ColorPickerButton::_color_changed(const Color &p_color) {
void ColorPickerButton::pressed() {
Size2 ms = Size2(300, picker->get_combined_minimum_size().height + 10);
- popup->set_pos(get_global_pos() - Size2(0, ms.height));
+ popup->set_position(get_global_position() - Size2(0, ms.height));
popup->set_size(ms);
popup->popup();
picker->set_focus_on_line_edit();
diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp
index 0bc9205175..c6f73fe6e6 100644
--- a/scene/gui/color_ramp_edit.cpp
+++ b/scene/gui/color_ramp_edit.cpp
@@ -62,7 +62,7 @@ void ColorRampEdit::_show_color_picker() {
return;
Size2 ms = Size2(350, picker->get_combined_minimum_size().height + 10);
picker->set_pick_color(points[grabbed].color);
- popup->set_pos(get_global_pos() - Vector2(ms.width - get_size().width, ms.height));
+ popup->set_position(get_global_position() - Vector2(ms.width - get_size().width, ms.height));
popup->set_size(ms);
popup->popup();
}
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index d3096d7806..c428d524a4 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -107,7 +107,7 @@ void Container::fit_child_in_rect(Control *p_child, const Rect2 &p_rect) {
for (int i = 0; i < 4; i++)
p_child->set_anchor(Margin(i), ANCHOR_BEGIN);
- p_child->set_pos(r.pos);
+ p_child->set_position(r.pos);
p_child->set_size(r.size);
p_child->set_rotation(0);
p_child->set_scale(Vector2(1, 1));
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index bda54181c7..e62a993651 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -58,7 +58,7 @@ void Control::edit_set_state(const Variant &p_state) {
Dictionary s = p_state;
Rect2 state = s["rect"];
- set_pos(state.pos);
+ set_position(state.pos);
set_size(state.size);
set_rotation(s["rot"]);
set_scale(s["scale"]);
@@ -96,13 +96,13 @@ void Control::edit_set_rect(const Rect2 &p_edit_rect) {
postxf.set_rotation_and_scale(data.rotation, data.scale);
Vector2 new_pos = postxf.xform(p_edit_rect.pos);
- Vector2 pos = get_pos() + new_pos;
+ Vector2 pos = get_position() + new_pos;
Rect2 new_rect = get_rect();
new_rect.pos = pos.snapped(Vector2(1, 1));
new_rect.size = p_edit_rect.size.snapped(Vector2(1, 1));
- set_pos(new_rect.pos);
+ set_position(new_rect.pos);
set_size(new_rect.size);
}
@@ -353,7 +353,7 @@ void Control::remove_child_notify(Node *p_child) {
void Control::_update_canvas_item_transform() {
- Transform2D xform = Transform2D(data.rotation, get_pos());
+ Transform2D xform = Transform2D(data.rotation, get_position());
xform.scale_basis(data.scale);
VisualServer::get_singleton()->canvas_item_set_transform(get_canvas_item(), xform);
}
@@ -1390,12 +1390,12 @@ Size2 Control::get_end() const {
return Size2(data.margin[2], data.margin[3]);
}
-Point2 Control::get_global_pos() const {
+Point2 Control::get_global_position() const {
return get_global_transform().get_origin();
}
-void Control::set_global_pos(const Point2 &p_point) {
+void Control::set_global_position(const Point2 &p_point) {
Transform2D inv;
@@ -1404,10 +1404,10 @@ void Control::set_global_pos(const Point2 &p_point) {
inv = data.parent_canvas_item->get_global_transform().affine_inverse();
}
- set_pos(inv.xform(p_point));
+ set_position(inv.xform(p_point));
}
-void Control::set_pos(const Size2 &p_point) {
+void Control::set_position(const Size2 &p_point) {
float pw = _get_parent_range(0);
float ph = _get_parent_range(1);
@@ -1459,7 +1459,7 @@ void Control::set_size(const Size2 &p_size) {
_size_changed();
}
-Size2 Control::get_pos() const {
+Size2 Control::get_position() const {
return data.pos_cache;
}
@@ -1471,7 +1471,7 @@ Size2 Control::get_size() const {
Rect2 Control::get_global_rect() const {
- return Rect2(get_global_pos(), get_size());
+ return Rect2(get_global_position(), get_size());
}
Rect2 Control::get_window_rect() const {
@@ -1483,7 +1483,7 @@ Rect2 Control::get_window_rect() const {
Rect2 Control::get_rect() const {
- return Rect2(get_pos(), get_size());
+ return Rect2(get_position(), get_size());
}
Rect2 Control::get_item_rect() const {
@@ -1886,7 +1886,7 @@ Control::CursorShape Control::get_cursor_shape(const Point2 &p_pos) const {
Transform2D Control::get_transform() const {
- Transform2D xform = Transform2D(data.rotation, get_pos());
+ Transform2D xform = Transform2D(data.rotation, get_position());
xform.scale_basis(data.scale);
return xform;
}
@@ -2315,10 +2315,10 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_anchor_and_margin", "margin", "anchor_mode", "offset"), &Control::set_anchor_and_margin);
ClassDB::bind_method(D_METHOD("set_begin", "pos"), &Control::set_begin);
ClassDB::bind_method(D_METHOD("set_end", "pos"), &Control::set_end);
- ClassDB::bind_method(D_METHOD("set_pos", "pos"), &Control::set_pos);
+ ClassDB::bind_method(D_METHOD("set_position", "pos"), &Control::set_position);
ClassDB::bind_method(D_METHOD("set_size", "size"), &Control::set_size);
ClassDB::bind_method(D_METHOD("set_custom_minimum_size", "size"), &Control::set_custom_minimum_size);
- ClassDB::bind_method(D_METHOD("set_global_pos", "pos"), &Control::set_global_pos);
+ ClassDB::bind_method(D_METHOD("set_global_position", "pos"), &Control::set_global_position);
ClassDB::bind_method(D_METHOD("set_rotation", "radians"), &Control::set_rotation);
ClassDB::bind_method(D_METHOD("set_rotation_deg", "degrees"), &Control::set_rotation_deg);
// TODO: Obsolete this method (old name) properly (GH-4397)
@@ -2327,7 +2327,7 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_margin", "margin"), &Control::get_margin);
ClassDB::bind_method(D_METHOD("get_begin"), &Control::get_begin);
ClassDB::bind_method(D_METHOD("get_end"), &Control::get_end);
- ClassDB::bind_method(D_METHOD("get_pos"), &Control::get_pos);
+ ClassDB::bind_method(D_METHOD("get_position"), &Control::get_position);
ClassDB::bind_method(D_METHOD("get_size"), &Control::get_size);
ClassDB::bind_method(D_METHOD("get_rotation"), &Control::get_rotation);
ClassDB::bind_method(D_METHOD("get_rotation_deg"), &Control::get_rotation_deg);
@@ -2336,7 +2336,7 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_scale"), &Control::get_scale);
ClassDB::bind_method(D_METHOD("get_custom_minimum_size"), &Control::get_custom_minimum_size);
ClassDB::bind_method(D_METHOD("get_parent_area_size"), &Control::get_size);
- ClassDB::bind_method(D_METHOD("get_global_pos"), &Control::get_global_pos);
+ ClassDB::bind_method(D_METHOD("get_global_position"), &Control::get_global_position);
ClassDB::bind_method(D_METHOD("get_rect"), &Control::get_rect);
ClassDB::bind_method(D_METHOD("get_global_rect"), &Control::get_global_rect);
ClassDB::bind_method(D_METHOD("set_area_as_parent_rect", "margin"), &Control::set_area_as_parent_rect, DEFVAL(0));
@@ -2438,7 +2438,7 @@ void Control::_bind_methods() {
ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "margin_bottom", PROPERTY_HINT_RANGE, "-4096,4096"), "set_margin", "get_margin", MARGIN_BOTTOM);
ADD_GROUP("Rect", "rect_");
- ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_pos", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_pos", "get_pos");
+ ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_position", "get_position");
ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_size", "get_size");
ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "rect_min_size"), "set_custom_minimum_size", "get_custom_minimum_size");
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "rect_rotation", PROPERTY_HINT_RANGE, "-1080,1080,0.01"), "set_rotation_deg", "get_rotation_deg");
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 9075c5a6ed..5834d1550a 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -277,12 +277,12 @@ public:
Point2 get_begin() const;
Point2 get_end() const;
- void set_pos(const Point2 &p_point);
+ void set_position(const Point2 &p_point);
void set_size(const Size2 &p_size);
- void set_global_pos(const Point2 &p_point);
+ void set_global_position(const Point2 &p_point);
- Point2 get_pos() const;
- Point2 get_global_pos() const;
+ Point2 get_position() const;
+ Point2 get_global_position() const;
Size2 get_size() const;
Rect2 get_rect() const;
Rect2 get_global_rect() const;
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index c53b2bdb21..2ec72a2948 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -46,7 +46,7 @@ void WindowDialog::_fix_size() {
// Perhaps this should be called when the viewport resizes as well or windows go out of bounds...
// Ensure the whole window is visible.
- Point2i pos = get_global_pos();
+ Point2i pos = get_global_position();
Size2i size = get_size();
Size2i viewport_size = get_viewport_rect().size;
@@ -59,7 +59,7 @@ void WindowDialog::_fix_size() {
pos.x = MAX(left, MIN(pos.x, viewport_size.x - size.x - right));
pos.y = MAX(top, MIN(pos.y, viewport_size.y - size.y - bottom));
- set_global_pos(pos);
+ set_global_position(pos);
// Also resize the window to fit if a resize should be possible at all.
if (resizable) {
@@ -98,8 +98,8 @@ void WindowDialog::_gui_input(const InputEvent &p_event) {
// Begin a possible dragging operation.
drag_type = _drag_hit_test(Point2(p_event.mouse_button.x, p_event.mouse_button.y));
if (drag_type != DRAG_NONE)
- drag_offset = get_global_mouse_pos() - get_pos();
- drag_offset_far = get_pos() + get_size() - get_global_mouse_pos();
+ drag_offset = get_global_mouse_position() - get_position();
+ drag_offset_far = get_position() + get_size() - get_global_mouse_position();
} else if (drag_type != DRAG_NONE && !p_event.mouse_button.pressed) {
// End a dragging operation.
drag_type = DRAG_NONE;
@@ -136,7 +136,7 @@ void WindowDialog::_gui_input(const InputEvent &p_event) {
set_default_cursor_shape(cursor);
} else {
// Update while in a dragging operation.
- Point2 global_pos = get_global_mouse_pos();
+ Point2 global_pos = get_global_mouse_position();
global_pos.y = MAX(global_pos.y, 0); // Ensure title bar stays visible.
Rect2 rect = get_rect();
@@ -164,7 +164,7 @@ void WindowDialog::_gui_input(const InputEvent &p_event) {
}
set_size(rect.size);
- set_pos(rect.pos);
+ set_position(rect.pos);
}
}
}
@@ -416,14 +416,14 @@ void AcceptDialog::_update_child_rects() {
if (c == hbc || c == label || c == get_close_button() || c->is_set_as_toplevel())
continue;
- c->set_pos(cpos);
+ c->set_position(cpos);
c->set_size(csize);
}
cpos.y += csize.y + margin;
csize.y = hminsize.y;
- hbc->set_pos(cpos);
+ hbc->set_position(cpos);
hbc->set_size(csize);
}
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 76baf20526..0c092a4e17 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -140,13 +140,13 @@ void GraphEdit::_update_scroll_offset() {
Point2 pos = gn->get_offset() * zoom;
pos -= Point2(h_scroll->get_value(), v_scroll->get_value());
- gn->set_pos(pos);
+ gn->set_position(pos);
if (gn->get_scale() != Vector2(zoom, zoom)) {
gn->set_scale(Vector2(zoom, zoom));
}
}
- connections_layer->set_pos(-Point2(h_scroll->get_value(), v_scroll->get_value()));
+ connections_layer->set_position(-Point2(h_scroll->get_value(), v_scroll->get_value()));
set_block_minimum_size_adjust(false);
awaiting_scroll_offset_update = false;
}
@@ -350,14 +350,14 @@ bool GraphEdit::_filter_input(const Point2 &p_point) {
for (int j = 0; j < gn->get_connection_output_count(); j++) {
- Vector2 pos = gn->get_connection_output_pos(j) + gn->get_pos();
+ Vector2 pos = gn->get_connection_output_pos(j) + gn->get_position();
if (pos.distance_to(p_point) < grab_r)
return true;
}
for (int j = 0; j < gn->get_connection_input_count(); j++) {
- Vector2 pos = gn->get_connection_input_pos(j) + gn->get_pos();
+ Vector2 pos = gn->get_connection_input_pos(j) + gn->get_position();
if (pos.distance_to(p_point) < grab_r) {
return true;
}
@@ -383,7 +383,7 @@ void GraphEdit::_top_layer_input(const InputEvent &p_ev) {
for (int j = 0; j < gn->get_connection_output_count(); j++) {
- Vector2 pos = gn->get_connection_output_pos(j) + gn->get_pos();
+ Vector2 pos = gn->get_connection_output_pos(j) + gn->get_position();
if (pos.distance_to(mpos) < grab_r) {
if (valid_left_disconnect_types.has(gn->get_connection_output_type(j))) {
@@ -430,7 +430,7 @@ void GraphEdit::_top_layer_input(const InputEvent &p_ev) {
for (int j = 0; j < gn->get_connection_input_count(); j++) {
- Vector2 pos = gn->get_connection_input_pos(j) + gn->get_pos();
+ Vector2 pos = gn->get_connection_input_pos(j) + gn->get_position();
if (pos.distance_to(mpos) < grab_r) {
@@ -497,7 +497,7 @@ void GraphEdit::_top_layer_input(const InputEvent &p_ev) {
if (!connecting_out) {
for (int j = 0; j < gn->get_connection_output_count(); j++) {
- Vector2 pos = gn->get_connection_output_pos(j) + gn->get_pos();
+ Vector2 pos = gn->get_connection_output_pos(j) + gn->get_position();
int type = gn->get_connection_output_type(j);
if ((type == connecting_type || valid_connection_types.has(ConnType(type, connecting_type))) && pos.distance_to(mpos) < grab_r) {
@@ -512,7 +512,7 @@ void GraphEdit::_top_layer_input(const InputEvent &p_ev) {
for (int j = 0; j < gn->get_connection_input_count(); j++) {
- Vector2 pos = gn->get_connection_input_pos(j) + gn->get_pos();
+ Vector2 pos = gn->get_connection_input_pos(j) + gn->get_position();
int type = gn->get_connection_input_type(j);
if ((type == connecting_type || valid_connection_types.has(ConnType(type, connecting_type))) && pos.distance_to(mpos) < grab_r) {
connecting_target = true;
@@ -704,7 +704,7 @@ void GraphEdit::_top_layer_draw() {
pos = from->get_connection_output_pos(connecting_index);
else
pos = from->get_connection_input_pos(connecting_index);
- pos += from->get_pos();
+ pos += from->get_position();
Vector2 topos;
topos = connecting_to;
@@ -1229,7 +1229,7 @@ GraphEdit::GraphEdit() {
HBoxContainer *zoom_hb = memnew(HBoxContainer);
top_layer->add_child(zoom_hb);
- zoom_hb->set_pos(Vector2(10, 10));
+ zoom_hb->set_position(Vector2(10, 10));
zoom_minus = memnew(ToolButton);
zoom_hb->add_child(zoom_minus);
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 30bc4d1663..9abf9649c0 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -51,7 +51,7 @@ void LineEdit::_gui_input(InputEvent p_event) {
const InputEventMouseButton &b = p_event.mouse_button;
if (b.pressed && b.button_index == BUTTON_RIGHT) {
- menu->set_pos(get_global_transform().xform(get_local_mouse_pos()));
+ menu->set_position(get_global_transform().xform(get_local_mouse_pos()));
menu->set_size(Vector2(1, 1));
menu->popup();
grab_focus();
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 16277ed0d0..cf468f2257 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -50,10 +50,10 @@ void MenuButton::pressed() {
emit_signal("about_to_show");
Size2 size = get_size();
- Point2 gp = get_global_pos();
- popup->set_global_pos(gp + Size2(0, size.height));
+ Point2 gp = get_global_position();
+ popup->set_global_position(gp + Size2(0, size.height));
popup->set_size(Size2(size.width, 0));
- popup->set_parent_rect(Rect2(Point2(gp - popup->get_global_pos()), get_size()));
+ popup->set_parent_rect(Rect2(Point2(gp - popup->get_global_position()), get_size()));
popup->popup();
popup->call_deferred("grab_click_focus");
popup->set_invalidate_click_until_motion();
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 0bb68e7fa1..0806d35d48 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -87,7 +87,7 @@ void OptionButton::_selected(int p_which) {
void OptionButton::pressed() {
Size2 size = get_size();
- popup->set_global_pos(get_global_pos() + Size2(0, size.height));
+ popup->set_global_position(get_global_position() + Size2(0, size.height));
popup->set_size(Size2(size.width, 0));
popup->popup();
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 523633166c..7d0b91a366 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -58,12 +58,12 @@ void Popup::_notification(int p_what) {
void Popup::_fix_size() {
#if 0
- Point2 pos = get_pos();
+ Point2 pos = get_position();
Size2 size = get_size();
Point2 window_size = window==this ? get_parent_area_size() :window->get_size();
#else
- Point2 pos = get_global_pos();
+ Point2 pos = get_global_position();
Size2 size = get_size();
Point2 window_size = get_viewport_rect().size;
@@ -79,10 +79,10 @@ void Popup::_fix_size() {
pos.y = 0;
#if 0
if (pos!=get_pos())
- set_pos(pos);
+ set_position(pos);
#else
- if (pos != get_pos())
- set_global_pos(pos);
+ if (pos != get_position())
+ set_global_position(pos);
#endif
}
@@ -171,7 +171,7 @@ void Popup::popup_centered(const Size2 &p_size) {
rect.size = p_size == Size2() ? get_size() : p_size;
rect.pos = ((window_size - rect.size) / 2.0).floor();
- set_pos(rect.pos);
+ set_position(rect.pos);
set_size(rect.size);
show_modal(exclusive);
@@ -194,7 +194,7 @@ void Popup::popup_centered_ratio(float p_screen_ratio) {
Point2 window_size = get_viewport_rect().size;
rect.size = (window_size * p_screen_ratio).floor();
rect.pos = ((window_size - rect.size) / 2.0).floor();
- set_pos(rect.pos);
+ set_position(rect.pos);
set_size(rect.size);
show_modal(exclusive);
@@ -216,7 +216,7 @@ void Popup::popup(const Rect2 &bounds) {
// Fit the popup into the optionally provided bounds.
if (!bounds.has_no_area()) {
- set_pos(bounds.pos);
+ set_position(bounds.pos);
set_size(bounds.size);
}
_fix_size();
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index de16f3c525..6ac6eac655 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -169,7 +169,7 @@ void PopupMenu::_activate_submenu(int over) {
if (pm->is_visible_in_tree())
return; //already visible!
- Point2 p = get_global_pos();
+ Point2 p = get_global_position();
Rect2 pr(p, get_size());
Ref<StyleBox> style = get_stylebox("panel");
@@ -179,13 +179,13 @@ void PopupMenu::_activate_submenu(int over) {
if (pos.x + size.width > get_viewport_rect().size.width)
pos.x = p.x - size.width;
- pm->set_pos(pos);
+ pm->set_position(pos);
pm->popup();
PopupMenu *pum = pm->cast_to<PopupMenu>();
if (pum) {
- pr.pos -= pum->get_global_pos();
+ pr.pos -= pum->get_global_position();
pum->clear_autohide_areas();
pum->add_autohide_area(Rect2(pr.pos.x, pr.pos.y, pr.size.x, items[over]._ofs_cache));
if (over < items.size() - 1) {
@@ -266,15 +266,15 @@ void PopupMenu::_gui_input(const InputEvent &p_event) {
case BUTTON_WHEEL_DOWN: {
- if (get_global_pos().y + get_size().y > get_viewport_rect().size.y) {
+ if (get_global_position().y + get_size().y > get_viewport_rect().size.y) {
int vseparation = get_constant("vseparation");
Ref<Font> font = get_font("font");
- Point2 pos = get_pos();
+ Point2 pos = get_position();
int s = (vseparation + font->get_height()) * 3;
pos.y -= s;
- set_pos(pos);
+ set_position(pos);
//update hover
InputEvent ie;
@@ -286,15 +286,15 @@ void PopupMenu::_gui_input(const InputEvent &p_event) {
} break;
case BUTTON_WHEEL_UP: {
- if (get_global_pos().y < 0) {
+ if (get_global_position().y < 0) {
int vseparation = get_constant("vseparation");
Ref<Font> font = get_font("font");
- Point2 pos = get_pos();
+ Point2 pos = get_position();
int s = (vseparation + font->get_height()) * 3;
pos.y += s;
- set_pos(pos);
+ set_position(pos);
//update hover
InputEvent ie;
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 0ef6fbdebd..0c7a58dc16 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -79,11 +79,11 @@ void TabContainer::_gui_input(const InputEvent &p_event) {
if (popup && pos.x > size.width - menu->get_width()) {
emit_signal("pre_popup_pressed");
- Vector2 popup_pos = get_global_pos();
+ Vector2 popup_pos = get_global_position();
popup_pos.x += size.width - popup->get_size().width;
popup_pos.y += menu->get_height();
- popup->set_global_pos(popup_pos);
+ popup->set_global_position(popup_pos);
popup->popup();
return;
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 80c6a23b61..69a90535df 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -360,7 +360,7 @@ void TextEdit::_click_selection_held() {
if (Input::get_singleton()->is_mouse_button_pressed(BUTTON_LEFT) && selection.selecting_mode != Selection::MODE_NONE) {
- Point2 mp = Input::get_singleton()->get_mouse_pos() - get_global_pos();
+ Point2 mp = Input::get_singleton()->get_mouse_position() - get_global_position();
int row, col;
_get_mouse_pos(Point2i(mp.x, mp.y), row, col);
@@ -1586,7 +1586,7 @@ void TextEdit::_gui_input(const InputEvent &p_gui_input) {
if (mb.button_index == BUTTON_RIGHT && context_menu_enabled) {
- menu->set_pos(get_global_transform().xform(get_local_mouse_pos()));
+ menu->set_position(get_global_transform().xform(get_local_mouse_pos()));
menu->set_size(Vector2(1, 1));
menu->popup();
grab_focus();
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 1cfaa58b92..bc7b7485d8 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1041,7 +1041,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
cache.selected->draw(ci, r);
}
if (text_editor->is_visible_in_tree()) {
- text_editor->set_pos(get_global_pos() + r.pos);
+ text_editor->set_position(get_global_position() + r.pos);
}
}
@@ -1503,7 +1503,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool
cache.click_id = c.buttons[j].id;
cache.click_item = p_item;
cache.click_column = col;
- cache.click_pos = get_global_mouse_pos() - get_global_pos();
+ cache.click_pos = get_global_mouse_position() - get_global_position();
update();
//emit_signal("button_pressed");
return -1;
@@ -1627,7 +1627,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool
}
popup_menu->set_size(Size2(col_width, 0));
- popup_menu->set_pos(get_global_pos() + Point2i(col_ofs, _get_title_button_height() + y_ofs + item_h) - cache.offset);
+ popup_menu->set_position(get_global_position() + Point2i(col_ofs, _get_title_button_height() + y_ofs + item_h) - cache.offset);
popup_menu->popup();
popup_edited_item = p_item;
popup_edited_item_col = col;
@@ -1693,7 +1693,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool
case TreeItem::CELL_MODE_CUSTOM: {
edited_item = p_item;
edited_col = col;
- custom_popup_rect = Rect2i(get_global_pos() + Point2i(col_ofs, _get_title_button_height() + y_ofs + item_h - cache.offset.y), Size2(get_column_width(col), item_h));
+ custom_popup_rect = Rect2i(get_global_position() + Point2i(col_ofs, _get_title_button_height() + y_ofs + item_h - cache.offset.y), Size2(get_column_width(col), item_h));
emit_signal("custom_popup_edited", ((bool)(x >= (col_width - item_h / 2))));
bring_up_editor = false;
@@ -1710,7 +1710,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool
popup_edited_item = p_item;
popup_edited_item_col = col;
- pressing_item_rect = Rect2(get_global_pos() + Point2i(col_ofs, _get_title_button_height() + y_ofs) - cache.offset, Size2(col_width, item_h));
+ pressing_item_rect = Rect2(get_global_position() + Point2i(col_ofs, _get_title_button_height() + y_ofs) - cache.offset, Size2(col_width, item_h));
pressing_for_editor_text = editor_text;
pressing_for_editor = true;
@@ -2379,7 +2379,7 @@ bool Tree::edit_selected() {
edited_item = s;
edited_col = col;
- custom_popup_rect = Rect2i(get_global_pos() + rect.pos, rect.size);
+ custom_popup_rect = Rect2i(get_global_position() + rect.pos, rect.size);
emit_signal("custom_popup_edited", false);
item_edited(col, s);
@@ -2394,7 +2394,7 @@ bool Tree::edit_selected() {
}
popup_menu->set_size(Size2(rect.size.width, 0));
- popup_menu->set_pos(get_global_pos() + rect.pos + Point2i(0, rect.size.height));
+ popup_menu->set_position(get_global_position() + rect.pos + Point2i(0, rect.size.height));
popup_menu->popup();
popup_edited_item = s;
popup_edited_item_col = col;
@@ -2402,8 +2402,8 @@ bool Tree::edit_selected() {
} else if (c.mode == TreeItem::CELL_MODE_STRING || c.mode == TreeItem::CELL_MODE_RANGE || c.mode == TreeItem::CELL_MODE_RANGE_EXPRESSION) {
- Point2i textedpos = get_global_pos() + rect.pos;
- text_editor->set_pos(textedpos);
+ Point2i textedpos = get_global_position() + rect.pos;
+ text_editor->set_position(textedpos);
text_editor->set_size(rect.size);
text_editor->clear();
text_editor->set_text(c.mode == TreeItem::CELL_MODE_STRING ? c.text : String::num(c.val, Math::step_decimals(c.step)));
@@ -2411,7 +2411,7 @@ bool Tree::edit_selected() {
if (c.mode == TreeItem::CELL_MODE_RANGE || c.mode == TreeItem::CELL_MODE_RANGE_EXPRESSION) {
- value_editor->set_pos(textedpos + Point2i(0, text_editor->get_size().height));
+ value_editor->set_position(textedpos + Point2i(0, text_editor->get_size().height));
value_editor->set_size(Size2(rect.size.width, 1));
value_editor->show_modal();
updating_value_editor = true;
@@ -2529,7 +2529,7 @@ void Tree::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAG_BEGIN) {
single_select_defer = NULL;
- if (cache.scroll_speed > 0 && get_rect().has_point(get_viewport()->get_mouse_pos() - get_global_pos())) {
+ if (cache.scroll_speed > 0 && get_rect().has_point(get_viewport()->get_mouse_position() - get_global_position())) {
scrolling = true;
set_fixed_process(true);
}
@@ -2577,7 +2577,7 @@ void Tree::_notification(int p_what) {
}
if (scrolling) {
- Point2 point = get_viewport()->get_mouse_pos() - get_global_pos();
+ Point2 point = get_viewport()->get_mouse_position() - get_global_position();
if (point.x < cache.scroll_border) {
point.x -= cache.scroll_border;
} else if (point.x > get_size().width - cache.scroll_border) {
diff --git a/scene/io/resource_format_wav.cpp b/scene/io/resource_format_wav.cpp
index 53eefd26fe..dabbb79de3 100644
--- a/scene/io/resource_format_wav.cpp
+++ b/scene/io/resource_format_wav.cpp
@@ -98,7 +98,7 @@ RES ResourceFormatLoaderWAV::load(const String &p_path, const String& p_original
/* chunk size */
uint32_t chunksize=file->get_32();
- uint32_t file_pos=file->get_pos(); //save file pos, so we can skip to next chunk safely
+ uint32_t file_pos=file->get_position(); //save file pos, so we can skip to next chunk safely
if (file->eof_reached()) {
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 31c9cb15a8..406640275c 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1444,9 +1444,9 @@ void Viewport::_vp_unhandled_input(const InputEvent &p_ev) {
unhandled_input(ev);
}
-Vector2 Viewport::get_mouse_pos() const {
+Vector2 Viewport::get_mouse_position() const {
- return (get_final_transform().affine_inverse() * _get_input_pre_xform()).xform(Input::get_singleton()->get_mouse_pos() - _get_window_offset());
+ return (get_final_transform().affine_inverse() * _get_input_pre_xform()).xform(Input::get_singleton()->get_mouse_position() - _get_window_offset());
}
void Viewport::warp_mouse(const Vector2 &p_pos) {
@@ -1538,7 +1538,7 @@ void Viewport::_gui_show_tooltip() {
else if (r.pos.y < 0)
r.pos.y = 0;
- gui.tooltip_popup->set_global_pos(r.pos);
+ gui.tooltip_popup->set_global_position(r.pos);
gui.tooltip_popup->set_size(r.size);
gui.tooltip_popup->raise();
@@ -1640,7 +1640,7 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_
Control *c = p_node->cast_to<Control>();
if (c) {
- //print_line("at "+String(c->get_path())+" POS "+c->get_pos()+" bt "+p_xform);
+ //print_line("at "+String(c->get_path())+" POS "+c->get_position()+" bt "+p_xform);
}
//subwindows first!!
@@ -1993,7 +1993,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
gui.mouse_over = over;
if (gui.drag_preview) {
- gui.drag_preview->set_pos(mpos);
+ gui.drag_preview->set_position(mpos);
}
if (!over) {
@@ -2237,7 +2237,7 @@ void Viewport::_gui_set_drag_preview(Control *p_base, Control *p_control) {
memdelete(gui.drag_preview);
}
p_control->set_as_toplevel(true);
- p_control->set_pos(gui.last_mouse_pos);
+ p_control->set_position(gui.last_mouse_pos);
p_base->get_root_parent_control()->add_child(p_control); //add as child of viewport
p_control->raise();
if (gui.drag_preview) {
@@ -2649,7 +2649,7 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_audio_listener_2d", "enable"), &Viewport::is_audio_listener_2d);
ClassDB::bind_method(D_METHOD("set_attach_to_screen_rect", "rect"), &Viewport::set_attach_to_screen_rect);
- ClassDB::bind_method(D_METHOD("get_mouse_pos"), &Viewport::get_mouse_pos);
+ ClassDB::bind_method(D_METHOD("get_mouse_position"), &Viewport::get_mouse_position);
ClassDB::bind_method(D_METHOD("warp_mouse", "to_pos"), &Viewport::warp_mouse);
ClassDB::bind_method(D_METHOD("gui_has_modal_stack"), &Viewport::gui_has_modal_stack);
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 242ee4b4e6..d784fc8ee9 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -400,7 +400,7 @@ public:
void set_attach_to_screen_rect(const Rect2 &p_rect);
Rect2 get_attach_to_screen_rect() const;
- Vector2 get_mouse_pos() const;
+ Vector2 get_mouse_position() const;
void warp_mouse(const Vector2 &p_pos);
void set_physics_object_picking(bool p_enable);