MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / update_tabs

Method update_tabs

editor/debugger/script_editor_debugger.cpp:155–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void ScriptEditorDebugger::update_tabs() {
156 if (error_count == 0 && warning_count == 0) {
157 errors_tab->set_name(TTR("Errors"));
158 tabs->set_tab_icon(tabs->get_tab_idx_from_control(errors_tab), Ref<Texture2D>());
159 } else {
160 errors_tab->set_name(TTR("Errors") + " (" + itos(error_count + warning_count) + ")");
161 if (error_count >= 1 && warning_count >= 1) {
162 tabs->set_tab_icon(tabs->get_tab_idx_from_control(errors_tab), get_editor_theme_icon(SNAME("ErrorWarning")));
163 } else if (error_count >= 1) {
164 tabs->set_tab_icon(tabs->get_tab_idx_from_control(errors_tab), get_editor_theme_icon(SNAME("Error")));
165 } else {
166 tabs->set_tab_icon(tabs->get_tab_idx_from_control(errors_tab), get_editor_theme_icon(SNAME("Warning")));
167 }
168 }
169}
170
171void ScriptEditorDebugger::clear_style() {
172 tabs->remove_theme_style_override(SceneStringName(panel));

Callers 1

_update_errorsMethod · 0.80

Calls 5

TTRFunction · 0.85
itosFunction · 0.85
set_nameMethod · 0.45
set_tab_iconMethod · 0.45

Tested by

no test coverage detected