feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -38,7 +38,6 @@
|
|||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "editor/themes/editor_scale.h"
|
||||
#include "scene/gui/center_container.h"
|
||||
#include "scene/gui/separator.h"
|
||||
#include "scene/resources/font.h"
|
||||
|
||||
|
|
@ -52,10 +51,6 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f
|
|||
err_str = String::utf8(p_file) + ":" + itos(p_line) + " - " + String::utf8(p_error);
|
||||
}
|
||||
|
||||
if (p_editor_notify) {
|
||||
err_str += " (User)";
|
||||
}
|
||||
|
||||
MessageType message_type = p_type == ERR_HANDLER_WARNING ? MSG_TYPE_WARNING : MSG_TYPE_ERROR;
|
||||
|
||||
if (!Thread::is_main_thread()) {
|
||||
|
|
@ -104,20 +99,20 @@ void EditorLog::_update_theme() {
|
|||
log->add_theme_font_size_override("mono_font_size", font_size);
|
||||
log->end_bulk_theme_override();
|
||||
|
||||
type_filter_map[MSG_TYPE_STD]->toggle_button->set_icon(get_editor_theme_icon(SNAME("Popup")));
|
||||
type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_icon(get_editor_theme_icon(SNAME("StatusError")));
|
||||
type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_icon(get_editor_theme_icon(SNAME("StatusWarning")));
|
||||
type_filter_map[MSG_TYPE_EDITOR]->toggle_button->set_icon(get_editor_theme_icon(SNAME("Edit")));
|
||||
type_filter_map[MSG_TYPE_STD]->toggle_button->set_button_icon(get_editor_theme_icon(SNAME("Popup")));
|
||||
type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_button_icon(get_editor_theme_icon(SNAME("StatusError")));
|
||||
type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_button_icon(get_editor_theme_icon(SNAME("StatusWarning")));
|
||||
type_filter_map[MSG_TYPE_EDITOR]->toggle_button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
|
||||
|
||||
type_filter_map[MSG_TYPE_STD]->toggle_button->set_theme_type_variation("EditorLogFilterButton");
|
||||
type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_theme_type_variation("EditorLogFilterButton");
|
||||
type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_theme_type_variation("EditorLogFilterButton");
|
||||
type_filter_map[MSG_TYPE_EDITOR]->toggle_button->set_theme_type_variation("EditorLogFilterButton");
|
||||
|
||||
clear_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
|
||||
copy_button->set_icon(get_editor_theme_icon(SNAME("ActionCopy")));
|
||||
collapse_button->set_icon(get_editor_theme_icon(SNAME("CombineLines")));
|
||||
show_search_button->set_icon(get_editor_theme_icon(SNAME("Search")));
|
||||
clear_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
|
||||
copy_button->set_button_icon(get_editor_theme_icon(SNAME("ActionCopy")));
|
||||
collapse_button->set_button_icon(get_editor_theme_icon(SNAME("CombineLines")));
|
||||
show_search_button->set_button_icon(get_editor_theme_icon(SNAME("Search")));
|
||||
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
|
||||
|
||||
theme_cache.error_color = get_theme_color(SNAME("error_color"), EditorStringName(Editor));
|
||||
|
|
@ -208,7 +203,7 @@ void EditorLog::_clear_request() {
|
|||
log->clear();
|
||||
messages.clear();
|
||||
_reset_message_counts();
|
||||
tool_button->set_icon(Ref<Texture2D>());
|
||||
tool_button->set_button_icon(Ref<Texture2D>());
|
||||
}
|
||||
|
||||
void EditorLog::_copy_request() {
|
||||
|
|
@ -362,15 +357,19 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
|
|||
log->push_color(theme_cache.error_color);
|
||||
Ref<Texture2D> icon = theme_cache.error_icon;
|
||||
log->add_image(icon);
|
||||
log->add_text(" ");
|
||||
tool_button->set_icon(icon);
|
||||
log->push_bold();
|
||||
log->add_text(" ERROR: ");
|
||||
log->pop(); // bold
|
||||
tool_button->set_button_icon(icon);
|
||||
} break;
|
||||
case MSG_TYPE_WARNING: {
|
||||
log->push_color(theme_cache.warning_color);
|
||||
Ref<Texture2D> icon = theme_cache.warning_icon;
|
||||
log->add_image(icon);
|
||||
log->add_text(" ");
|
||||
tool_button->set_icon(icon);
|
||||
log->push_bold();
|
||||
log->add_text(" WARNING: ");
|
||||
log->pop(); // bold
|
||||
tool_button->set_button_icon(icon);
|
||||
} break;
|
||||
case MSG_TYPE_EDITOR: {
|
||||
// Distinguish editor messages from messages printed by the project
|
||||
|
|
@ -398,9 +397,7 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
|
|||
if (p_replace_previous) {
|
||||
// Force sync last line update (skip if number of unprocessed log messages is too large to avoid editor lag).
|
||||
if (log->get_pending_paragraphs() < 100) {
|
||||
while (!log->is_ready()) {
|
||||
::OS::get_singleton()->delay_usec(1);
|
||||
}
|
||||
log->wait_until_finished();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -484,17 +481,17 @@ EditorLog::EditorLog() {
|
|||
|
||||
// Clear.
|
||||
clear_button = memnew(Button);
|
||||
clear_button->set_theme_type_variation("FlatButton");
|
||||
clear_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
clear_button->set_focus_mode(FOCUS_NONE);
|
||||
clear_button->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::ALT | Key::K));
|
||||
clear_button->set_shortcut(ED_SHORTCUT("editor/clear_output", TTRC("Clear Output"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::ALT | Key::K));
|
||||
clear_button->connect(SceneStringName(pressed), callable_mp(this, &EditorLog::_clear_request));
|
||||
hb_tools->add_child(clear_button);
|
||||
|
||||
// Copy.
|
||||
copy_button = memnew(Button);
|
||||
copy_button->set_theme_type_variation("FlatButton");
|
||||
copy_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
copy_button->set_focus_mode(FOCUS_NONE);
|
||||
copy_button->set_shortcut(ED_SHORTCUT("editor/copy_output", TTR("Copy Selection"), KeyModifierMask::CMD_OR_CTRL | Key::C));
|
||||
copy_button->set_shortcut(ED_SHORTCUT("editor/copy_output", TTRC("Copy Selection"), KeyModifierMask::CMD_OR_CTRL | Key::C));
|
||||
copy_button->set_shortcut_context(this);
|
||||
copy_button->connect(SceneStringName(pressed), callable_mp(this, &EditorLog::_copy_request));
|
||||
hb_tools->add_child(copy_button);
|
||||
|
|
@ -509,23 +506,23 @@ EditorLog::EditorLog() {
|
|||
|
||||
// Collapse.
|
||||
collapse_button = memnew(Button);
|
||||
collapse_button->set_theme_type_variation("FlatButton");
|
||||
collapse_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
collapse_button->set_focus_mode(FOCUS_NONE);
|
||||
collapse_button->set_tooltip_text(TTR("Collapse duplicate messages into one log entry. Shows number of occurrences."));
|
||||
collapse_button->set_toggle_mode(true);
|
||||
collapse_button->set_pressed(false);
|
||||
collapse_button->connect("toggled", callable_mp(this, &EditorLog::_set_collapse));
|
||||
collapse_button->connect(SceneStringName(toggled), callable_mp(this, &EditorLog::_set_collapse));
|
||||
hb_tools2->add_child(collapse_button);
|
||||
|
||||
// Show Search.
|
||||
show_search_button = memnew(Button);
|
||||
show_search_button->set_theme_type_variation("FlatButton");
|
||||
show_search_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
show_search_button->set_focus_mode(FOCUS_NONE);
|
||||
show_search_button->set_toggle_mode(true);
|
||||
show_search_button->set_pressed(true);
|
||||
show_search_button->set_shortcut(ED_SHORTCUT("editor/open_search", TTR("Focus Search/Filter Bar"), KeyModifierMask::CMD_OR_CTRL | Key::F));
|
||||
show_search_button->set_shortcut(ED_SHORTCUT("editor/open_search", TTRC("Focus Search/Filter Bar"), KeyModifierMask::CMD_OR_CTRL | Key::F));
|
||||
show_search_button->set_shortcut_context(this);
|
||||
show_search_button->connect("toggled", callable_mp(this, &EditorLog::_set_search_visible));
|
||||
show_search_button->connect(SceneStringName(toggled), callable_mp(this, &EditorLog::_set_search_visible));
|
||||
hb_tools2->add_child(show_search_button);
|
||||
|
||||
// Message Type Filters.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue