Merge pull request #113512 from adamscott/PROPERTY_HINT_MULTILINE_TEXT_monospace-hint

Add new monospace related hint strings
This commit is contained in:
Thaddeus Crews 2025-12-03 21:01:58 -06:00
commit 0755f096e0
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
12 changed files with 160 additions and 50 deletions

View file

@ -2837,6 +2837,8 @@
</constant> </constant>
<constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint"> <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
Hints that a [String] property is text with line breaks. Editing it will show a text input field where line breaks can be typed. 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.
</constant> </constant>
<constant name="PROPERTY_HINT_EXPRESSION" value="19" enum="PropertyHint"> <constant name="PROPERTY_HINT_EXPRESSION" value="19" enum="PropertyHint">
Hints that a [String] property is an [Expression]. Hints that a [String] property is an [Expression].

View file

@ -263,7 +263,7 @@ void EditorExportPlatformAppleEmbedded::get_export_options(List<ExportOption> *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/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/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)); 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<ExportOption> *r
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "entitlements/increased_memory_limit"), false)); 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::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/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/access_wifi"), false));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/performance_gaming_tier"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/performance_gaming_tier"), false));

View file

@ -55,6 +55,7 @@
#include "scene/3d/gpu_particles_3d.h" #include "scene/3d/gpu_particles_3d.h"
#include "scene/gui/color_picker.h" #include "scene/gui/color_picker.h"
#include "scene/gui/grid_container.h" #include "scene/gui/grid_container.h"
#include "scene/gui/text_edit.h"
#include "scene/main/window.h" #include "scene/main/window.h"
#include "scene/resources/font.h" #include "scene/resources/font.h"
#include "scene/resources/mesh.h" #include "scene/resources/mesh.h"
@ -157,10 +158,34 @@ EditorPropertyVariant::EditorPropertyVariant() {
///////////////////// TEXT ///////////////////////// ///////////////////// 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) { void EditorPropertyText::_set_read_only(bool p_read_only) {
text->set_editable(!p_read_only); text->set_editable(!p_read_only);
} }
void EditorPropertyText::_update_theme() {
Ref<Font> 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) { void EditorPropertyText::_text_submitted(const String &p_string) {
if (updating) { if (updating) {
return; return;
@ -227,6 +252,14 @@ void EditorPropertyText::set_placeholder(const String &p_string) {
text->set_placeholder(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() { EditorPropertyText::EditorPropertyText() {
HBoxContainer *hb = memnew(HBoxContainer); HBoxContainer *hb = memnew(HBoxContainer);
add_child(hb); add_child(hb);
@ -265,11 +298,11 @@ void EditorPropertyMultilineText::_open_big_text() {
big_text = memnew(TextEdit); big_text = memnew(TextEdit);
if (expression) { if (expression) {
big_text->set_syntax_highlighter(text->get_syntax_highlighter()); 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->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 = memnew(AcceptDialog);
big_text_dialog->add_child(big_text); big_text_dialog->add_child(big_text);
big_text_dialog->set_title(TTR("Edit 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_dialog->popup_centered_clamped(Size2(1000, 900) * EDSCALE, 0.8);
big_text->set_text(text->get_text()); big_text->set_text(text->get_text());
big_text->grab_focus(); big_text->grab_focus();
_update_theme();
} }
void EditorPropertyMultilineText::update_property() { void EditorPropertyMultilineText::update_property() {
@ -292,34 +327,75 @@ void EditorPropertyMultilineText::update_property() {
} }
} }
void EditorPropertyMultilineText::_update_theme() {
Ref<Texture2D> df = get_editor_theme_icon(SNAME("DistractionFree"));
open_big_text->set_button_icon(df);
Ref<Font> 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) { void EditorPropertyMultilineText::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_THEME_CHANGED: { case NOTIFICATION_THEME_CHANGED: {
Ref<Texture2D> df = get_editor_theme_icon(SNAME("DistractionFree")); _update_theme();
open_big_text->set_button_icon(df);
Ref<Font> 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));
} break; } 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); HBoxContainer *hb = memnew(HBoxContainer);
hb->add_theme_constant_override("separation", 0); hb->add_theme_constant_override("separation", 0);
add_child(hb); add_child(hb);
@ -337,8 +413,8 @@ EditorPropertyMultilineText::EditorPropertyMultilineText(bool p_expression) {
hb->add_child(open_big_text); hb->add_child(open_big_text);
big_text_dialog = nullptr; big_text_dialog = nullptr;
big_text = nullptr; big_text = nullptr;
if (p_expression) {
expression = true; if (expression) {
Ref<EditorStandardSyntaxHighlighter> highlighter; Ref<EditorStandardSyntaxHighlighter> highlighter;
highlighter.instantiate(); highlighter.instantiate();
text->set_syntax_highlighter(highlighter); 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) { } else if (p_hint == PROPERTY_HINT_INPUT_NAME) {
return get_input_action_editor(p_hint_text, false); return get_input_action_editor(p_hint_text, false);
} else if (p_hint == PROPERTY_HINT_MULTILINE_TEXT) { } else if (p_hint == PROPERTY_HINT_MULTILINE_TEXT) {
EditorPropertyMultilineText *editor = memnew(EditorPropertyMultilineText); Vector<String> 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; return editor;
} else if (p_hint == PROPERTY_HINT_EXPRESSION) { } else if (p_hint == PROPERTY_HINT_EXPRESSION) {
EditorPropertyMultilineText *editor = memnew(EditorPropertyMultilineText(true)); EditorPropertyMultilineText *editor = memnew(EditorPropertyMultilineText(true));
@ -3916,6 +3999,12 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
return editor; return editor;
} else { } else {
EditorPropertyText *editor = memnew(EditorPropertyText); EditorPropertyText *editor = memnew(EditorPropertyText);
Vector<String> hints = p_hint_text.split(",");
if (hints.has("monospace")) {
editor->set_monospaced(true);
}
if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) { if (p_hint == PROPERTY_HINT_PLACEHOLDER_TEXT) {
editor->set_placeholder(p_hint_text); editor->set_placeholder(p_hint_text);
} else if (p_hint == PROPERTY_HINT_PASSWORD) { } else if (p_hint == PROPERTY_HINT_PASSWORD) {

View file

@ -95,12 +95,16 @@ class EditorPropertyText : public EditorProperty {
GDCLASS(EditorPropertyText, EditorProperty); GDCLASS(EditorPropertyText, EditorProperty);
LineEdit *text = nullptr; LineEdit *text = nullptr;
bool monospaced = false;
bool updating = false; bool updating = false;
bool string_name = false; bool string_name = false;
void _text_changed(const String &p_string); void _text_changed(const String &p_string);
void _text_submitted(const String &p_string); void _text_submitted(const String &p_string);
void _update_theme();
protected: protected:
void _notification(int p_what);
virtual void _set_read_only(bool p_read_only) override; virtual void _set_read_only(bool p_read_only) override;
public: public:
@ -108,21 +112,27 @@ public:
virtual void update_property() override; virtual void update_property() override;
void set_placeholder(const String &p_string); void set_placeholder(const String &p_string);
void set_secret(bool p_enabled); void set_secret(bool p_enabled);
void set_monospaced(bool p_monospaced);
EditorPropertyText(); EditorPropertyText();
}; };
class EditorPropertyMultilineText : public EditorProperty { class EditorPropertyMultilineText : public EditorProperty {
GDCLASS(EditorPropertyMultilineText, EditorProperty); GDCLASS(EditorPropertyMultilineText, EditorProperty);
TextEdit *text = nullptr; TextEdit *text = nullptr;
AcceptDialog *big_text_dialog = nullptr; AcceptDialog *big_text_dialog = nullptr;
TextEdit *big_text = nullptr; TextEdit *big_text = nullptr;
Button *open_big_text = nullptr; Button *open_big_text = nullptr;
bool expression = false;
bool monospaced = false;
bool wrap_lines = true;
void _big_text_changed(); void _big_text_changed();
void _text_changed(); void _text_changed();
void _open_big_text(); void _open_big_text();
bool expression = false; void _update_theme();
protected: protected:
virtual void _set_read_only(bool p_read_only) override; virtual void _set_read_only(bool p_read_only) override;
@ -130,6 +140,13 @@ protected:
public: public:
virtual void update_property() override; 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); EditorPropertyMultilineText(bool p_expression = false);
}; };

View file

@ -281,7 +281,7 @@ void register_editor_types() {
#endif #endif
// For correct doc generation. // 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"); GLOBAL_DEF(PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR), "res://script_templates");

View file

@ -621,14 +621,16 @@
[/codeblock] [/codeblock]
</description> </description>
</annotation> </annotation>
<annotation name="@export_multiline"> <annotation name="@export_multiline" qualifiers="vararg">
<return type="void" /> <return type="void" />
<param index="0" name="hint" type="String" default="&quot;&quot;" />
<description> <description>
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. 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]. See also [constant PROPERTY_HINT_MULTILINE_TEXT].
[codeblock] [codeblock]
@export_multiline var character_biography @export_multiline var character_biography
@export_multiline var npc_dialogs: Array[String] @export_multiline var npc_dialogs: Array[String]
@export_multiline("monospace", "no_wrap") var favorite_ascii_art: String
[/codeblock] [/codeblock]
</description> </description>
</annotation> </annotation>

View file

@ -160,7 +160,7 @@ GDScriptParser::GDScriptParser() {
register_annotation(MethodInfo("@export_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_DIR, Variant::STRING>); register_annotation(MethodInfo("@export_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_DIR, Variant::STRING>);
register_annotation(MethodInfo("@export_global_file", PropertyInfo(Variant::STRING, "filter")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_GLOBAL_FILE, Variant::STRING>, varray(""), true); register_annotation(MethodInfo("@export_global_file", PropertyInfo(Variant::STRING, "filter")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_GLOBAL_FILE, Variant::STRING>, varray(""), true);
register_annotation(MethodInfo("@export_global_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_GLOBAL_DIR, Variant::STRING>); register_annotation(MethodInfo("@export_global_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_GLOBAL_DIR, Variant::STRING>);
register_annotation(MethodInfo("@export_multiline"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_MULTILINE_TEXT, Variant::STRING>); register_annotation(MethodInfo("@export_multiline", PropertyInfo(Variant::STRING, "hint")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_MULTILINE_TEXT, Variant::STRING>, varray(""), true);
register_annotation(MethodInfo("@export_placeholder", PropertyInfo(Variant::STRING, "placeholder")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_PLACEHOLDER_TEXT, Variant::STRING>); register_annotation(MethodInfo("@export_placeholder", PropertyInfo(Variant::STRING, "placeholder")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_PLACEHOLDER_TEXT, Variant::STRING>);
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<PROPERTY_HINT_RANGE, Variant::FLOAT>, varray(1.0, ""), true); 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<PROPERTY_HINT_RANGE, Variant::FLOAT>, varray(1.0, ""), true);
register_annotation(MethodInfo("@export_exp_easing", PropertyInfo(Variant::STRING, "hints")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_EXP_EASING, Variant::FLOAT>, varray(""), true); register_annotation(MethodInfo("@export_exp_easing", PropertyInfo(Variant::STRING, "hints")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_EXP_EASING, Variant::FLOAT>, varray(""), true);

View file

@ -2184,11 +2184,11 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "user_data_backup/allow"), false)); 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::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/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())); r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "permissions/custom_permissions"), PackedStringArray()));

View file

@ -200,10 +200,10 @@ void EditorExportPlatformLinuxBSD::get_export_options(List<ExportOption> *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/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/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_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), "")); 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), run_script)); 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), cleanup_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 { bool EditorExportPlatformLinuxBSD::is_elf(const String &p_path) const {

View file

@ -490,7 +490,7 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "shader_baker/enabled"), false)); 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")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "xcode/platform_build"), "14C18"));
// TODO(sgc): Need to set appropriate version when using Metal // TODO(sgc): Need to set appropriate version when using Metal
@ -539,7 +539,7 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *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_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::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::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())); r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray()));
#ifdef MACOS_ENABLED #ifdef MACOS_ENABLED
@ -609,10 +609,10 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *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/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/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_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), "")); 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), run_script)); 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), cleanup_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<uint8_t> &p_source, Vector<uint8_t> &p_dest) { void _rgba8_to_packbits_encode(int p_ch, int p_size, Vector<uint8_t> &p_source, Vector<uint8_t> &p_dest) {

View file

@ -375,7 +375,7 @@ void EditorExportPlatformWeb::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "html/export_icon"), true)); 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/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::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/focus_canvas_on_start"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "html/experimental_virtual_keyboard"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "html/experimental_virtual_keyboard"), false));

View file

@ -499,10 +499,10 @@ void EditorExportPlatformWindows::get_export_options(List<ExportOption> *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/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/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_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), "")); 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), run_script)); 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), cleanup_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<EditorExportPreset> &p_preset, const String &p_path, bool p_console_icon) { Error EditorExportPlatformWindows::_add_data(const Ref<EditorExportPreset> &p_preset, const String &p_path, bool p_console_icon) {