This commit is contained in:
Juan Linietsky 2015-04-09 00:31:07 -03:00
commit b967bb73c2
19 changed files with 90 additions and 90 deletions

View File

@ -172,7 +172,7 @@ void ConnectDialog::ok_pressed() {
if (dst_method->get_text()=="") { if (dst_method->get_text()=="") {
error->set_text("Method in target Node must be specified!"); error->set_text("Method in target Node must be specified!");
error->popup_centered(Size2(300,80)); error->popup_centered_minsize();
return; return;
} }
emit_signal("connected"); emit_signal("connected");

View File

@ -453,7 +453,7 @@ void EditorNode::_dialog_display_file_error(String p_file,Error p_error) {
}break; }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_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done without a tree root."); accept->set_text("This operation can't be done without a tree root.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
@ -726,7 +726,7 @@ void EditorNode::_save_scene(String p_file) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."); 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; return;
} }
@ -927,7 +927,7 @@ void EditorNode::_dialog_action(String p_file) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation requieres a single selected node."); accept->set_text("This operation requieres a single selected node.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -949,7 +949,7 @@ void EditorNode::_dialog_action(String p_file) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Couldn't save subscene. Likely dependencies (instances) couldn't be satisfied."); 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; return;
} }
@ -967,7 +967,7 @@ void EditorNode::_dialog_action(String p_file) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Error saving scene."); accept->set_text("Error saving scene.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
//EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type()); //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(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Error duplicating scene to save it."); accept->set_text("Error duplicating scene to save it.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1016,7 +1016,7 @@ void EditorNode::_dialog_action(String p_file) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Can't load MeshLibrary for merging!."); accept->set_text("Can't load MeshLibrary for merging!.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
@ -1033,7 +1033,7 @@ void EditorNode::_dialog_action(String p_file) {
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Error saving MeshLibrary!."); accept->set_text("Error saving MeshLibrary!.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
@ -1050,7 +1050,7 @@ void EditorNode::_dialog_action(String p_file) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Can't load TileSet for merging!."); accept->set_text("Can't load TileSet for merging!.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
@ -1067,7 +1067,7 @@ void EditorNode::_dialog_action(String p_file) {
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Error saving TileSet!."); accept->set_text("Error saving TileSet!.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
} break; } break;
@ -1084,7 +1084,7 @@ void EditorNode::_dialog_action(String p_file) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Can't open export templates zip."); accept->set_text("Can't open export templates zip.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
@ -1413,7 +1413,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("No scene to run exists."); accept->set_text("No scene to run exists.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
@ -1456,7 +1456,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); 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->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; return;
} }
@ -1477,7 +1477,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Current scene was never saved, please save scene before running."); accept->set_text("Current scene was never saved, please save scene before running.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
@ -1500,7 +1500,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Could not start subprocess!"); accept->set_text("Could not start subprocess!");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return; return;
} }
@ -1569,7 +1569,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
confirmation->get_ok()->set_text("Yes"); confirmation->get_ok()->set_text("Yes");
//confirmation->get_cancel()->show(); //confirmation->get_cancel()->show();
confirmation->set_text("Start a New Scene? (Current will be lost)"); confirmation->set_text("Start a New Scene? (Current will be lost)");
confirmation->popup_centered(Size2(300,70)); confirmation->popup_centered_minsize();
break; break;
} }
@ -1648,7 +1648,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done without a tree root."); accept->set_text("This operation can't be done without a tree root.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1692,7 +1692,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (!p_confirmed) { if (!p_confirmed) {
accept->get_ok()->set_text("Yes"); accept->get_ok()->set_text("Yes");
accept->set_text("This scene has never been saved. Save before running?"); accept->set_text("This scene has never been saved. Save before running?");
accept->popup_centered(Size2(300, 70)); accept->popup_centered_minsize();
break; break;
} }
@ -1710,7 +1710,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done without a tree root."); accept->set_text("This operation can't be done without a tree root.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1728,7 +1728,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("Please save the scene first."); accept->set_text("Please save the scene first.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1754,7 +1754,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done without a scene."); accept->set_text("This operation can't be done without a scene.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1767,7 +1767,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation requieres a single selected node."); accept->set_text("This operation requieres a single selected node.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1780,7 +1780,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done on instanced scenes."); accept->set_text("This operation can't be done on instanced scenes.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1875,7 +1875,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done without a scene."); accept->set_text("This operation can't be done without a scene.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1920,7 +1920,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done without a selected node."); accept->set_text("This operation can't be done without a selected node.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -1934,7 +1934,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
confirmation->get_ok()->set_text("Quit"); confirmation->get_ok()->set_text("Quit");
//confirmation->get_cancel()->show(); //confirmation->get_cancel()->show();
confirmation->set_text("Exit the Editor?"); confirmation->set_text("Exit the Editor?");
confirmation->popup_centered(Size2(300,70)); confirmation->popup_centered(Size2(180,70));
break; break;
} }
@ -1949,7 +1949,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
confirmation->get_ok()->set_text("Open"); confirmation->get_ok()->set_text("Open");
//confirmation->get_cancel()->show(); //confirmation->get_cancel()->show();
confirmation->set_text("Current scene not saved. Open anyway?"); confirmation->set_text("Current scene not saved. Open anyway?");
confirmation->popup_centered(Size2(300,70)); confirmation->popup_centered_minsize();
break; break;
} }
@ -1996,7 +1996,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (unsaved_cache && !p_confirmed) { if (unsaved_cache && !p_confirmed) {
confirmation->get_ok()->set_text("Revert"); confirmation->get_ok()->set_text("Revert");
confirmation->set_text("This action cannot be undone. Revert anyway?"); confirmation->set_text("This action cannot be undone. Revert anyway?");
confirmation->popup_centered(Size2(300,70)); confirmation->popup_centered_minsize();
break; break;
} }
@ -2174,7 +2174,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (!p_confirmed) { if (!p_confirmed) {
confirmation->get_ok()->set_text("Yes"); confirmation->get_ok()->set_text("Yes");
confirmation->set_text("Open Project Manager? \n(Unsaved changes will be lost)"); confirmation->set_text("Open Project Manager? \n(Unsaved changes will be lost)");
confirmation->popup_centered(Size2(300,70)); confirmation->popup_centered_minsize();
break; break;
} }
@ -2704,7 +2704,7 @@ Error EditorNode::load_scene(const String& p_scene) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("Ugh"); 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->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; opening_prev=false;
return ERR_FILE_NOT_FOUND; return ERR_FILE_NOT_FOUND;
} }
@ -2718,7 +2718,7 @@ Error EditorNode::load_scene(const String& p_scene) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("Ugh"); accept->get_ok()->set_text("Ugh");
accept->set_text("Error loading scene."); accept->set_text("Error loading scene.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
opening_prev=false; opening_prev=false;
return ERR_FILE_NOT_FOUND; return ERR_FILE_NOT_FOUND;
} }
@ -2731,7 +2731,7 @@ Error EditorNode::load_scene(const String& p_scene) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("Ugh"); accept->get_ok()->set_text("Ugh");
accept->set_text("Error loading scene."); accept->set_text("Error loading scene.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
opening_prev=false; opening_prev=false;
return ERR_FILE_NOT_FOUND; return ERR_FILE_NOT_FOUND;
} }

