diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/animation_tree_editor_plugin.cpp | 46 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 36 | ||||
-rw-r--r-- | editor/plugins/cube_grid_theme_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/gradient_texture_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/sample_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/sample_library_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/sample_player_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 8 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/shader_graph_editor_plugin.cpp | 16 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 20 | ||||
-rw-r--r-- | editor/plugins/stream_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/style_box_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 28 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 2 |
16 files changed, 93 insertions, 93 deletions
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); |