diff options
Diffstat (limited to 'editor/shader_create_dialog.cpp')
-rw-r--r-- | editor/shader_create_dialog.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index 9c322320b8..28e1e9bf22 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -184,7 +184,6 @@ void ShaderCreateDialog::_create_new() { Ref<VisualShader> visual_shader; visual_shader.instantiate(); shader = visual_shader; - visual_shader->set_engine_version(Engine::get_singleton()->get_version_info()); visual_shader->set_mode(Shader::Mode(current_mode)); } @@ -271,7 +270,7 @@ void ShaderCreateDialog::_built_in_toggled(bool p_enabled) { void ShaderCreateDialog::_browse_path() { file_browse->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE); file_browse->set_title(TTR("Open Shader / Choose Location")); - file_browse->get_ok_button()->set_text(TTR("Open")); + file_browse->set_ok_button_text(TTR("Open")); file_browse->set_disable_overwrite_warning(true); file_browse->clear_filters(); @@ -470,20 +469,20 @@ void ShaderCreateDialog::_update_dialog() { builtin_warning_label->set_visible(is_built_in); if (is_built_in) { - get_ok_button()->set_text(TTR("Create")); + set_ok_button_text(TTR("Create")); _msg_path_valid(true, TTR("Built-in shader (into scene file).")); } else if (is_new_shader_created) { - get_ok_button()->set_text(TTR("Create")); + set_ok_button_text(TTR("Create")); if (is_path_valid) { _msg_path_valid(true, TTR("Will create a new shader file.")); } } else if (load_enabled) { - get_ok_button()->set_text(TTR("Load")); + set_ok_button_text(TTR("Load")); if (is_path_valid) { _msg_path_valid(true, TTR("Will load an existing shader file.")); } } else { - get_ok_button()->set_text(TTR("Create")); + set_ok_button_text(TTR("Create")); _msg_path_valid(false, TTR("Shader file already exists.")); shader_ok = false; @@ -529,7 +528,7 @@ ShaderCreateDialog::ShaderCreateDialog() { builtin_warning_label->set_text( TTR("Note: Built-in shaders can't be edited using an external editor.")); vb->add_child(builtin_warning_label); - builtin_warning_label->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART); + builtin_warning_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART); builtin_warning_label->hide(); status_panel = memnew(PanelContainer); @@ -633,13 +632,13 @@ ShaderCreateDialog::ShaderCreateDialog() { add_child(file_browse); alert = memnew(AcceptDialog); - alert->get_label()->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART); + alert->get_label()->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART); alert->get_label()->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); alert->get_label()->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER); alert->get_label()->set_custom_minimum_size(Size2(325, 60) * EDSCALE); add_child(alert); - get_ok_button()->set_text(TTR("Create")); + set_ok_button_text(TTR("Create")); set_hide_on_ok(false); set_title(TTR("Create Shader")); |