diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 9c75e18638b..301e549813a 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2837,6 +2837,8 @@ Hints that a [String] property is text with line breaks. Editing it will show a text input field where line breaks can be typed. + The hint string can be set to [code]"monospace"[/code] to force the input field to use a monospaced font. + If the hint string [code]"no_wrap"[/code] is set, the input field will not wrap lines at boundaries, instead resorting to making the area scrollable. Hints that a [String] property is an [Expression]. diff --git a/editor/export/editor_export_platform_apple_embedded.cpp b/editor/export/editor_export_platform_apple_embedded.cpp index 3699bcac1a0..0d670365b11 100644 --- a/editor/export/editor_export_platform_apple_embedded.cpp +++ b/editor/export/editor_export_platform_apple_embedded.cpp @@ -263,7 +263,7 @@ void EditorExportPlatformAppleEmbedded::get_export_options(List *r r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/short_version", PROPERTY_HINT_PLACEHOLDER_TEXT, "Leave empty to use project version"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/version", PROPERTY_HINT_PLACEHOLDER_TEXT, "Leave empty to use project version"), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/additional_plist_content", PROPERTY_HINT_MULTILINE_TEXT), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/additional_plist_content", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/icon_interpolation", PROPERTY_HINT_ENUM, "Nearest neighbor,Bilinear,Cubic,Trilinear,Lanczos"), 4)); @@ -302,7 +302,7 @@ void EditorExportPlatformAppleEmbedded::get_export_options(List *r r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "entitlements/increased_memory_limit"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "entitlements/game_center"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "entitlements/push_notifications", PROPERTY_HINT_ENUM, "Disabled,Production,Development"), "Disabled")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "entitlements/additional", PROPERTY_HINT_MULTILINE_TEXT), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "entitlements/additional", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/access_wifi"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/performance_gaming_tier"), false)); diff --git a/editor/inspector/editor_properties.cpp b/editor/inspector/editor_properties.cpp index 5e996cbea73..1d2209b2edc 100644 --- a/editor/inspector/editor_properties.cpp +++ b/editor/inspector/editor_properties.cpp @@ -55,6 +55,7 @@ #include "scene/3d/gpu_particles_3d.h" #include "scene/gui/color_picker.h" #include "scene/gui/grid_container.h" +#include "scene/gui/text_edit.h" #include "scene/main/window.h" #include "scene/resources/font.h" #include "scene/resources/mesh.h" @@ -157,10 +158,34 @@ EditorPropertyVariant::EditorPropertyVariant() { ///////////////////// TEXT ///////////////////////// +void EditorPropertyText::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_THEME_CHANGED: { + _update_theme(); + } break; + } +} + void EditorPropertyText::_set_read_only(bool p_read_only) { text->set_editable(!p_read_only); } +void EditorPropertyText::_update_theme() { + Ref font; + int font_size; + + if (monospaced) { + font = get_theme_font(SNAME("source"), EditorStringName(EditorFonts)); + font_size = get_theme_font_size(SNAME("source_size"), EditorStringName(EditorFonts)); + } else { + font = get_theme_font(SceneStringName(font), SNAME("LineEdit")); + font_size = get_theme_font_size(SceneStringName(font_size), SNAME("LineEdit")); + } + + text->add_theme_font_override(SceneStringName(font), font); + text->add_theme_font_size_override(SceneStringName(font_size), font_size); +} + void EditorPropertyText::_text_submitted(const String &p_string) { if (updating) { return; @@ -227,6 +252,14 @@ void EditorPropertyText::set_placeholder(const String &p_string) { text->set_placeholder(p_string); } +void EditorPropertyText::set_monospaced(bool p_monospaced) { + if (p_monospaced == monospaced) { + return; + } + monospaced = p_monospaced; + _update_theme(); +} + EditorPropertyText::EditorPropertyText() { HBoxContainer *hb = memnew(HBoxContainer); add_child(hb); @@ -265,11 +298,11 @@ void EditorPropertyMultilineText::_open_big_text() { big_text = memnew(TextEdit); if (expression) { big_text->set_syntax_highlighter(text->get_syntax_highlighter()); - big_text->add_theme_font_override(SceneStringName(font), get_theme_font(SNAME("expression"), EditorStringName(EditorFonts))); - big_text->add_theme_font_size_override(SceneStringName(font_size), get_theme_font_size(SNAME("expression_size"), EditorStringName(EditorFonts))); } big_text->connect(SceneStringName(text_changed), callable_mp(this, &EditorPropertyMultilineText::_big_text_changed)); - big_text->set_line_wrapping_mode(TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY); + big_text->set_line_wrapping_mode(wrap_lines + ? TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY + : TextEdit::LineWrappingMode::LINE_WRAPPING_NONE); big_text_dialog = memnew(AcceptDialog); big_text_dialog->add_child(big_text); big_text_dialog->set_title(TTR("Edit Text:")); @@ -279,6 +312,8 @@ void EditorPropertyMultilineText::_open_big_text() { big_text_dialog->popup_centered_clamped(Size2(1000, 900) * EDSCALE, 0.8); big_text->set_text(text->get_text()); big_text->grab_focus(); + + _update_theme(); } void EditorPropertyMultilineText::update_property() { @@ -292,34 +327,75 @@ void EditorPropertyMultilineText::update_property() { } } +void EditorPropertyMultilineText::_update_theme() { + Ref df = get_editor_theme_icon(SNAME("DistractionFree")); + open_big_text->set_button_icon(df); + + Ref font; + int font_size; + if (expression) { + font = get_theme_font(SNAME("expression"), EditorStringName(EditorFonts)); + font_size = get_theme_font_size(SNAME("expression_size"), EditorStringName(EditorFonts)); + } else { + // Non expression. + if (monospaced) { + font = get_theme_font(SNAME("source"), EditorStringName(EditorFonts)); + font_size = get_theme_font_size(SNAME("source_size"), EditorStringName(EditorFonts)); + } else { + font = get_theme_font(SceneStringName(font), SNAME("TextEdit")); + font_size = get_theme_font_size(SceneStringName(font_size), SNAME("TextEdit")); + } + } + text->add_theme_font_override(SceneStringName(font), font); + text->add_theme_font_size_override(SceneStringName(font_size), font_size); + text->set_line_wrapping_mode(wrap_lines + ? TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY + : TextEdit::LineWrappingMode::LINE_WRAPPING_NONE); + if (big_text) { + big_text->add_theme_font_override(SceneStringName(font), font); + big_text->add_theme_font_size_override(SceneStringName(font_size), font_size); + big_text->set_line_wrapping_mode(wrap_lines + ? TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY + : TextEdit::LineWrappingMode::LINE_WRAPPING_NONE); + } + + text->set_custom_minimum_size(Vector2(0, font->get_height(font_size) * 6)); +} + void EditorPropertyMultilineText::_notification(int p_what) { switch (p_what) { case NOTIFICATION_THEME_CHANGED: { - Ref df = get_editor_theme_icon(SNAME("DistractionFree")); - open_big_text->set_button_icon(df); - - Ref font; - int font_size; - if (expression) { - font = get_theme_font(SNAME("expression"), EditorStringName(EditorFonts)); - font_size = get_theme_font_size(SNAME("expression_size"), EditorStringName(EditorFonts)); - - text->add_theme_font_override(SceneStringName(font), font); - text->add_theme_font_size_override(SceneStringName(font_size), font_size); - if (big_text) { - big_text->add_theme_font_override(SceneStringName(font), font); - big_text->add_theme_font_size_override(SceneStringName(font_size), font_size); - } - } else { - font = get_theme_font(SceneStringName(font), SNAME("TextEdit")); - font_size = get_theme_font_size(SceneStringName(font_size), SNAME("TextEdit")); - } - text->set_custom_minimum_size(Vector2(0, font->get_height(font_size) * 6)); + _update_theme(); } break; } } -EditorPropertyMultilineText::EditorPropertyMultilineText(bool p_expression) { +void EditorPropertyMultilineText::EditorPropertyMultilineText::set_monospaced(bool p_monospaced) { + if (p_monospaced == monospaced) { + return; + } + monospaced = p_monospaced; + _update_theme(); +} + +bool EditorPropertyMultilineText::EditorPropertyMultilineText::get_monospaced() { + return monospaced; +} + +void EditorPropertyMultilineText::EditorPropertyMultilineText::set_wrap_lines(bool p_wrap_lines) { + if (p_wrap_lines == wrap_lines) { + return; + } + wrap_lines = p_wrap_lines; + _update_theme(); +} + +bool EditorPropertyMultilineText::EditorPropertyMultilineText::get_wrap_lines() { + return wrap_lines; +} + +EditorPropertyMultilineText::EditorPropertyMultilineText(bool p_expression) : + expression(p_expression) { HBoxContainer *hb = memnew(HBoxContainer); hb->add_theme_constant_override("separation", 0); add_child(hb); @@ -337,8 +413,8 @@ EditorPropertyMultilineText::EditorPropertyMultilineText(bool p_expression) { hb->add_child(open_big_text); big_text_dialog = nullptr; big_text = nullptr; - if (p_expression) { - expression = true; + + if (expression) { Ref highlighter; highlighter.instantiate(); text->set_syntax_highlighter(highlighter); @@ -3889,7 +3965,14 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ } else if (p_hint == PROPERTY_HINT_INPUT_NAME) { return get_input_action_editor(p_hint_text, false); } else if (p_hint == PROPERTY_HINT_MULTILINE_TEXT) { - EditorPropertyMultilineText *editor = memnew(EditorPropertyMultilineText); + Vector options = p_hint_text.split(",", false); + EditorPropertyMultilineText *editor = memnew(EditorPropertyMultilineText(false)); + if (options.has("monospace")) { + editor->set_monospaced(true); + } + if (options.has("no_wrap")) { + editor->set_wrap_lines(false); + } return editor; } else if (p_hint == PROPERTY_HINT_EXPRESSION) { EditorPropertyMultilineText *editor = memnew(EditorPropertyMultilineText(true)); @@ -3916,6 +3999,12 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ return editor; } else { EditorPropertyText *editor = memnew(EditorPropertyText); + + Vector hints = p_hint_text.split(","); + if (hints.has("monospace")) { + editor->set_monospaced(true); + } + if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) { editor->set_placeholder(p_hint_text); } else if (p_hint == PROPERTY_HINT_PASSWORD) { diff --git a/editor/inspector/editor_properties.h b/editor/inspector/editor_properties.h index 494723728eb..4cafe7d9ec4 100644 --- a/editor/inspector/editor_properties.h +++ b/editor/inspector/editor_properties.h @@ -95,12 +95,16 @@ class EditorPropertyText : public EditorProperty { GDCLASS(EditorPropertyText, EditorProperty); LineEdit *text = nullptr; + bool monospaced = false; bool updating = false; bool string_name = false; void _text_changed(const String &p_string); void _text_submitted(const String &p_string); + void _update_theme(); protected: + void _notification(int p_what); + virtual void _set_read_only(bool p_read_only) override; public: @@ -108,21 +112,27 @@ public: virtual void update_property() override; void set_placeholder(const String &p_string); void set_secret(bool p_enabled); + void set_monospaced(bool p_monospaced); EditorPropertyText(); }; class EditorPropertyMultilineText : public EditorProperty { GDCLASS(EditorPropertyMultilineText, EditorProperty); + TextEdit *text = nullptr; AcceptDialog *big_text_dialog = nullptr; TextEdit *big_text = nullptr; Button *open_big_text = nullptr; + bool expression = false; + bool monospaced = false; + bool wrap_lines = true; + void _big_text_changed(); void _text_changed(); void _open_big_text(); - bool expression = false; + void _update_theme(); protected: virtual void _set_read_only(bool p_read_only) override; @@ -130,6 +140,13 @@ protected: public: virtual void update_property() override; + + void set_monospaced(bool p_monospaced); + bool get_monospaced(); + + void set_wrap_lines(bool p_wrap_lines); + bool get_wrap_lines(); + EditorPropertyMultilineText(bool p_expression = false); }; diff --git a/editor/register_editor_types.cpp b/editor/register_editor_types.cpp index cd7ac80f74f..769411b4e00 100644 --- a/editor/register_editor_types.cpp +++ b/editor/register_editor_types.cpp @@ -281,7 +281,7 @@ void register_editor_types() { #endif // For correct doc generation. - GLOBAL_DEF("editor/run/main_run_args", ""); + GLOBAL_DEF(PropertyInfo(Variant::STRING, "editor/run/main_run_args", PROPERTY_HINT_NONE, "monospace"), ""); GLOBAL_DEF(PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR), "res://script_templates"); diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index ab3363ab4c4..00e743544b8 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -621,14 +621,16 @@ [/codeblock] - + + Export a [String], [Array][lb][String][rb], [PackedStringArray], [Dictionary] or [Array][lb][Dictionary][rb] property with a large [TextEdit] widget instead of a [LineEdit]. This adds support for multiline content and makes it easier to edit large amount of text stored in the property. See also [constant PROPERTY_HINT_MULTILINE_TEXT]. [codeblock] @export_multiline var character_biography @export_multiline var npc_dialogs: Array[String] + @export_multiline("monospace", "no_wrap") var favorite_ascii_art: String [/codeblock] diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index b2c901a8a4e..6e955969ba3 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -160,7 +160,7 @@ GDScriptParser::GDScriptParser() { register_annotation(MethodInfo("@export_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations); register_annotation(MethodInfo("@export_global_file", PropertyInfo(Variant::STRING, "filter")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations, varray(""), true); register_annotation(MethodInfo("@export_global_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations); - register_annotation(MethodInfo("@export_multiline"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations); + register_annotation(MethodInfo("@export_multiline", PropertyInfo(Variant::STRING, "hint")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations, varray(""), true); register_annotation(MethodInfo("@export_placeholder", PropertyInfo(Variant::STRING, "placeholder")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations); register_annotation(MethodInfo("@export_range", PropertyInfo(Variant::FLOAT, "min"), PropertyInfo(Variant::FLOAT, "max"), PropertyInfo(Variant::FLOAT, "step"), PropertyInfo(Variant::STRING, "extra_hints")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations, varray(1.0, ""), true); register_annotation(MethodInfo("@export_exp_easing", PropertyInfo(Variant::STRING, "hints")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations, varray(""), true); diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 894e20f1c5c..910ba81d951 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -2184,11 +2184,11 @@ void EditorExportPlatformAndroid::get_export_options(List *r_optio r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "user_data_backup/allow"), false)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "command_line/extra_args"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "command_line/extra_args", PROPERTY_HINT_NONE, "monospace"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "apk_expansion/enable"), false, false, true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "apk_expansion/SALT"), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "apk_expansion/public_key", PROPERTY_HINT_MULTILINE_TEXT), "", false, true)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "apk_expansion/public_key", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "", false, true)); r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "permissions/custom_permissions"), PackedStringArray())); diff --git a/platform/linuxbsd/export/export_plugin.cpp b/platform/linuxbsd/export/export_plugin.cpp index b73c2510c85..6c470d9be4c 100644 --- a/platform/linuxbsd/export/export_plugin.cpp +++ b/platform/linuxbsd/export/export_plugin.cpp @@ -200,10 +200,10 @@ void EditorExportPlatformLinuxBSD::get_export_options(List *r_opti r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/host"), "user@host_ip")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/port"), "22")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_ssh", PROPERTY_HINT_MULTILINE_TEXT), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_scp", PROPERTY_HINT_MULTILINE_TEXT), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/run_script", PROPERTY_HINT_MULTILINE_TEXT), run_script)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/cleanup_script", PROPERTY_HINT_MULTILINE_TEXT), cleanup_script)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_ssh", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_scp", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/run_script", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), run_script)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/cleanup_script", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), cleanup_script)); } bool EditorExportPlatformLinuxBSD::is_elf(const String &p_path) const { diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index 2761e4682fc..bf66150fa02 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -490,7 +490,7 @@ void EditorExportPlatformMacOS::get_export_options(List *r_options r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "shader_baker/enabled"), false)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/additional_plist_content", PROPERTY_HINT_MULTILINE_TEXT), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/additional_plist_content", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "xcode/platform_build"), "14C18")); // TODO(sgc): Need to set appropriate version when using Metal @@ -539,7 +539,7 @@ void EditorExportPlatformMacOS::get_export_options(List *r_options r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/entitlements/app_sandbox/files_movies", PROPERTY_HINT_ENUM, "No,Read-only,Read-write"), 0)); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/entitlements/app_sandbox/files_user_selected", PROPERTY_HINT_ENUM, "No,Read-only,Read-write"), 0)); r_options->push_back(ExportOption(PropertyInfo(Variant::ARRAY, "codesign/entitlements/app_sandbox/helper_executables", PROPERTY_HINT_ARRAY_TYPE, itos(Variant::STRING) + "/" + itos(PROPERTY_HINT_GLOBAL_FILE) + ":"), Array())); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements/additional", PROPERTY_HINT_MULTILINE_TEXT), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements/additional", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray())); #ifdef MACOS_ENABLED @@ -609,10 +609,10 @@ void EditorExportPlatformMacOS::get_export_options(List *r_options r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/host"), "user@host_ip")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/port"), "22")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_ssh", PROPERTY_HINT_MULTILINE_TEXT), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_scp", PROPERTY_HINT_MULTILINE_TEXT), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/run_script", PROPERTY_HINT_MULTILINE_TEXT), run_script)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/cleanup_script", PROPERTY_HINT_MULTILINE_TEXT), cleanup_script)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_ssh", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_scp", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/run_script", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), run_script)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/cleanup_script", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), cleanup_script)); } void _rgba8_to_packbits_encode(int p_ch, int p_size, Vector &p_source, Vector &p_dest) { diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cpp index 7d817a79af9..effd549b44c 100644 --- a/platform/web/export/export_plugin.cpp +++ b/platform/web/export/export_plugin.cpp @@ -375,7 +375,7 @@ void EditorExportPlatformWeb::get_export_options(List *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "html/export_icon"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/custom_html_shell", PROPERTY_HINT_FILE, "*.html"), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/head_include", PROPERTY_HINT_MULTILINE_TEXT), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "html/head_include", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "html/canvas_resize_policy", PROPERTY_HINT_ENUM, "None,Project,Adaptive"), 2)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "html/focus_canvas_on_start"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "html/experimental_virtual_keyboard"), false)); diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp index a66752aca42..13116a3ac96 100644 --- a/platform/windows/export/export_plugin.cpp +++ b/platform/windows/export/export_plugin.cpp @@ -499,10 +499,10 @@ void EditorExportPlatformWindows::get_export_options(List *r_optio r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/host"), "user@host_ip")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/port"), "22")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_ssh", PROPERTY_HINT_MULTILINE_TEXT), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_scp", PROPERTY_HINT_MULTILINE_TEXT), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/run_script", PROPERTY_HINT_MULTILINE_TEXT), run_script)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/cleanup_script", PROPERTY_HINT_MULTILINE_TEXT), cleanup_script)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_ssh", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/extra_args_scp", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/run_script", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), run_script)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "ssh_remote_deploy/cleanup_script", PROPERTY_HINT_MULTILINE_TEXT, "monospace,no_wrap"), cleanup_script)); } Error EditorExportPlatformWindows::_add_data(const Ref &p_preset, const String &p_path, bool p_console_icon) {