summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_help.cpp1
-rw-r--r--editor/editor_plugin_settings.cpp88
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp1
-rw-r--r--editor/plugins/editor_preview_plugins.cpp1
-rw-r--r--scene/gui/viewport_container.cpp1
-rw-r--r--scene/main/http_request.cpp4
6 files changed, 57 insertions, 39 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 2e8f8ec646..e6df00b48c 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -54,6 +54,7 @@ void EditorHelp::_init_colors() {
qualifier_color = text_color * Color(1, 1, 1, 0.8);
type_color = get_color("accent_color", "Editor").linear_interpolate(text_color, 0.5);
class_desc->add_color_override("selection_color", get_color("accent_color", "Editor") * Color(1, 1, 1, 0.4));
+ class_desc->add_constant_override("line_separation", Math::round(5 * EDSCALE));
}
void EditorHelp::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 09577e39e1..514b3ff5d2 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -96,45 +96,59 @@ void EditorPluginSettings::update_plugins() {
if (err2 != OK) {
WARN_PRINTS("Can't load plugin config: " + path);
- } else if (!cf->has_section_key("plugin", "name")) {
- WARN_PRINTS("Plugin misses plugin/name: " + path);
- } else if (!cf->has_section_key("plugin", "author")) {
- WARN_PRINTS("Plugin misses plugin/author: " + path);
- } else if (!cf->has_section_key("plugin", "version")) {
- WARN_PRINTS("Plugin misses plugin/version: " + path);
- } else if (!cf->has_section_key("plugin", "description")) {
- WARN_PRINTS("Plugin misses plugin/description: " + path);
- } else if (!cf->has_section_key("plugin", "script")) {
- WARN_PRINTS("Plugin misses plugin/script: " + path);
} else {
+ bool key_missing = false;
- String d2 = plugins[i];
- String name = cf->get_value("plugin", "name");
- String author = cf->get_value("plugin", "author");
- String version = cf->get_value("plugin", "version");
- String description = cf->get_value("plugin", "description");
- String script = cf->get_value("plugin", "script");
-
- TreeItem *item = plugin_list->create_item(root);
- item->set_text(0, name);
- item->set_tooltip(0, "Name: " + name + "\nPath: " + path + "\nMain Script: " + script + "\nDescription: " + description);
- item->set_metadata(0, d2);
- item->set_text(1, version);
- item->set_metadata(1, script);
- item->set_text(2, author);
- item->set_metadata(2, description);
- item->set_cell_mode(3, TreeItem::CELL_MODE_RANGE);
- item->set_range_config(3, 0, 1, 1);
- item->set_text(3, "Inactive,Active");
- item->set_editable(3, true);
- item->add_button(4, get_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin"));
-
- if (EditorNode::get_singleton()->is_addon_plugin_enabled(d2)) {
- item->set_custom_color(3, get_color("success_color", "Editor"));
- item->set_range(3, 1);
- } else {
- item->set_custom_color(3, get_color("disabled_font_color", "Editor"));
- item->set_range(3, 0);
+ if (!cf->has_section_key("plugin", "name")) {
+ WARN_PRINTS("Plugin config misses \"plugin/name\" key: " + path);
+ key_missing = true;
+ }
+ if (!cf->has_section_key("plugin", "author")) {
+ WARN_PRINTS("Plugin config misses \"plugin/author\" key: " + path);
+ key_missing = true;
+ }
+ if (!cf->has_section_key("plugin", "version")) {
+ WARN_PRINTS("Plugin config misses \"plugin/version\" key: " + path);
+ key_missing = true;
+ }
+ if (!cf->has_section_key("plugin", "description")) {
+ WARN_PRINTS("Plugin config misses \"plugin/description\" key: " + path);
+ key_missing = true;
+ }
+ if (!cf->has_section_key("plugin", "script")) {
+ WARN_PRINTS("Plugin config misses \"plugin/script\" key: " + path);
+ key_missing = true;
+ }
+
+ if (!key_missing) {
+ String d2 = plugins[i];
+ String name = cf->get_value("plugin", "name");
+ String author = cf->get_value("plugin", "author");
+ String version = cf->get_value("plugin", "version");
+ String description = cf->get_value("plugin", "description");
+ String script = cf->get_value("plugin", "script");
+
+ TreeItem *item = plugin_list->create_item(root);
+ item->set_text(0, name);
+ item->set_tooltip(0, TTR("Name:") + " " + name + "\n" + TTR("Path:") + " " + path + "\n" + TTR("Main Script:") + " " + script + "\n" + TTR("Description:") + " " + description);
+ item->set_metadata(0, d2);
+ item->set_text(1, version);
+ item->set_metadata(1, script);
+ item->set_text(2, author);
+ item->set_metadata(2, description);
+ item->set_cell_mode(3, TreeItem::CELL_MODE_RANGE);
+ item->set_range_config(3, 0, 1, 1);
+ item->set_text(3, "Inactive,Active");
+ item->set_editable(3, true);
+ item->add_button(4, get_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin"));
+
+ if (EditorNode::get_singleton()->is_addon_plugin_enabled(d2)) {
+ item->set_custom_color(3, get_color("success_color", "Editor"));
+ item->set_range(3, 1);
+ } else {
+ item->set_custom_color(3, get_color("disabled_font_color", "Editor"));
+ item->set_range(3, 0);
+ }
}
}
}
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index cb68f5eaaf..894e5c7298 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -290,6 +290,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
desc_vbox->add_child(description);
description->set_v_size_flags(SIZE_EXPAND_FILL);
description->connect("meta_clicked", this, "_link_click");
+ description->add_constant_override("line_separation", Math::round(5 * EDSCALE));
VBoxContainer *previews_vbox = memnew(VBoxContainer);
hbox->add_child(previews_vbox);
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index c8ffc2744a..8acc41a2c7 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -624,6 +624,7 @@ Ref<Texture> EditorAudioStreamPreviewPlugin::generate(const RES &p_from, const S
uint8_t *imgw = imgdata.ptr();
Ref<AudioStreamPlayback> playback = stream->instance_playback();
+ ERR_FAIL_COND_V(playback.is_null(), Ref<Texture>());
float len_s = stream->get_length();
if (len_s == 0) {
diff --git a/scene/gui/viewport_container.cpp b/scene/gui/viewport_container.cpp
index 3f7a110c1b..35696a0459 100644
--- a/scene/gui/viewport_container.cpp
+++ b/scene/gui/viewport_container.cpp
@@ -211,4 +211,5 @@ ViewportContainer::ViewportContainer() {
stretch = false;
shrink = 1;
set_process_input(true);
+ set_process_unhandled_input(true);
}
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index e21e47f8a8..6c922adbd2 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -60,10 +60,10 @@ Error HTTPRequest::_parse_url(const String &p_url) {
use_ssl = true;
port = 443;
} else {
- ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Malformed URL.");
+ ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Malformed URL: " + url + ".");
}
- ERR_FAIL_COND_V_MSG(url.length() < 1, ERR_INVALID_PARAMETER, "URL too short.");
+ ERR_FAIL_COND_V_MSG(url.length() < 1, ERR_INVALID_PARAMETER, "URL too short: " + url + ".");
int slash_pos = url.find("/");