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

Method _notification

editor/debugger/script_editor_debugger.cpp:1051–1168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1049}
1050
1051void ScriptEditorDebugger::_notification(int p_what) {
1052 switch (p_what) {
1053 case NOTIFICATION_ENTER_TREE: {
1054 le_set->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_live_edit_set));
1055 le_clear->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::_live_edit_clear));
1056 error_tree->connect(SceneStringName(item_selected), callable_mp(this, &ScriptEditorDebugger::_error_selected));
1057 error_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_error_activated));
1058 breakpoints_tree->connect("item_activated", callable_mp(this, &ScriptEditorDebugger::_breakpoint_tree_clicked));
1059 connect("started", callable_mp(expression_evaluator, &EditorExpressionEvaluator::on_start));
1060 } break;
1061
1062 case NOTIFICATION_THEME_CHANGED: {
1063 tabs->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
1064
1065 skip_breakpoints->set_button_icon(get_editor_theme_icon(skip_breakpoints_value ? SNAME("DebugSkipBreakpointsOn") : SNAME("DebugSkipBreakpointsOff")));
1066 ignore_error_breaks->set_button_icon(get_editor_theme_icon(ignore_error_breaks_value ? SNAME("NotificationDisabled") : SNAME("Notification")));
1067 ignore_error_breaks->add_theme_color_override("icon_normal_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
1068 ignore_error_breaks->add_theme_color_override("icon_hover_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
1069 ignore_error_breaks->add_theme_color_override("icon_pressed_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
1070 ignore_error_breaks->add_theme_color_override("icon_focus_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
1071 copy->set_button_icon(get_editor_theme_icon(SNAME("ActionCopy")));
1072 step->set_button_icon(get_editor_theme_icon(SNAME("DebugStep")));
1073 next->set_button_icon(get_editor_theme_icon(SNAME("DebugNext")));
1074 dobreak->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
1075 docontinue->set_button_icon(get_editor_theme_icon(SNAME("DebugContinue")));
1076 vmem_notice_icon->set_texture(get_editor_theme_icon(SNAME("NodeInfo")));
1077 vmem_refresh->set_button_icon(get_editor_theme_icon(SNAME("Reload")));
1078 vmem_export->set_button_icon(get_editor_theme_icon(SNAME("Save")));
1079 search->set_right_icon(get_editor_theme_icon(SNAME("Search")));
1080
1081 reason->add_theme_color_override(SNAME("default_color"), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
1082 reason->add_theme_style_override(SNAME("normal"), get_theme_stylebox(SNAME("normal"), SNAME("Label"))); // Empty stylebox.
1083
1084 TreeItem *error_root = error_tree->get_root();
1085 if (error_root) {
1086 TreeItem *error = error_root->get_first_child();
1087 while (error) {
1088 if (error->has_meta("_is_warning")) {
1089 error->set_icon(0, get_editor_theme_icon(SNAME("Warning")));
1090 error->set_custom_color(0, get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
1091 error->set_custom_color(1, get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
1092 } else if (error->has_meta("_is_error")) {
1093 error->set_icon(0, get_editor_theme_icon(SNAME("Error")));
1094 error->set_custom_color(0, get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
1095 error->set_custom_color(1, get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
1096 }
1097
1098 error = error->get_next();
1099 }
1100 }
1101 } break;
1102
1103 case NOTIFICATION_PROCESS: {
1104 if (is_session_active()) {
1105 peer->poll();
1106
1107 if (camera_override == CameraOverride::OVERRIDE_EDITORS) {
1108 // CanvasItem Editor

Callers

nothing calls this directly

Calls 15

set_button_iconMethod · 0.80
set_right_iconMethod · 0.80
get_first_childMethod · 0.80
set_custom_colorMethod · 0.80
connectMethod · 0.65
sizeMethod · 0.65
ArrayClass · 0.50
set_textureMethod · 0.45
get_rootMethod · 0.45

Tested by

no test coverage detected