View File

@ -33,7 +33,7 @@ void EditorReImportDialog::popup_reimport() {
if (EditorFileSystem::get_singleton()->is_scanning()) { if (EditorFileSystem::get_singleton()->is_scanning()) {
error->set_text("Please wait for scan to complete"); error->set_text("Please wait for scan to complete");
error->popup_centered(Size2(250,100)); error->popup_centered_minsize();
return; return;
} }
@ -70,7 +70,7 @@ void EditorReImportDialog::popup_reimport() {
if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->get_filename()=="") { 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->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_text("Re-Import");
get_ok()->set_disabled(true); get_ok()->set_disabled(true);
return; return;
@ -93,7 +93,7 @@ void EditorReImportDialog::ok_pressed() {
if (EditorFileSystem::get_singleton()->is_scanning()) { if (EditorFileSystem::get_singleton()->is_scanning()) {
error->set_text("Please wait for scan to complete"); error->set_text("Please wait for scan to complete");
error->popup_centered(Size2(250,100)); error->popup_centered_minsize();
return; return;
} }

View File

@ -336,7 +336,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
String new_name = name->get_text(); String new_name = name->get_text();
if (new_name=="" || new_name.find(":")!=-1 || new_name.find("/")!=-1) { if (new_name=="" || new_name.find(":")!=-1 || new_name.find("/")!=-1) {
error_dialog->set_text("ERROR: Invalid animation name!"); error_dialog->set_text("ERROR: Invalid animation name!");
error_dialog->popup_centered(Size2(300,70)); error_dialog->popup_centered_minsize();
return; return;
} }
@ -347,7 +347,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
if (player->has_animation(new_name)) { if (player->has_animation(new_name)) {
error_dialog->set_text("ERROR: Animation Name Already Exists!"); error_dialog->set_text("ERROR: Animation Name Already Exists!");
error_dialog->popup_centered(Size2(300,70)); error_dialog->popup_centered_minsize();
return; return;
} }

View File

@ -180,7 +180,7 @@ void BakedLightEditor::_bake_pressed() {
ERR_FAIL_COND(!node); ERR_FAIL_COND(!node);
if (node->get_baked_light().is_null()) { if (node->get_baked_light().is_null()) {
err_dialog->set_text("BakedLightInstance does not contain a BakedLight resource."); 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); button_bake->set_pressed(false);
return; return;
} }
@ -242,7 +242,7 @@ void BakedLightEditor::_bake_lightmaps() {
if (err) { 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->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; return;
} }

View File

@ -33,7 +33,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
Ref<Mesh> mesh = node->get_mesh(); Ref<Mesh> mesh = node->get_mesh();
if (mesh.is_null()) { if (mesh.is_null()) {
err_dialog->set_text("Mesh is empty!"); err_dialog->set_text("Mesh is empty!");
err_dialog->popup_centered(Size2(100,80)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -85,7 +85,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
if (node==get_tree()->get_edited_scene_root()) { if (node==get_tree()->get_edited_scene_root()) {
err_dialog->set_text("This doesn't work on 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; return;
} }
Ref<Shape> shape = mesh->create_trimesh_shape(); 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()) { if (node==get_tree()->get_edited_scene_root()) {
err_dialog->set_text("This doesn't work on 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; return;
} }
Ref<Shape> shape = mesh->create_convex_shape(); Ref<Shape> shape = mesh->create_convex_shape();
@ -160,7 +160,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
} break; } break;
case MENU_OPTION_CREATE_OUTLINE_MESH: { case MENU_OPTION_CREATE_OUTLINE_MESH: {
outline_dialog->popup_centered(Size2(200,80)); outline_dialog->popup_centered_minsize();
} break; } break;
} }
@ -171,7 +171,7 @@ void MeshInstanceEditor::_create_outline_mesh() {
Ref<Mesh> mesh = node->get_mesh(); Ref<Mesh> mesh = node->get_mesh();
if (mesh.is_null()) { if (mesh.is_null()) {
err_dialog->set_text("MeshInstance lacks a Mesh!"); err_dialog->set_text("MeshInstance lacks a Mesh!");
err_dialog->popup_centered(Size2(100,50)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -179,7 +179,7 @@ void MeshInstanceEditor::_create_outline_mesh() {
if (mesho.is_null()) { if (mesho.is_null()) {
err_dialog->set_text("Could not create outline!"); err_dialog->set_text("Could not create outline!");
err_dialog->popup_centered(Size2(100,50)); err_dialog->popup_centered_minsize();
return; return;
} }

View File

@ -57,13 +57,13 @@ void MultiMeshEditor::_populate() {
if (multimesh.is_null()) { if (multimesh.is_null()) {
err_dialog->set_text("No mesh source specified (and no MultiMesh set in node)."); 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; return;
} }
if (multimesh->get_mesh().is_null()) { if (multimesh->get_mesh().is_null()) {
err_dialog->set_text("No mesh source specified (and MultiMesh contains no Mesh)."); 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; return;
} }
@ -75,7 +75,7 @@ void MultiMeshEditor::_populate() {
if (!ms_node) { if (!ms_node) {
err_dialog->set_text("Mesh source is invalid (Invalid Path)."); err_dialog->set_text("Mesh source is invalid (Invalid Path).");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -84,7 +84,7 @@ void MultiMeshEditor::_populate() {
if (!ms_instance) { if (!ms_instance) {
err_dialog->set_text("Mesh source is invalid (Not a MeshInstance)."); err_dialog->set_text("Mesh source is invalid (Not a MeshInstance).");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -93,7 +93,7 @@ void MultiMeshEditor::_populate() {
if (mesh.is_null()) { if (mesh.is_null()) {
err_dialog->set_text("Mesh source is invalid (Contains no Mesh resource)."); 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; return;
} }
@ -102,7 +102,7 @@ void MultiMeshEditor::_populate() {
if (surface_source->get_text()=="") { if (surface_source->get_text()=="") {
err_dialog->set_text("No surface source specified."); err_dialog->set_text("No surface source specified.");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -111,7 +111,7 @@ void MultiMeshEditor::_populate() {
if (!ss_node) { if (!ss_node) {
err_dialog->set_text("Surface source is invalid (Invalid Path)."); err_dialog->set_text("Surface source is invalid (Invalid Path).");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -120,7 +120,7 @@ void MultiMeshEditor::_populate() {
if (!ss_instance) { if (!ss_instance) {
err_dialog->set_text("Surface source is invalid (Not Geometry)."); err_dialog->set_text("Surface source is invalid (Not Geometry).");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -131,7 +131,7 @@ void MultiMeshEditor::_populate() {
if (geometry.size()==0) { if (geometry.size()==0) {
err_dialog->set_text("Surface source is invalid (No Faces)."); err_dialog->set_text("Surface source is invalid (No Faces).");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }

View File

@ -58,7 +58,7 @@ void ParticlesEditor::_node_selected(const NodePath& p_path){
if (!vi) { if (!vi) {
err_dialog->set_text("Node does not contain geometry."); err_dialog->set_text("Node does not contain geometry.");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -67,7 +67,7 @@ void ParticlesEditor::_node_selected(const NodePath& p_path){
if (geometry.size()==0) { if (geometry.size()==0) {
err_dialog->set_text("Node does not contain geometry (faces)."); err_dialog->set_text("Node does not contain geometry (faces).");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -219,7 +219,7 @@ void ParticlesEditor::_generate_emission_points() {
if (!triangle_area_map.size() || area_accum==0) { if (!triangle_area_map.size() || area_accum==0) {
err_dialog->set_text("Faces contain no area!"); err_dialog->set_text("Faces contain no area!");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }
@ -249,7 +249,7 @@ void ParticlesEditor::_generate_emission_points() {
if (gcount==0) { if (gcount==0) {
err_dialog->set_text("No Faces!"); err_dialog->set_text("No Faces!");
err_dialog->popup_centered(Size2(300,100)); err_dialog->popup_centered_minsize();
return; return;
} }

View File

@ -90,7 +90,7 @@ void Polygon2DEditor::_menu_option(int p_option) {
if (node->get_texture().is_null()) { if (node->get_texture().is_null()) {
error->set_text("No texture in this polygon.\nSet a texture to be able to edit UV."); 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; return;
} }

View File

@ -72,7 +72,7 @@ void ResourcePreloaderEditor::_file_load_request(const String& p_path) {
dialog->set_title("Error!"); dialog->set_title("Error!");
//dialog->get_cancel()->set_text("Close"); //dialog->get_cancel()->set_text("Close");
dialog->get_ok()->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 return; ///beh should show an error i guess
} }
@ -167,7 +167,7 @@ void ResourcePreloaderEditor::_paste_pressed() {
dialog->set_title("Error!"); dialog->set_title("Error!");
//dialog->get_cancel()->set_text("Close"); //dialog->get_cancel()->set_text("Close");
dialog->get_ok()->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 return; ///beh should show an error i guess
} }

View File

@ -93,7 +93,7 @@ void SampleLibraryEditor::_file_load_request(const DVector<String>& p_path) {
dialog->set_title("Error!"); dialog->set_title("Error!");
//dialog->get_cancel()->set_text("Close"); //dialog->get_cancel()->set_text("Close");
dialog->get_ok()->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 return; ///beh should show an error i guess
} }
String basename = path.get_file().basename(); String basename = path.get_file().basename();

View File

@ -1041,7 +1041,7 @@ void ScriptEditor::_menu_option(int p_option) {
case WINDOW_CLOSE: { case WINDOW_CLOSE: {
if (current->get_text_edit()->get_version()!=current->get_text_edit()->get_saved_version()) { 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->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 { } else {
_close_current_tab(); _close_current_tab();
} }

View File

@ -76,7 +76,7 @@ void SpriteFramesEditor::_file_load_request(const DVector<String>& p_path) {
dialog->set_title("Error!"); dialog->set_title("Error!");
//dialog->get_cancel()->set_text("Close"); //dialog->get_cancel()->set_text("Close");
dialog->get_ok()->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 return; ///beh should show an error i guess
} }
@ -188,7 +188,7 @@ void SpriteFramesEditor::_paste_pressed() {
dialog->set_title("Error!"); dialog->set_title("Error!");
//dialog->get_cancel()->set_text("Close"); //dialog->get_cancel()->set_text("Close");
dialog->get_ok()->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 return; ///beh should show an error i guess
} }

View File

@ -416,7 +416,7 @@ void ProjectExportDialog::_export_action(const String& p_file) {
if (FileAccess::exists(location.plus_file("engine.cfg"))) { if (FileAccess::exists(location.plus_file("engine.cfg"))) {
error->set_text("Please export outside the project folder!"); error->set_text("Please export outside the project folder!");
error->popup_centered(Size2(300,70));; error->popup_centered_minsize();
return; return;
} }
String nl = (location+"/..").simplify_path(); 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); Error err = export_platform(platform,p_file,file_export_check->is_pressed(),file_export_password->get_text(),false);
if (err!=OK) { if (err!=OK) {
error->set_text("Error exporting project!"); 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); FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE);
if (!f) { if (!f) {
error->set_text("Error exporting project PCK! Can't write"); error->set_text("Error exporting project PCK! Can't write");
error->popup_centered(Size2(300,70));; error->popup_centered_minsize();
} }
ERR_FAIL_COND(!f); ERR_FAIL_COND(!f);
@ -462,7 +462,7 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) {
if (err!=OK) { if (err!=OK) {
error->set_text("Error exporting project!"); error->set_text("Error exporting project!");
error->popup_centered(Size2(300,70));; error->popup_centered_minsize();
return; return;
} }
} }
@ -478,7 +478,7 @@ Error ProjectExportDialog::export_platform(const String& p_platform, const Strin
Error err = exporter->export_project(p_path,p_debug); Error err = exporter->export_project(p_path,p_debug);
if (err!=OK) { if (err!=OK) {
error->set_text("Error exporting project!"); error->set_text("Error exporting project!");
error->popup_centered(Size2(300,70));; error->popup_centered_minsize();
return ERR_CANT_CREATE; return ERR_CANT_CREATE;
} else { } else {
if (p_quit_after) { if (p_quit_after) {
@ -507,7 +507,7 @@ void ProjectExportDialog::custom_action(const String&) {
if (exporter.is_null()) { if (exporter.is_null()) {
error->set_text("No exporter for platform '"+platform+"' yet."); error->set_text("No exporter for platform '"+platform+"' yet.");
error->popup_centered(Size2(300,70));; error->popup_centered_minsize();
return; return;
} }

View File

@ -766,7 +766,7 @@ void CustomPropertyEditor::_file_selected(String p_file) {
RES res = ResourceLoader::load(p_file,type); RES res = ResourceLoader::load(p_file,type);
if (res.is_null()) { if (res.is_null()) {
error->set_text("Error loading file: Not a resource!"); error->set_text("Error loading file: Not a resource!");
error->popup_centered(Size2(300,80)); error->popup_centered_minsize();
break; break;
} }
v=res.get_ref_ptr(); v=res.get_ref_ptr();

View File

@ -134,7 +134,7 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re
if (err!=OK) { if (err!=OK) {
accept->set_text("Error saving resource!"); accept->set_text("Error saving resource!");
accept->popup_centered(Size2(300,100)); accept->popup_centered_minsize();
return; return;
} }
// EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); // EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type());

View File

@ -61,7 +61,7 @@ Node* SceneTreeDock::instance(const String& p_file) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("Ok :( "); accept->get_ok()->set_text("Ok :( ");
accept->set_text("No parent to instance a child at."); accept->set_text("No parent to instance a child at.");
accept->popup_centered(Size2(300,70)); accept->popup_centered_minsize();
return NULL; return NULL;
}; };
@ -79,7 +79,7 @@ Node* SceneTreeDock::instance(const String& p_file) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("Ugh"); accept->get_ok()->set_text("Ugh");
accept->set_text(String("Error loading scene from ")+p_file); accept->set_text(String("Error loading scene from ")+p_file);
accept->popup_centered(Size2(300,70)); accept->popup_centered_minsize();
return NULL; return NULL;
} }
@ -90,7 +90,7 @@ Node* SceneTreeDock::instance(const String& p_file) {
accept->get_ok()->set_text("Ok"); 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->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; return NULL;
} }
} }
@ -164,7 +164,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done without a tree root."); accept->set_text("This operation can't be done without a tree root.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -245,7 +245,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done on the tree root."); accept->set_text("This operation can't be done on the tree root.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -313,7 +313,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
//accept->get_cancel()->hide(); //accept->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done on the tree root."); accept->set_text("This operation can't be done on the tree root.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -420,7 +420,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
//confirmation->get_cancel()->hide(); //confirmation->get_cancel()->hide();
accept->get_ok()->set_text("I see.."); accept->get_ok()->set_text("I see..");
accept->set_text("This operation can't be done on the tree root."); accept->set_text("This operation can't be done on the tree root.");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
break; break;
} }
@ -456,7 +456,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} else { } else {
delete_dialog->set_text("Delete Node(s)?"); 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->get_ok()->set_text("Makes Sense!");
accept->set_text("Can't operate on nodes from a foreign scene!"); accept->set_text("Can't operate on nodes from a foreign scene!");
accept->popup_centered(Size2(300,70));; accept->popup_centered_minsize();
return false; return false;
} }

View File

@ -117,7 +117,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id)
Spatial *ci = n->cast_to<Spatial>(); Spatial *ci = n->cast_to<Spatial>();
if (!ci->is_visible() && ci->get_parent_spatial() && !ci->get_parent_spatial()->is_visible()) { 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->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; 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>(); CanvasItem *ci = n->cast_to<CanvasItem>();
if (!ci->is_visible() && ci->get_parent_item() && !ci->get_parent_item()->is_visible()) { 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->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; return;
} }
bool v = !bool(n->call("is_hidden")); bool v = !bool(n->call("is_hidden"));

View File

@ -99,12 +99,12 @@ void ScriptCreateDialog::ok_pressed() {
if (class_name->is_editable() && !_validate(class_name->get_text())) { if (class_name->is_editable() && !_validate(class_name->get_text())) {
alert->set_text("Class Name is Invalid!"); alert->set_text("Class Name is Invalid!");
alert->popup_centered(Size2(200,60)); alert->popup_centered_minsize();
return; return;
} }
if (!_validate(parent_name->get_text())) { if (!_validate(parent_name->get_text())) {
alert->set_text("Parent Class Name is Invalid!"); alert->set_text("Parent Class Name is Invalid!");
alert->popup_centered(Size2(200,60)); alert->popup_centered_minsize();
return; return;
@ -134,7 +134,7 @@ void ScriptCreateDialog::ok_pressed() {
if (!path_valid) { if (!path_valid) {
alert->set_text("Path is Invalid!"); alert->set_text("Path is Invalid!");
alert->popup_centered(Size2(200,60)); alert->popup_centered_minsize();
return; return;
} }
@ -142,7 +142,7 @@ void ScriptCreateDialog::ok_pressed() {
if (err!=OK) { if (err!=OK) {
alert->set_text("Could not create script in filesystem: "+String("")); alert->set_text("Could not create script in filesystem: "+String(""));
alert->popup_centered(Size2(200,60)); alert->popup_centered_minsize();
return; return;
} }
scr->set_path(lpath); scr->set_path(lpath);