summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_audio_buses.cpp6
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp2
-rw-r--r--editor/plugins/animation_tree_player_editor_plugin.cpp14
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp5
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp4
5 files changed, 18 insertions, 13 deletions
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 365238222f..3f773c646a 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -1249,7 +1249,7 @@ void EditorAudioBuses::_load_default_layout() {
String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout");
- Ref<AudioBusLayout> state = ResourceLoader::load(layout_path);
+ Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", true);
if (state.is_null()) {
EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path));
return;
@@ -1266,7 +1266,7 @@ void EditorAudioBuses::_load_default_layout() {
void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
if (file_dialog->get_mode() == EditorFileDialog::MODE_OPEN_FILE) {
- Ref<AudioBusLayout> state = ResourceLoader::load(p_string);
+ Ref<AudioBusLayout> state = ResourceLoader::load(p_string, "", true);
if (state.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout."));
return;
@@ -1404,7 +1404,7 @@ void EditorAudioBuses::open_layout(const String &p_path) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
- Ref<AudioBusLayout> state = ResourceLoader::load(p_path);
+ Ref<AudioBusLayout> state = ResourceLoader::load(p_path, "", true);
if (state.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout."));
return;
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index def3f4bfec..2de224c043 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -147,7 +147,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
node->add_child(name);
node->set_slot(0, false, 0, Color(), true, 0, get_color("font_color", "Label"));
name->connect("text_entered", this, "_node_renamed", varray(agnode));
- name->connect("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode));
+ name->connect("focus_exited", this, "_node_renamed_focus_out", varray(name, agnode), CONNECT_DEFERRED);
base = 1;
node->set_show_close_button(true);
node->connect("close_request", this, "_delete_request", varray(E->get()), CONNECT_DEFERRED);
diff --git a/editor/plugins/animation_tree_player_editor_plugin.cpp b/editor/plugins/animation_tree_player_editor_plugin.cpp
index a85def5c6d..2b365feec5 100644
--- a/editor/plugins/animation_tree_player_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -34,6 +34,7 @@
#include "core/os/input.h"
#include "core/os/keyboard.h"
#include "core/project_settings.h"
+#include "editor/editor_scale.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/panel.h"
#include "scene/main/viewport.h"
@@ -923,17 +924,18 @@ void AnimationTreePlayerEditor::_notification(int p_what) {
_draw_cos_line(source, dest, col);
}
+ const Ref<Font> f = get_font("font", "Label");
+ const Point2 status_offset = Point2(5, 25) * EDSCALE + Point2(0, f->get_ascent());
+
switch (anim_tree->get_last_error()) {
case AnimationTreePlayer::CONNECT_OK: {
- Ref<Font> f = get_font("font", "Label");
- f->draw(get_canvas_item(), Point2(5, 25 + f->get_ascent()), TTR("Animation tree is valid."), Color(0, 1, 0.6, 0.8));
+ f->draw(get_canvas_item(), status_offset, TTR("Animation tree is valid."), Color(0, 1, 0.6, 0.8));
} break;
default: {
- Ref<Font> f = get_font("font", "Label");
- f->draw(get_canvas_item(), Point2(5, 25 + f->get_ascent()), TTR("Animation tree is invalid."), Color(1, 0.6, 0.0, 0.8));
+ f->draw(get_canvas_item(), status_offset, TTR("Animation tree is invalid."), Color(1, 0.6, 0.0, 0.8));
} break;
}
@@ -1300,7 +1302,7 @@ AnimationTreePlayerEditor::AnimationTreePlayerEditor() {
p->connect("id_pressed", this, "_add_menu_item");
play_button = memnew(Button);
- play_button->set_position(Point2(25, 0));
+ play_button->set_position(Point2(25, 0) * EDSCALE);
play_button->set_size(Point2(25, 15));
add_child(play_button);
play_button->set_toggle_mode(true);
@@ -1439,7 +1441,7 @@ AnimationTreePlayerEditorPlugin::AnimationTreePlayerEditorPlugin(EditorNode *p_n
editor = p_node;
anim_tree_editor = memnew(AnimationTreePlayerEditor);
- anim_tree_editor->set_custom_minimum_size(Size2(0, 300));
+ anim_tree_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE);
button = editor->add_bottom_panel_item(TTR("AnimationTree"), anim_tree_editor);
button->hide();
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index bdef108ef2..c1f62e8342 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -435,7 +435,10 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
String::humanize_size(download->get_body_size())));
} else {
// Total file size is unknown, so it cannot be displayed.
- status->set_text(TTR("Downloading..."));
+ progress->set_modulate(Color(0, 0, 0, 0));
+ status->set_text(vformat(
+ TTR("Downloading...") + " (%s)",
+ String::humanize_size(download->get_downloaded_bytes())));
}
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 437a6722d0..e1fafde6b9 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -4236,7 +4236,7 @@ void CanvasItemEditor::_button_zoom_minus() {
}
void CanvasItemEditor::_button_zoom_reset() {
- _zoom_on_position(1.0 * EDSCALE, viewport_scrollable->get_size() / 2.0);
+ _zoom_on_position(1.0 * MAX(1, EDSCALE), viewport_scrollable->get_size() / 2.0);
}
void CanvasItemEditor::_button_zoom_plus() {
@@ -5038,7 +5038,7 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) {
if (state.has("zoom")) {
// Compensate the editor scale, so that the editor scale can be changed
// and the zoom level will still be the same (relative to the editor scale).
- zoom = float(p_state["zoom"]) * EDSCALE;
+ zoom = float(p_state["zoom"]) * MAX(1, EDSCALE);
_update_zoom_label();
}