summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-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.cpp34
-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
29 files changed, 157 insertions, 157 deletions
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 b9e366eb7c..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();
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);