diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-14 18:37:30 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-14 18:43:52 +0000 |
commit | 8509c8c8fc01c227aed1edc64ab26307a1f6dbc2 (patch) | |
tree | 58287e2cb7ae91e262575f08da2188be1ebb043f /editor/plugins | |
parent | a511a26ad82bf70ed00ab34a3201ec5c6049387f (diff) |
Rename AcceptDialog get_ok() to get_ok_button()
Also renames:
- AcceptDialog add_cancel() to add_cancel_button()
- ConfirmationDiaglog get_cancel() to get_cancel_button()
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/abstract_polygon_2d_editor.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/gpu_particles_3d_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/mesh_instance_3d_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/mesh_library_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/multimesh_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/resource_preloader_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/sprite_2d_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | editor/plugins/version_control_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 12 |
16 files changed, 42 insertions, 42 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index 0b61db6835..281b1d79af 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -724,7 +724,7 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(EditorNode *p_editor, bool p_wi create_resource = memnew(ConfirmationDialog); add_child(create_resource); - create_resource->get_ok()->set_text(TTR("Create")); + create_resource->get_ok_button()->set_text(TTR("Create")); mode = MODE_EDIT; } diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 17cfb5f5f3..7e376eee57 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1642,7 +1642,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay name_dialog->register_text_enter(name); error_dialog = memnew(ConfirmationDialog); - error_dialog->get_ok()->set_text(TTR("Close")); + error_dialog->get_ok_button()->set_text(TTR("Close")); error_dialog->set_title(TTR("Error!")); add_child(error_dialog); @@ -1650,7 +1650,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay blend_editor.dialog = memnew(AcceptDialog); add_child(blend_editor.dialog); - blend_editor.dialog->get_ok()->set_text(TTR("Close")); + blend_editor.dialog->get_ok_button()->set_text(TTR("Close")); blend_editor.dialog->set_hide_on_ok(true); VBoxContainer *blend_vb = memnew(VBoxContainer); blend_editor.dialog->add_child(blend_vb); diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index f3aa11317e..ba798a7826 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -295,8 +295,8 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() { preview_hb->set_v_size_flags(Control::SIZE_EXPAND_FILL); previews->add_child(preview_hb); - get_ok()->set_text(TTR("Download")); - get_cancel()->set_text(TTR("Close")); + get_ok_button()->set_text(TTR("Download")); + get_cancel_button()->set_text(TTR("Close")); } /////////////////////////////////////////////////////////////////////////////////// diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index c98ba25db5..0de52b3930 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp @@ -213,7 +213,7 @@ GPUParticles3DEditorBase::GPUParticles3DEditorBase() { emission_fill->add_item(TTR("Volume")); emd_vb->add_margin_child(TTR("Emission Source: "), emission_fill); - emission_dialog->get_ok()->set_text(TTR("Create")); + emission_dialog->get_ok_button()->set_text(TTR("Create")); emission_dialog->connect("confirmed", callable_mp(this, &GPUParticles3DEditorBase::_generate_emission_points)); emission_tree_dialog = memnew(SceneTreeDialog); diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index 5b241deab0..2a08e3a8b5 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -457,7 +457,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() { outline_dialog = memnew(ConfirmationDialog); outline_dialog->set_title(TTR("Create Outline Mesh")); - outline_dialog->get_ok()->set_text(TTR("Create")); + outline_dialog->get_ok_button()->set_text(TTR("Create")); VBoxContainer *outline_dialog_vbc = memnew(VBoxContainer); outline_dialog->add_child(outline_dialog_vbc); diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 9d3498efa1..b11a07365c 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -267,7 +267,7 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) { editor = p_editor; cd = memnew(ConfirmationDialog); add_child(cd); - cd->get_ok()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_confirm)); + cd->get_ok_button()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_confirm)); } void MeshLibraryEditorPlugin::edit(Object *p_node) { diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index bd1384967f..b8a4f7bc5a 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -345,9 +345,9 @@ MultiMeshEditor::MultiMeshEditor() { populate_amount->set_value(128); vbc->add_margin_child(TTR("Amount:"), populate_amount); - populate_dialog->get_ok()->set_text(TTR("Populate")); + populate_dialog->get_ok_button()->set_text(TTR("Populate")); - populate_dialog->get_ok()->connect("pressed", callable_mp(this, &MultiMeshEditor::_populate)); + populate_dialog->get_ok_button()->connect("pressed", callable_mp(this, &MultiMeshEditor::_populate)); std = memnew(SceneTreeDialog); populate_dialog->add_child(std); std->connect("selected", callable_mp(this, &MultiMeshEditor::_browsed)); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 6493e0f953..e6a3b9146c 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6423,7 +6423,7 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) { snap_dialog->set_title(TTR("Snap Settings")); add_child(snap_dialog); snap_dialog->connect("confirmed", callable_mp(this, &Node3DEditor::_snap_changed)); - snap_dialog->get_cancel()->connect("pressed", callable_mp(this, &Node3DEditor::_snap_update)); + snap_dialog->get_cancel_button()->connect("pressed", callable_mp(this, &Node3DEditor::_snap_update)); VBoxContainer *snap_dialog_vbc = memnew(VBoxContainer); snap_dialog->add_child(snap_dialog_vbc); diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp index f317aebe74..684d43e963 100644 --- a/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/editor/plugins/resource_preloader_editor_plugin.cpp @@ -62,7 +62,7 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String> &p_paths) dialog->set_text(TTR("ERROR: Couldn't load resource!")); dialog->set_title(TTR("Error!")); //dialog->get_cancel()->set_text("Close"); - dialog->get_ok()->set_text(TTR("Close")); + dialog->get_ok_button()->set_text(TTR("Close")); dialog->popup_centered(); return; ///beh should show an error i guess } @@ -144,7 +144,7 @@ void ResourcePreloaderEditor::_paste_pressed() { if (!r.is_valid()) { dialog->set_text(TTR("Resource clipboard is empty!")); dialog->set_title(TTR("Error!")); - dialog->get_ok()->set_text(TTR("Close")); + dialog->get_ok_button()->set_text(TTR("Close")); dialog->popup_centered(); return; ///beh should show an error i guess } diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 5982074750..e0a6fe16f7 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -338,7 +338,7 @@ void ScriptEditorQuickOpen::_update_search() { } } - get_ok()->set_disabled(root->get_children() == nullptr); + get_ok_button()->set_disabled(root->get_children() == nullptr); } void ScriptEditorQuickOpen::_confirmed() { @@ -382,8 +382,8 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() { search_box->connect("gui_input", callable_mp(this, &ScriptEditorQuickOpen::_sbox_input)); search_options = memnew(Tree); vbc->add_margin_child(TTR("Matches:"), search_options, true); - get_ok()->set_text(TTR("Open")); - get_ok()->set_disabled(true); + get_ok_button()->set_text(TTR("Open")); + get_ok_button()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); search_options->connect("item_activated", callable_mp(this, &ScriptEditorQuickOpen::_confirmed)); @@ -3482,7 +3482,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { tab_container->connect("tab_changed", callable_mp(this, &ScriptEditor::_tab_changed)); erase_tab_confirm = memnew(ConfirmationDialog); - erase_tab_confirm->get_ok()->set_text(TTR("Save")); + erase_tab_confirm->get_ok_button()->set_text(TTR("Save")); erase_tab_confirm->add_button(TTR("Discard"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard"); erase_tab_confirm->connect("confirmed", callable_mp(this, &ScriptEditor::_close_current_tab)); erase_tab_confirm->connect("custom_action", callable_mp(this, &ScriptEditor::_close_discard_current_tab)); @@ -3515,7 +3515,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL); disk_changed->connect("confirmed", callable_mp(this, &ScriptEditor::_reload_scripts)); - disk_changed->get_ok()->set_text(TTR("Reload")); + disk_changed->get_ok_button()->set_text(TTR("Reload")); disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave"); disk_changed->connect("custom_action", callable_mp(this, &ScriptEditor::_resave_scripts)); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 6e174653f6..d24dcdef83 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -661,7 +661,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { vbc->add_child(dl); disk_changed->connect("confirmed", callable_mp(this, &ShaderEditor::_reload_shader_from_disk)); - disk_changed->get_ok()->set_text(TTR("Reload")); + disk_changed->get_ok_button()->set_text(TTR("Reload")); disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave"); disk_changed->connect("custom_action", callable_mp(this, &ShaderEditor::save_external_data)); diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp index f5fafb68a5..1be6b979b1 100644 --- a/editor/plugins/sprite_2d_editor_plugin.cpp +++ b/editor/plugins/sprite_2d_editor_plugin.cpp @@ -120,7 +120,7 @@ void Sprite2DEditor::_menu_option(int p_option) { switch (p_option) { case MENU_OPTION_CONVERT_TO_MESH_2D: { - debug_uv_dialog->get_ok()->set_text(TTR("Create Mesh2D")); + debug_uv_dialog->get_ok_button()->set_text(TTR("Create Mesh2D")); debug_uv_dialog->set_title(TTR("Mesh2D Preview")); _update_mesh_data(); @@ -129,7 +129,7 @@ void Sprite2DEditor::_menu_option(int p_option) { } break; case MENU_OPTION_CONVERT_TO_POLYGON_2D: { - debug_uv_dialog->get_ok()->set_text(TTR("Create Polygon2D")); + debug_uv_dialog->get_ok_button()->set_text(TTR("Create Polygon2D")); debug_uv_dialog->set_title(TTR("Polygon2D Preview")); _update_mesh_data(); @@ -137,7 +137,7 @@ void Sprite2DEditor::_menu_option(int p_option) { debug_uv->update(); } break; case MENU_OPTION_CREATE_COLLISION_POLY_2D: { - debug_uv_dialog->get_ok()->set_text(TTR("Create CollisionPolygon2D")); + debug_uv_dialog->get_ok_button()->set_text(TTR("Create CollisionPolygon2D")); debug_uv_dialog->set_title(TTR("CollisionPolygon2D Preview")); _update_mesh_data(); @@ -146,7 +146,7 @@ void Sprite2DEditor::_menu_option(int p_option) { } break; case MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D: { - debug_uv_dialog->get_ok()->set_text(TTR("Create LightOccluder2D")); + debug_uv_dialog->get_ok_button()->set_text(TTR("Create LightOccluder2D")); debug_uv_dialog->set_title(TTR("LightOccluder2D Preview")); _update_mesh_data(); @@ -515,7 +515,7 @@ Sprite2DEditor::Sprite2DEditor() { add_child(err_dialog); debug_uv_dialog = memnew(ConfirmationDialog); - debug_uv_dialog->get_ok()->set_text(TTR("Create Mesh2D")); + debug_uv_dialog->get_ok_button()->set_text(TTR("Create Mesh2D")); debug_uv_dialog->set_title("Mesh 2D Preview"); VBoxContainer *vb = memnew(VBoxContainer); debug_uv_dialog->add_child(vb); diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 69a8a8d92c..b79d829c34 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -74,8 +74,8 @@ void SpriteFramesEditor::_sheet_preview_draw() { } if (frames_selected.size() == 0) { - split_sheet_dialog->get_ok()->set_disabled(true); - split_sheet_dialog->get_ok()->set_text(TTR("No Frames Selected")); + split_sheet_dialog->get_ok_button()->set_disabled(true); + split_sheet_dialog->get_ok_button()->set_text(TTR("No Frames Selected")); return; } @@ -97,8 +97,8 @@ void SpriteFramesEditor::_sheet_preview_draw() { split_sheet_preview->draw_rect(Rect2(x + 5, y + 5, width - 10, height - 10), Color(0, 0, 0, 1), false); } - split_sheet_dialog->get_ok()->set_disabled(false); - split_sheet_dialog->get_ok()->set_text(vformat(TTR("Add %d Frame(s)"), frames_selected.size())); + split_sheet_dialog->get_ok_button()->set_disabled(false); + split_sheet_dialog->get_ok_button()->set_text(vformat(TTR("Add %d Frame(s)"), frames_selected.size())); } void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) { @@ -310,7 +310,7 @@ void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_ dialog->set_title(TTR("Error!")); //dialog->get_cancel()->set_text("Close"); - dialog->get_ok()->set_text(TTR("Close")); + dialog->get_ok_button()->set_text(TTR("Close")); dialog->popup_centered(); return; ///beh should show an error i guess } @@ -361,7 +361,7 @@ void SpriteFramesEditor::_paste_pressed() { dialog->set_text(TTR("Resource clipboard is empty or not a texture!")); dialog->set_title(TTR("Error!")); //dialog->get_cancel()->set_text("Close"); - dialog->get_ok()->set_text(TTR("Close")); + dialog->get_ok_button()->set_text(TTR("Close")); dialog->popup_centered(); return; ///beh should show an error i guess } diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index dd53f60014..e6fb6ba22a 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -556,7 +556,7 @@ void ThemeEditor::_theme_menu_cbk(int p_option) { if (p_option == POPUP_ADD) { // Add. add_del_dialog->set_title(TTR("Add Item")); - add_del_dialog->get_ok()->set_text(TTR("Add")); + add_del_dialog->get_ok_button()->set_text(TTR("Add")); add_del_dialog->popup_centered(Size2(490, 85) * EDSCALE); base_theme = Theme::get_default(); @@ -564,7 +564,7 @@ void ThemeEditor::_theme_menu_cbk(int p_option) { } else if (p_option == POPUP_CLASS_ADD) { // Add. add_del_dialog->set_title(TTR("Add All Items")); - add_del_dialog->get_ok()->set_text(TTR("Add All")); + add_del_dialog->get_ok_button()->set_text(TTR("Add All")); add_del_dialog->popup_centered(Size2(240, 85) * EDSCALE); base_theme = Theme::get_default(); @@ -576,14 +576,14 @@ void ThemeEditor::_theme_menu_cbk(int p_option) { } else if (p_option == POPUP_REMOVE) { add_del_dialog->set_title(TTR("Remove Item")); - add_del_dialog->get_ok()->set_text(TTR("Remove")); + add_del_dialog->get_ok_button()->set_text(TTR("Remove")); add_del_dialog->popup_centered(Size2(490, 85) * EDSCALE); base_theme = theme; } else if (p_option == POPUP_CLASS_REMOVE) { add_del_dialog->set_title(TTR("Remove All Items")); - add_del_dialog->get_ok()->set_text(TTR("Remove All")); + add_del_dialog->get_ok_button()->set_text(TTR("Remove All")); add_del_dialog->popup_centered(Size2(240, 85) * EDSCALE); base_theme = Theme::get_default(); @@ -908,7 +908,7 @@ ThemeEditor::ThemeEditor() { dialog_vbc->add_child(type_select); - add_del_dialog->get_ok()->connect("pressed", callable_mp(this, &ThemeEditor::_dialog_cbk)); + add_del_dialog->get_ok_button()->connect("pressed", callable_mp(this, &ThemeEditor::_dialog_cbk)); file_dialog = memnew(EditorFileDialog); file_dialog->add_filter("*.theme ; " + TTR("Theme File")); diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index 5e98b2d98b..27ed279edb 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -357,7 +357,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() { set_up_dialog->set_min_size(Size2(400, 100)); version_control_actions->add_child(set_up_dialog); - set_up_ok_button = set_up_dialog->get_ok(); + set_up_ok_button = set_up_dialog->get_ok_button(); set_up_ok_button->set_text(TTR("Close")); set_up_vbc = memnew(VBoxContainer); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 07061a4bc5..da664109dc 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -1009,7 +1009,7 @@ String VisualShaderEditor::_get_description(int p_idx) { void VisualShaderEditor::_update_options_menu() { node_desc->set_text(""); - members_dialog->get_ok()->set_disabled(true); + members_dialog->get_ok_button()->set_disabled(true); members->clear(); TreeItem *root = members->create_item(); @@ -2613,12 +2613,12 @@ void VisualShaderEditor::_member_selected() { TreeItem *item = members->get_selected(); if (item != nullptr && item->has_meta("id")) { - members_dialog->get_ok()->set_disabled(false); + members_dialog->get_ok_button()->set_disabled(false); highend_label->set_visible(add_options[item->get_meta("id")].highend); node_desc->set_text(_get_description(item->get_meta("id"))); } else { highend_label->set_visible(false); - members_dialog->get_ok()->set_disabled(true); + members_dialog->get_ok_button()->set_disabled(true); node_desc->set_text(""); } } @@ -3068,9 +3068,9 @@ VisualShaderEditor::VisualShaderEditor() { members_dialog->set_title(TTR("Create Shader Node")); members_dialog->set_exclusive(false); members_dialog->add_child(members_vb); - members_dialog->get_ok()->set_text(TTR("Create")); - members_dialog->get_ok()->connect("pressed", callable_mp(this, &VisualShaderEditor::_member_create)); - members_dialog->get_ok()->set_disabled(true); + members_dialog->get_ok_button()->set_text(TTR("Create")); + members_dialog->get_ok_button()->connect("pressed", callable_mp(this, &VisualShaderEditor::_member_create)); + members_dialog->get_ok_button()->set_disabled(true); members_dialog->connect("cancelled", callable_mp(this, &VisualShaderEditor::_member_cancel)); add_child(members_dialog); |