diff options
author | Franklin Sobrinho <franklin_gs@hotmail.com> | 2015-04-08 14:02:13 -0300 |
---|---|---|
committer | Franklin Sobrinho <franklin_gs@hotmail.com> | 2015-04-08 14:02:13 -0300 |
commit | 59692d9012a320014366d3dcecac645a64a4d5f2 (patch) | |
tree | 768cdd9944fd63e859019203f3c6edd4ba33efc6 | |
parent | e18c6ef63bb57290b023fde01391f8bdcdfe5aed (diff) |
Changed popup_centered by popup_centered_minsize in editor dialogs
19 files changed, 90 insertions, 90 deletions
diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp index cf4b21510a..15b992219b 100644 --- a/tools/editor/connections_dialog.cpp +++ b/tools/editor/connections_dialog.cpp @@ -172,7 +172,7 @@ void ConnectDialog::ok_pressed() { if (dst_method->get_text()=="") { error->set_text("Method in target Node must be specified!"); - error->popup_centered(Size2(300,80)); + error->popup_centered_minsize(); return; } emit_signal("connected"); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 41545b887a..b7da726329 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -453,7 +453,7 @@ void EditorNode::_dialog_display_file_error(String p_file,Error p_error) { }break; } - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); } } @@ -704,7 +704,7 @@ void EditorNode::_save_scene(String p_file) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a tree root."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -726,7 +726,7 @@ void EditorNode::_save_scene(String p_file) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -927,7 +927,7 @@ void EditorNode::_dialog_action(String p_file) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation requieres a single selected node."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -949,7 +949,7 @@ void EditorNode::_dialog_action(String p_file) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Couldn't save subscene. Likely dependencies (instances) couldn't be satisfied."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -967,7 +967,7 @@ void EditorNode::_dialog_action(String p_file) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Error saving scene."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } //EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type()); @@ -978,7 +978,7 @@ void EditorNode::_dialog_action(String p_file) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Error duplicating scene to save it."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1016,7 +1016,7 @@ void EditorNode::_dialog_action(String p_file) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Can't load MeshLibrary for merging!."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -1033,7 +1033,7 @@ void EditorNode::_dialog_action(String p_file) { accept->get_ok()->set_text("I see.."); accept->set_text("Error saving MeshLibrary!."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -1050,7 +1050,7 @@ void EditorNode::_dialog_action(String p_file) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Can't load TileSet for merging!."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -1067,7 +1067,7 @@ void EditorNode::_dialog_action(String p_file) { accept->get_ok()->set_text("I see.."); accept->set_text("Error saving TileSet!."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } } break; @@ -1084,7 +1084,7 @@ void EditorNode::_dialog_action(String p_file) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Can't open export templates zip."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -1413,7 +1413,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("No scene to run exists."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -1456,7 +1456,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("No main scene has ever been defined.\nSelect one from \"Project Settings\" under the 'application' category."); - accept->popup_centered(Size2(300,100));; + accept->popup_centered_minsize(); return; } @@ -1477,7 +1477,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Current scene was never saved, please save scene before running."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -1500,7 +1500,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Could not start subprocess!"); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return; } @@ -1569,7 +1569,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { confirmation->get_ok()->set_text("Yes"); //confirmation->get_cancel()->show(); confirmation->set_text("Start a New Scene? (Current will be lost)"); - confirmation->popup_centered(Size2(300,70)); + confirmation->popup_centered_minsize(); break; } @@ -1648,7 +1648,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a tree root."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1692,7 +1692,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { if (!p_confirmed) { accept->get_ok()->set_text("Yes"); accept->set_text("This scene has never been saved. Save before running?"); - accept->popup_centered(Size2(300, 70)); + accept->popup_centered_minsize(); break; } @@ -1710,7 +1710,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a tree root."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1728,7 +1728,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("Please save the scene first."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1754,7 +1754,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a scene."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1767,7 +1767,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation requieres a single selected node."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1780,7 +1780,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done on instanced scenes."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1875,7 +1875,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a scene."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1920,7 +1920,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a selected node."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -1934,7 +1934,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { confirmation->get_ok()->set_text("Quit"); //confirmation->get_cancel()->show(); confirmation->set_text("Exit the Editor?"); - confirmation->popup_centered(Size2(300,70)); + confirmation->popup_centered(Size2(180,70)); break; } @@ -1949,7 +1949,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { confirmation->get_ok()->set_text("Open"); //confirmation->get_cancel()->show(); confirmation->set_text("Current scene not saved. Open anyway?"); - confirmation->popup_centered(Size2(300,70)); + confirmation->popup_centered_minsize(); break; } @@ -1996,7 +1996,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { if (unsaved_cache && !p_confirmed) { confirmation->get_ok()->set_text("Revert"); confirmation->set_text("This action cannot be undone. Revert anyway?"); - confirmation->popup_centered(Size2(300,70)); + confirmation->popup_centered_minsize(); break; } @@ -2174,7 +2174,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { if (!p_confirmed) { confirmation->get_ok()->set_text("Yes"); confirmation->set_text("Open Project Manager? \n(Unsaved changes will be lost)"); - confirmation->popup_centered(Size2(300,70)); + confirmation->popup_centered_minsize(); break; } @@ -2704,7 +2704,7 @@ Error EditorNode::load_scene(const String& p_scene) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("Ugh"); accept->set_text("Error loading scene, it must be inside the project path. Use 'Import' to open the scene, then save it inside the project path."); - accept->popup_centered(Size2(300,120)); + accept->popup_centered_minsize(); opening_prev=false; return ERR_FILE_NOT_FOUND; } @@ -2718,7 +2718,7 @@ Error EditorNode::load_scene(const String& p_scene) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("Ugh"); accept->set_text("Error loading scene."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); opening_prev=false; return ERR_FILE_NOT_FOUND; } @@ -2731,7 +2731,7 @@ Error EditorNode::load_scene(const String& p_scene) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("Ugh"); accept->set_text("Error loading scene."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); opening_prev=false; return ERR_FILE_NOT_FOUND; } diff --git a/tools/editor/editor_reimport_dialog.cpp b/tools/editor/editor_reimport_dialog.cpp index 034ac58a8e..653e144321 100644 --- a/tools/editor/editor_reimport_dialog.cpp +++ b/tools/editor/editor_reimport_dialog.cpp @@ -33,7 +33,7 @@ void EditorReImportDialog::popup_reimport() { if (EditorFileSystem::get_singleton()->is_scanning()) { error->set_text("Please wait for scan to complete"); - error->popup_centered(Size2(250,100)); + error->popup_centered_minsize(); return; } @@ -70,7 +70,7 @@ void EditorReImportDialog::popup_reimport() { if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->get_filename()=="") { error->set_text("Current scene must be saved to re-import."); - error->popup_centered(Size2(250,100)); + error->popup_centered_minsize(); get_ok()->set_text("Re-Import"); get_ok()->set_disabled(true); return; @@ -93,7 +93,7 @@ void EditorReImportDialog::ok_pressed() { if (EditorFileSystem::get_singleton()->is_scanning()) { error->set_text("Please wait for scan to complete"); - error->popup_centered(Size2(250,100)); + error->popup_centered_minsize(); return; } diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index f706d67f6d..2e6947b528 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.cpp +++ b/tools/editor/plugins/animation_player_editor_plugin.cpp @@ -336,7 +336,7 @@ void AnimationPlayerEditor::_animation_name_edited() { String new_name = name->get_text(); if (new_name=="" || new_name.find(":")!=-1 || new_name.find("/")!=-1) { error_dialog->set_text("ERROR: Invalid animation name!"); - error_dialog->popup_centered(Size2(300,70)); + error_dialog->popup_centered_minsize(); return; } @@ -347,7 +347,7 @@ void AnimationPlayerEditor::_animation_name_edited() { if (player->has_animation(new_name)) { error_dialog->set_text("ERROR: Animation Name Already Exists!"); - error_dialog->popup_centered(Size2(300,70)); + error_dialog->popup_centered_minsize(); return; } diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp index 0f02899dc2..26524b2437 100644 --- a/tools/editor/plugins/baked_light_editor_plugin.cpp +++ b/tools/editor/plugins/baked_light_editor_plugin.cpp @@ -180,7 +180,7 @@ void BakedLightEditor::_bake_pressed() { ERR_FAIL_COND(!node); if (node->get_baked_light().is_null()) { err_dialog->set_text("BakedLightInstance does not contain a BakedLight resource."); - err_dialog->popup_centered(Size2(350,70)); + err_dialog->popup_centered_minsize(); button_bake->set_pressed(false); return; } @@ -242,7 +242,7 @@ void BakedLightEditor::_bake_lightmaps() { if (err) { err_dialog->set_text("Error baking to lightmaps!\nMake sure that a bake has just\n happened and that lightmaps are\n configured. "); - err_dialog->popup_centered(Size2(350,70)); + err_dialog->popup_centered_minsize(); return; } diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp index f8c75e1cf5..2c64b2eb6b 100644 --- a/tools/editor/plugins/mesh_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_editor_plugin.cpp @@ -33,7 +33,7 @@ void MeshInstanceEditor::_menu_option(int p_option) { Ref<Mesh> mesh = node->get_mesh(); if (mesh.is_null()) { err_dialog->set_text("Mesh is empty!"); - err_dialog->popup_centered(Size2(100,80)); + err_dialog->popup_centered_minsize(); return; } @@ -85,7 +85,7 @@ void MeshInstanceEditor::_menu_option(int p_option) { if (node==get_tree()->get_edited_scene_root()) { err_dialog->set_text("This doesn't work on scene root!"); - err_dialog->popup_centered(Size2(100,50)); + err_dialog->popup_centered_minsize(); return; } Ref<Shape> shape = mesh->create_trimesh_shape(); @@ -111,7 +111,7 @@ void MeshInstanceEditor::_menu_option(int p_option) { if (node==get_tree()->get_edited_scene_root()) { err_dialog->set_text("This doesn't work on scene root!"); - err_dialog->popup_centered(Size2(100,50)); + err_dialog->popup_centered_minsize(); return; } Ref<Shape> shape = mesh->create_convex_shape(); @@ -160,7 +160,7 @@ void MeshInstanceEditor::_menu_option(int p_option) { } break; case MENU_OPTION_CREATE_OUTLINE_MESH: { - outline_dialog->popup_centered(Size2(200,80)); + outline_dialog->popup_centered_minsize(); } break; } @@ -171,7 +171,7 @@ void MeshInstanceEditor::_create_outline_mesh() { Ref<Mesh> mesh = node->get_mesh(); if (mesh.is_null()) { err_dialog->set_text("MeshInstance lacks a Mesh!"); - err_dialog->popup_centered(Size2(100,50)); + err_dialog->popup_centered_minsize(); return; } @@ -179,7 +179,7 @@ void MeshInstanceEditor::_create_outline_mesh() { if (mesho.is_null()) { err_dialog->set_text("Could not create outline!"); - err_dialog->popup_centered(Size2(100,50)); + err_dialog->popup_centered_minsize(); return; } diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp index b2b6cbe9b7..93a953e647 100644 --- a/tools/editor/plugins/multimesh_editor_plugin.cpp +++ b/tools/editor/plugins/multimesh_editor_plugin.cpp @@ -57,13 +57,13 @@ void MultiMeshEditor::_populate() { if (multimesh.is_null()) { err_dialog->set_text("No mesh source specified (and no MultiMesh set in node)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } if (multimesh->get_mesh().is_null()) { err_dialog->set_text("No mesh source specified (and MultiMesh contains no Mesh)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -75,7 +75,7 @@ void MultiMeshEditor::_populate() { if (!ms_node) { err_dialog->set_text("Mesh source is invalid (Invalid Path)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -84,7 +84,7 @@ void MultiMeshEditor::_populate() { if (!ms_instance) { err_dialog->set_text("Mesh source is invalid (Not a MeshInstance)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -93,7 +93,7 @@ void MultiMeshEditor::_populate() { if (mesh.is_null()) { err_dialog->set_text("Mesh source is invalid (Contains no Mesh resource)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -102,7 +102,7 @@ void MultiMeshEditor::_populate() { if (surface_source->get_text()=="") { err_dialog->set_text("No surface source specified."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -111,7 +111,7 @@ void MultiMeshEditor::_populate() { if (!ss_node) { err_dialog->set_text("Surface source is invalid (Invalid Path)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -120,7 +120,7 @@ void MultiMeshEditor::_populate() { if (!ss_instance) { err_dialog->set_text("Surface source is invalid (Not Geometry)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -131,7 +131,7 @@ void MultiMeshEditor::_populate() { if (geometry.size()==0) { err_dialog->set_text("Surface source is invalid (No Faces)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp index ebb45bc316..a3032a73d3 100644 --- a/tools/editor/plugins/particles_editor_plugin.cpp +++ b/tools/editor/plugins/particles_editor_plugin.cpp @@ -58,7 +58,7 @@ void ParticlesEditor::_node_selected(const NodePath& p_path){ if (!vi) { err_dialog->set_text("Node does not contain geometry."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -67,7 +67,7 @@ void ParticlesEditor::_node_selected(const NodePath& p_path){ if (geometry.size()==0) { err_dialog->set_text("Node does not contain geometry (faces)."); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -219,7 +219,7 @@ void ParticlesEditor::_generate_emission_points() { if (!triangle_area_map.size() || area_accum==0) { err_dialog->set_text("Faces contain no area!"); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } @@ -249,7 +249,7 @@ void ParticlesEditor::_generate_emission_points() { if (gcount==0) { err_dialog->set_text("No Faces!"); - err_dialog->popup_centered(Size2(300,100)); + err_dialog->popup_centered_minsize(); return; } diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp index 3858bf2c68..d4b307f664 100644 --- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp @@ -90,7 +90,7 @@ void Polygon2DEditor::_menu_option(int p_option) { if (node->get_texture().is_null()) { error->set_text("No texture in this polygon.\nSet a texture to be able to edit UV."); - error->popup_centered_minsize(Size2(300,70)); + error->popup_centered_minsize(); return; } diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp index d9726cac21..f0de551ad6 100644 --- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp @@ -72,7 +72,7 @@ void ResourcePreloaderEditor::_file_load_request(const String& p_path) { dialog->set_title("Error!"); //dialog->get_cancel()->set_text("Close"); dialog->get_ok()->set_text("Close"); - dialog->popup_centered(Size2(300,60)); + dialog->popup_centered_minsize(); return; ///beh should show an error i guess } @@ -167,7 +167,7 @@ void ResourcePreloaderEditor::_paste_pressed() { dialog->set_title("Error!"); //dialog->get_cancel()->set_text("Close"); dialog->get_ok()->set_text("Close"); - dialog->popup_centered(Size2(300,60)); + dialog->popup_centered_minsize(); return; ///beh should show an error i guess } diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp index 96d72595ab..aab371dd2a 100644 --- a/tools/editor/plugins/sample_library_editor_plugin.cpp +++ b/tools/editor/plugins/sample_library_editor_plugin.cpp @@ -93,7 +93,7 @@ void SampleLibraryEditor::_file_load_request(const DVector<String>& p_path) { dialog->set_title("Error!"); //dialog->get_cancel()->set_text("Close"); dialog->get_ok()->set_text("Close"); - dialog->popup_centered(Size2(300,60)); + dialog->popup_centered_minsize(); return; ///beh should show an error i guess } String basename = path.get_file().basename(); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 72b3025f2f..7291b12179 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -1041,7 +1041,7 @@ void ScriptEditor::_menu_option(int p_option) { case WINDOW_CLOSE: { if (current->get_text_edit()->get_version()!=current->get_text_edit()->get_saved_version()) { erase_tab_confirm->set_text("Close and save changes?\n\""+current->get_name()+"\""); - erase_tab_confirm->popup_centered(Point2(250,80)); + erase_tab_confirm->popup_centered_minsize(); } else { _close_current_tab(); } diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp index 9a9e8ee611..e49999e717 100644 --- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp @@ -76,7 +76,7 @@ void SpriteFramesEditor::_file_load_request(const DVector<String>& p_path) { dialog->set_title("Error!"); //dialog->get_cancel()->set_text("Close"); dialog->get_ok()->set_text("Close"); - dialog->popup_centered(Size2(300,60)); + dialog->popup_centered_minsize(); return; ///beh should show an error i guess } @@ -188,7 +188,7 @@ void SpriteFramesEditor::_paste_pressed() { dialog->set_title("Error!"); //dialog->get_cancel()->set_text("Close"); dialog->get_ok()->set_text("Close"); - dialog->popup_centered(Size2(300,60)); + dialog->popup_centered_minsize(); return; ///beh should show an error i guess } diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index 449e54e12f..d191cedee9 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -416,7 +416,7 @@ void ProjectExportDialog::_export_action(const String& p_file) { if (FileAccess::exists(location.plus_file("engine.cfg"))) { error->set_text("Please export outside the project folder!"); - error->popup_centered(Size2(300,70));; + error->popup_centered_minsize(); return; } String nl = (location+"/..").simplify_path(); @@ -434,7 +434,7 @@ void ProjectExportDialog::_export_action(const String& p_file) { Error err = export_platform(platform,p_file,file_export_check->is_pressed(),file_export_password->get_text(),false); if (err!=OK) { error->set_text("Error exporting project!"); - error->popup_centered(Size2(300,70));; + error->popup_centered_minsize(); } } @@ -453,7 +453,7 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) { FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE); if (!f) { error->set_text("Error exporting project PCK! Can't write"); - error->popup_centered(Size2(300,70));; + error->popup_centered_minsize(); } ERR_FAIL_COND(!f); @@ -462,7 +462,7 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) { if (err!=OK) { error->set_text("Error exporting project!"); - error->popup_centered(Size2(300,70));; + error->popup_centered_minsize(); return; } } @@ -478,7 +478,7 @@ Error ProjectExportDialog::export_platform(const String& p_platform, const Strin Error err = exporter->export_project(p_path,p_debug); if (err!=OK) { error->set_text("Error exporting project!"); - error->popup_centered(Size2(300,70));; + error->popup_centered_minsize(); return ERR_CANT_CREATE; } else { if (p_quit_after) { @@ -507,7 +507,7 @@ void ProjectExportDialog::custom_action(const String&) { if (exporter.is_null()) { error->set_text("No exporter for platform '"+platform+"' yet."); - error->popup_centered(Size2(300,70));; + error->popup_centered_minsize(); return; } diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 3fd713c5b0..09643c95dc 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -766,7 +766,7 @@ void CustomPropertyEditor::_file_selected(String p_file) { RES res = ResourceLoader::load(p_file,type); if (res.is_null()) { error->set_text("Error loading file: Not a resource!"); - error->popup_centered(Size2(300,80)); + error->popup_centered_minsize(); break; } v=res.get_ref_ptr(); diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp index 4614c4945d..1e83c0189e 100644 --- a/tools/editor/resources_dock.cpp +++ b/tools/editor/resources_dock.cpp @@ -134,7 +134,7 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re if (err!=OK) { accept->set_text("Error saving resource!"); - accept->popup_centered(Size2(300,100)); + accept->popup_centered_minsize(); return; } // EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 84b34cf130..385e42ad4f 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -61,7 +61,7 @@ Node* SceneTreeDock::instance(const String& p_file) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("Ok :( "); accept->set_text("No parent to instance a child at."); - accept->popup_centered(Size2(300,70)); + accept->popup_centered_minsize(); return NULL; }; @@ -79,7 +79,7 @@ Node* SceneTreeDock::instance(const String& p_file) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("Ugh"); accept->set_text(String("Error loading scene from ")+p_file); - accept->popup_centered(Size2(300,70)); + accept->popup_centered_minsize(); return NULL; } @@ -90,7 +90,7 @@ Node* SceneTreeDock::instance(const String& p_file) { accept->get_ok()->set_text("Ok"); accept->set_text(String("Cannot instance the scene '")+p_file+String("' because the current scene exists within one of its' nodes.")); - accept->popup_centered(Size2(300,90)); + accept->popup_centered_minsize(); return NULL; } } @@ -164,7 +164,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a tree root."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -245,7 +245,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done on the tree root."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -313,7 +313,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { //accept->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done on the tree root."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -420,7 +420,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { //confirmation->get_cancel()->hide(); accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done on the tree root."); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); break; } @@ -456,7 +456,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } else { delete_dialog->set_text("Delete Node(s)?"); - delete_dialog->popup_centered(Size2(200,80)); + delete_dialog->popup_centered_minsize(); } @@ -838,7 +838,7 @@ bool SceneTreeDock::_validate_no_foreign() { accept->get_ok()->set_text("Makes Sense!"); accept->set_text("Can't operate on nodes from a foreign scene!"); - accept->popup_centered(Size2(300,70));; + accept->popup_centered_minsize(); return false; } diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index e9ec0199d0..685c5a9737 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -117,7 +117,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id) Spatial *ci = n->cast_to<Spatial>(); if (!ci->is_visible() && ci->get_parent_spatial() && !ci->get_parent_spatial()->is_visible()) { error->set_text("This item cannot be made visible because the parent is hidden. Unhide the parent first."); - error->popup_centered_minsize(Size2(400,80)); + error->popup_centered_minsize(); return; } @@ -131,7 +131,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id) CanvasItem *ci = n->cast_to<CanvasItem>(); if (!ci->is_visible() && ci->get_parent_item() && !ci->get_parent_item()->is_visible()) { error->set_text("This item cannot be made visible because the parent is hidden. Unhide the parent first."); - error->popup_centered_minsize(Size2(400,80)); + error->popup_centered_minsize(); return; } bool v = !bool(n->call("is_hidden")); diff --git a/tools/editor/script_create_dialog.cpp b/tools/editor/script_create_dialog.cpp index 89c0bd6ab4..886ee31bc5 100644 --- a/tools/editor/script_create_dialog.cpp +++ b/tools/editor/script_create_dialog.cpp @@ -99,12 +99,12 @@ void ScriptCreateDialog::ok_pressed() { if (class_name->is_editable() && !_validate(class_name->get_text())) { alert->set_text("Class Name is Invalid!"); - alert->popup_centered(Size2(200,60)); + alert->popup_centered_minsize(); return; } if (!_validate(parent_name->get_text())) { alert->set_text("Parent Class Name is Invalid!"); - alert->popup_centered(Size2(200,60)); + alert->popup_centered_minsize(); return; @@ -134,7 +134,7 @@ void ScriptCreateDialog::ok_pressed() { if (!path_valid) { alert->set_text("Path is Invalid!"); - alert->popup_centered(Size2(200,60)); + alert->popup_centered_minsize(); return; } @@ -142,7 +142,7 @@ void ScriptCreateDialog::ok_pressed() { if (err!=OK) { alert->set_text("Could not create script in filesystem: "+String("")); - alert->popup_centered(Size2(200,60)); + alert->popup_centered_minsize(); return; } scr->set_path(lpath); |