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

Method _notification

editor/editor_node.cpp:788–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

786}
787
788void EditorNode::_notification(int p_what) {
789 switch (p_what) {
790 case NOTIFICATION_TRANSLATION_CHANGED: {
791 _update_title();
792 callable_mp(this, &EditorNode::_titlebar_resized).call_deferred();
793 } break;
794
795 case NOTIFICATION_POSTINITIALIZE: {
796 EditorHelp::generate_doc();
797#if defined(MODULE_GDSCRIPT_ENABLED) || defined(MODULE_MONO_ENABLED)
798 EditorHelpHighlighter::create_singleton();
799#endif
800 } break;
801
802 case NOTIFICATION_PROCESS: {
803 if (editor_data.is_scene_changed(-1)) {
804 scene_tabs->update_scene_tabs();
805 }
806
807 // Update the animation frame of the update spinner.
808 uint64_t frame = Engine::get_singleton()->get_frames_drawn();
809 uint64_t tick = OS::get_singleton()->get_ticks_msec();
810
811 if (frame != update_spinner_step_frame && (tick - update_spinner_step_msec) > (1000 / 8)) {
812 update_spinner_step++;
813 if (update_spinner_step >= 8) {
814 update_spinner_step = 0;
815 }
816
817 update_spinner_step_msec = tick;
818 update_spinner_step_frame = frame + 1;
819
820 // Update the icon itself only when the spinner is visible.
821 if (_should_display_update_spinner()) {
822 update_spinner->set_button_icon(theme->get_icon("Progress" + itos(update_spinner_step + 1), EditorStringName(EditorIcons)));
823 }
824 }
825
826 editor_selection->update();
827
828 ResourceImporterTexture::get_singleton()->update_imports();
829
830 if (requested_first_scan) {
831 requested_first_scan = false;
832
833 OS::get_singleton()->benchmark_begin_measure("Editor", "First Scan");
834
835 EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorNode::_execute_upgrades), CONNECT_ONE_SHOT);
836 EditorFileSystem::get_singleton()->scan();
837 }
838
839 if (settings_overrides_changed) {
840 EditorSettings::get_singleton()->notify_changes();
841 EditorSettings::get_singleton()->emit_signal(SNAME("settings_changed"));
842 settings_overrides_changed = false;
843 }
844 } break;
845

Callers

nothing calls this directly

Calls 15

itosFunction · 0.85
TTRFunction · 0.85
is_scene_changedMethod · 0.80
update_scene_tabsMethod · 0.80
set_button_iconMethod · 0.80
update_importsMethod · 0.80
notify_changesMethod · 0.80
emit_signalMethod · 0.80

Tested by

no test coverage detected