diff options
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 43 |
1 files changed, 10 insertions, 33 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 1bd91d753f..cc7ee44902 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); } } @@ -447,18 +447,6 @@ void EditorNode::_sources_changed(bool p_exist) { void EditorNode::_vp_resized() { } -void EditorNode::_rebuild_import_menu() { - PopupMenu *p = import_menu->get_popup(); - p->clear(); -//p->add_item(TTR("Node From Scene"), FILE_IMPORT_SUBSCENE); -//p->add_separator(); -#if 0 - for (int i = 0; i < editor_import_export->get_import_plugin_count(); i++) { - p->add_item(editor_import_export->get_import_plugin(i)->get_visible_name(), IMPORT_PLUGIN_BASE + i); - } -#endif -} - void EditorNode::_node_renamed() { if (property_editor) @@ -2815,7 +2803,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled) } if (!script->is_tool()) { - show_warning("Unable to load addon script from path: '" + path + "' Script is does not support tool mode."); + show_warning("Unable to load addon script from path: '" + path + "' Script is not in tool mode."); return; } @@ -4469,7 +4457,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 +5140,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 +5220,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,19 +5241,10 @@ 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 - import_menu = memnew(MenuButton); - import_menu->set_tooltip(TTR("Import assets to the project.")); - import_menu->set_text(TTR("Import")); - //import_menu->set_icon(gui_base->get_icon("Save","EditorIcons")); - left_menu_hb->add_child(import_menu); - - p = import_menu->get_popup(); - p->connect("id_pressed", this, "_menu_option"); - tool_menu = memnew(MenuButton); tool_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools.")); tool_menu->set_text(TTR("Tools")); @@ -5288,7 +5267,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 +5382,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 +5475,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 +5707,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); @@ -5960,8 +5939,6 @@ EditorNode::EditorNode() { circle_step_frame = Engine::get_singleton()->get_frames_drawn(); circle_step = 0; - _rebuild_import_menu(); - editor_plugin_screen = NULL; editor_plugins_over = memnew(EditorPluginList); |