mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Use a different icon for the debugger tab with both warnings and errors
This makes it possible to see if both errors and warnings were
pushed without having to open the tab.
(cherry picked from commit 564f8ccc13
)
This commit is contained in:
parent
df87ae6eb8
commit
d7f1a43d1a
2 changed files with 8 additions and 4 deletions
|
@ -1326,12 +1326,15 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
|||
} else {
|
||||
errors_tab->set_name(TTR("Errors") + " (" + itos(error_count + warning_count) + ")");
|
||||
debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")");
|
||||
if (error_count == 0) {
|
||||
debugger_button->set_icon(get_icon("Warning", "EditorIcons"));
|
||||
tabs->set_tab_icon(errors_tab->get_index(), get_icon("Warning", "EditorIcons"));
|
||||
} else {
|
||||
if (error_count >= 1 && warning_count >= 1) {
|
||||
debugger_button->set_icon(get_icon("ErrorWarning", "EditorIcons"));
|
||||
tabs->set_tab_icon(errors_tab->get_index(), get_icon("ErrorWarning", "EditorIcons"));
|
||||
} else if (error_count >= 1) {
|
||||
debugger_button->set_icon(get_icon("Error", "EditorIcons"));
|
||||
tabs->set_tab_icon(errors_tab->get_index(), get_icon("Error", "EditorIcons"));
|
||||
} else {
|
||||
debugger_button->set_icon(get_icon("Warning", "EditorIcons"));
|
||||
tabs->set_tab_icon(errors_tab->get_index(), get_icon("Warning", "EditorIcons"));
|
||||
}
|
||||
}
|
||||
last_error_count = error_count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue