diff options
author | Stijn Hinlopen <f.a.hinlopen@gmail.com> | 2020-07-11 18:45:19 +0200 |
---|---|---|
committer | Stijn Hinlopen <f.a.hinlopen@gmail.com> | 2020-07-14 14:35:22 +0200 |
commit | 526e060b7320de63501680549a5b586573e27a01 (patch) | |
tree | 87587fd4ab8546d8396229f0274cf75be94827cb /editor/plugins | |
parent | 2921827387b339fef98cb761f9571dd0f1dd1986 (diff) |
Resize dialogs (FileDialog, EditorFileDialog, Reparent, SceneTreeDialog and resource depency dialogs).
Diffstat (limited to 'editor/plugins')
18 files changed, 24 insertions, 26 deletions
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp index 959301907c..d335b29c2f 100644 --- a/editor/plugins/animation_blend_space_1d_editor.cpp +++ b/editor/plugins/animation_blend_space_1d_editor.cpp @@ -375,7 +375,7 @@ void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) { for (List<String>::Element *E = filters.front(); E; E = E->next()) { open_file->add_filter("*." + E->get()); } - open_file->popup_centered_ratio(); + open_file->popup_file_dialog(); return; } else if (p_index == MENU_LOAD_FILE_CONFIRM) { node = file_loaded; diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp index 1ab114fc01..805df0cbb9 100644 --- a/editor/plugins/animation_blend_space_2d_editor.cpp +++ b/editor/plugins/animation_blend_space_2d_editor.cpp @@ -298,7 +298,7 @@ void AnimationNodeBlendSpace2DEditor::_add_menu_type(int p_index) { for (List<String>::Element *E = filters.front(); E; E = E->next()) { open_file->add_filter("*." + E->get()); } - open_file->popup_centered_ratio(); + open_file->popup_file_dialog(); return; } else if (p_index == MENU_LOAD_FILE_CONFIRM) { node = file_loaded; diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 82d942821f..6419f62343 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -276,7 +276,7 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) { for (List<String>::Element *E = filters.front(); E; E = E->next()) { open_file->add_filter("*." + E->get()); } - open_file->popup_centered_ratio(); + open_file->popup_file_dialog(); return; } else if (p_idx == MENU_LOAD_FILE_CONFIRM) { anode = file_loaded; diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index be220fb30c..e2f35e29d8 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -340,7 +340,7 @@ void AnimationPlayerEditor::_animation_load() { file->add_filter("*." + E->get() + " ; " + E->get().to_upper()); } - file->popup_centered_ratio(); + file->popup_file_dialog(); current_option = RESOURCE_LOAD; } @@ -399,8 +399,8 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource) } } file->set_current_path(path); - file->popup_centered_ratio(); file->set_title(TTR("Save Resource As...")); + file->popup_file_dialog(); current_option = RESOURCE_SAVE; } diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 0970608853..26006d85c9 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -406,7 +406,7 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) { for (List<String>::Element *E = filters.front(); E; E = E->next()) { open_file->add_filter("*." + E->get()); } - open_file->popup_centered_ratio(); + open_file->popup_file_dialog(); return; } else if (p_index == MENU_LOAD_FILE_CONFIRM) { node = file_loaded; diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index da170cd498..28ac85457b 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -1260,7 +1260,7 @@ void EditorAssetLibrary::_asset_file_selected(const String &p_file) { } void EditorAssetLibrary::_asset_open() { - asset_open->popup_centered_ratio(); + asset_open->popup_file_dialog(); } void EditorAssetLibrary::_manage_plugins() { diff --git a/editor/plugins/baked_lightmap_editor_plugin.cpp b/editor/plugins/baked_lightmap_editor_plugin.cpp index ee9feb7f74..e5d4e4a761 100644 --- a/editor/plugins/baked_lightmap_editor_plugin.cpp +++ b/editor/plugins/baked_lightmap_editor_plugin.cpp @@ -54,7 +54,7 @@ void BakedLightmapEditorPlugin::_bake_select_file(const String &p_file) { scene_path = scene_path.get_basename() + ".lmbake"; file_dialog->set_current_path(scene_path); - file_dialog->popup_centered_ratio(); + file_dialog->popup_file_dialog(); } break; case BakedLightmap::BAKE_ERROR_NO_MESHES: diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp index 008de7cfb4..32f7d02af2 100644 --- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp +++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp @@ -60,7 +60,7 @@ void CPUParticles2DEditorPlugin::_file_selected(const String &p_file) { void CPUParticles2DEditorPlugin::_menu_callback(int p_idx) { switch (p_idx) { case MENU_LOAD_EMISSION_MASK: { - file->popup_centered_ratio(); + file->popup_file_dialog(); } break; case MENU_CLEAR_EMISSION_MASK: { diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.cpp b/editor/plugins/cpu_particles_3d_editor_plugin.cpp index ef26ecd767..d44e487ae4 100644 --- a/editor/plugins/cpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/cpu_particles_3d_editor_plugin.cpp @@ -48,7 +48,7 @@ void CPUParticles3DEditor::_notification(int p_notification) { void CPUParticles3DEditor::_menu_option(int p_option) { switch (p_option) { case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: { - emission_tree_dialog->popup_centered_ratio(); + emission_tree_dialog->popup_scenetree_dialog(); } break; diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp index 1b48e17772..2f5dd36ef1 100644 --- a/editor/plugins/gi_probe_editor_plugin.cpp +++ b/editor/plugins/gi_probe_editor_plugin.cpp @@ -41,7 +41,7 @@ void GIProbeEditorPlugin::_bake() { path = path.get_basename() + "." + gi_probe->get_name() + "_data.res"; } probe_file->set_current_path(path); - probe_file->popup_centered_ratio(); + probe_file->popup_file_dialog(); return; } gi_probe->bake(); diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.cpp b/editor/plugins/gpu_particles_2d_editor_plugin.cpp index 01420dac3e..d27df1d063 100644 --- a/editor/plugins/gpu_particles_2d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_2d_editor_plugin.cpp @@ -69,7 +69,7 @@ void GPUParticles2DEditorPlugin::_menu_callback(int p_idx) { generate_visibility_rect->popup_centered(); } break; case MENU_LOAD_EMISSION_MASK: { - file->popup_centered_ratio(); + file->popup_file_dialog(); } break; case MENU_CLEAR_EMISSION_MASK: { diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index fa507dd3d7..c98ba25db5 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp @@ -254,7 +254,7 @@ void GPUParticles3DEditor::_menu_option(int p_option) { return; } - emission_tree_dialog->popup_centered_ratio(); + emission_tree_dialog->popup_scenetree_dialog(); } break; case MENU_OPTION_CONVERT_TO_CPU_PARTICLES: { diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 7690beeee8..374a8c8290 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -224,7 +224,7 @@ void MeshLibraryEditor::_menu_cbk(int p_option) { } } break; case MENU_OPTION_IMPORT_FROM_SCENE: { - file->popup_centered_ratio(); + file->popup_file_dialog(); } break; case MENU_OPTION_UPDATE_FROM_SCENE: { cd->set_text(vformat(TTR("Update from existing scene?:\n%s"), String(mesh_library->get_meta("_editor_source_scene")))); diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index 3904389e09..bd1384967f 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -251,7 +251,7 @@ void MultiMeshEditor::edit(MultiMeshInstance3D *p_multimesh) { void MultiMeshEditor::_browse(bool p_source) { browsing_source = p_source; std->get_scene_tree()->set_marked(node, false); - std->popup_centered_ratio(); + std->popup_scenetree_dialog(); if (p_source) { std->set_title(TTR("Select a Source Mesh:")); } else { diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp index 75cb93ee76..9ab5bfd8a3 100644 --- a/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/editor/plugins/resource_preloader_editor_plugin.cpp @@ -95,8 +95,7 @@ void ResourcePreloaderEditor::_load_pressed() { } file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES); - - file->popup_centered_ratio(); + file->popup_file_dialog(); } void ResourcePreloaderEditor::_item_edited() { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 67268e0027..d66bdb46fe 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1107,7 +1107,7 @@ void ScriptEditor::_menu_option(int p_option) { file_dialog_option = FILE_NEW_TEXTFILE; file_dialog->clear_filters(); - file_dialog->popup_centered_ratio(); + file_dialog->popup_file_dialog(); file_dialog->set_title(TTR("New Text File...")); } break; case FILE_OPEN: { @@ -1122,7 +1122,7 @@ void ScriptEditor::_menu_option(int p_option) { file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); } - file_dialog->popup_centered_ratio(); + file_dialog->popup_file_dialog(); file_dialog->set_title(TTR("Open File")); return; } break; @@ -1275,7 +1275,7 @@ void ScriptEditor::_menu_option(int p_option) { file_dialog->clear_filters(); file_dialog->set_current_dir(text_file->get_path().get_base_dir()); file_dialog->set_current_file(text_file->get_path().get_file()); - file_dialog->popup_centered_ratio(); + file_dialog->popup_file_dialog(); file_dialog->set_title(TTR("Save File As...")); break; } @@ -1425,7 +1425,7 @@ void ScriptEditor::_theme_option(int p_option) { file_dialog_option = THEME_IMPORT; file_dialog->clear_filters(); file_dialog->add_filter("*.tet"); - file_dialog->popup_centered_ratio(); + file_dialog->popup_file_dialog(); file_dialog->set_title(TTR("Import Theme")); } break; case THEME_RELOAD: { @@ -1451,7 +1451,7 @@ void ScriptEditor::_show_save_theme_as_dialog() { file_dialog->clear_filters(); file_dialog->add_filter("*.tet"); file_dialog->set_current_path(EditorSettings::get_singleton()->get_text_editor_themes_dir().plus_file(EditorSettings::get_singleton()->get("text_editor/theme/color_theme"))); - file_dialog->popup_centered_ratio(); + file_dialog->popup_file_dialog(); file_dialog->set_title(TTR("Save Theme As...")); } diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 7102faf58a..516c14329c 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -48,7 +48,7 @@ void SpriteFramesEditor::_open_sprite_sheet() { file_split_sheet->add_filter("*." + extensions[i]); } - file_split_sheet->popup_centered_ratio(); + file_split_sheet->popup_file_dialog(); } void SpriteFramesEditor::_sheet_preview_draw() { @@ -298,8 +298,7 @@ void SpriteFramesEditor::_load_pressed() { } file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES); - - file->popup_centered_ratio(); + file->popup_file_dialog(); } void SpriteFramesEditor::_paste_pressed() { diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index a37cf7e426..b121a7ae3e 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -646,7 +646,7 @@ void TileSetEditor::_on_tileset_toolbar_button_pressed(int p_index) { option = p_index; switch (option) { case TOOL_TILESET_ADD_TEXTURE: { - texture_dialog->popup_centered_ratio(); + texture_dialog->popup_file_dialog(); } break; case TOOL_TILESET_REMOVE_TEXTURE: { if (get_current_texture().is_valid()) { |