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

Method _session_started

editor/run/game_view_plugin.cpp:64–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62#include "scene/gui/separator.h"
63
64void GameViewDebugger::_session_started(Ref<EditorDebuggerSession> p_session) {
65 if (!is_feature_enabled) {
66 return;
67 }
68
69 Dictionary settings;
70 settings["debugger/max_node_selection"] = EDITOR_GET("debugger/max_node_selection");
71 settings["editors/panning/2d_editor_panning_scheme"] = EDITOR_GET("editors/panning/2d_editor_panning_scheme");
72 settings["editors/panning/simple_panning"] = EDITOR_GET("editors/panning/simple_panning");
73 settings["editors/panning/warped_mouse_panning"] = EDITOR_GET("editors/panning/warped_mouse_panning");
74 settings["editors/panning/2d_editor_pan_speed"] = EDITOR_GET("editors/panning/2d_editor_pan_speed");
75 settings["editors/polygon_editor/point_grab_radius"] = EDITOR_GET("editors/polygon_editor/point_grab_radius");
76 settings["canvas_item_editor/pan_view"] = DebuggerMarshalls::serialize_key_shortcut(ED_GET_SHORTCUT("canvas_item_editor/pan_view"));
77 settings["box_selection_fill_color"] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("box_selection_fill_color"), EditorStringName(Editor));
78 settings["box_selection_stroke_color"] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("box_selection_stroke_color"), EditorStringName(Editor));
79 settings["editors/3d/default_fov"] = EDITOR_GET("editors/3d/default_fov");
80 settings["editors/3d/default_z_near"] = EDITOR_GET("editors/3d/default_z_near");
81 settings["editors/3d/default_z_far"] = EDITOR_GET("editors/3d/default_z_far");
82 settings["editors/3d/navigation/invert_x_axis"] = EDITOR_GET("editors/3d/navigation/invert_x_axis");
83 settings["editors/3d/navigation/invert_y_axis"] = EDITOR_GET("editors/3d/navigation/invert_y_axis");
84 settings["editors/3d/navigation/warped_mouse_panning"] = EDITOR_GET("editors/3d/navigation/warped_mouse_panning");
85 settings["editors/3d/freelook/freelook_base_speed"] = EDITOR_GET("editors/3d/freelook/freelook_base_speed");
86 settings["editors/3d/freelook/freelook_sensitivity"] = EDITOR_GET("editors/3d/freelook/freelook_sensitivity");
87 settings["editors/3d/navigation_feel/orbit_sensitivity"] = EDITOR_GET("editors/3d/navigation_feel/orbit_sensitivity");
88 settings["editors/3d/navigation_feel/translation_sensitivity"] = EDITOR_GET("editors/3d/navigation_feel/translation_sensitivity");
89 settings["editors/3d/selection_box_color"] = EDITOR_GET("editors/3d/selection_box_color");
90 settings["editors/3d/freelook/freelook_base_speed"] = EDITOR_GET("editors/3d/freelook/freelook_base_speed");
91
92 Array setup_data;
93 setup_data.append(settings);
94 p_session->send_message("scene:runtime_node_select_setup", setup_data);
95
96 Array type;
97 type.append(node_type);
98 p_session->send_message("scene:runtime_node_select_set_type", type);
99 Array visible;
100 visible.append(selection_visible);
101 p_session->send_message("scene:runtime_node_select_set_visible", visible);
102 Array mode;
103 mode.append(select_mode);
104 p_session->send_message("scene:runtime_node_select_set_mode", mode);
105 Array mute_audio_data;
106 mute_audio_data.append(mute_audio);
107 p_session->send_message("scene:debug_mute_audio", mute_audio_data);
108
109 Dictionary shortcut_settings;
110 shortcut_settings["editor/suspend_resume_embedded_project"] = DebuggerMarshalls::serialize_key_shortcut(ED_GET_SHORTCUT("editor/suspend_resume_embedded_project"));
111 shortcut_settings["editor/next_frame_embedded_project"] = DebuggerMarshalls::serialize_key_shortcut(ED_GET_SHORTCUT("editor/next_frame_embedded_project"));
112
113 p_session->send_message("scene:setup_embedded_shortcuts", { shortcut_settings });
114
115 emit_signal(SNAME("session_started"));
116}
117
118void GameViewDebugger::_session_stopped() {
119 if (!is_feature_enabled) {

Callers

nothing calls this directly

Calls 5

ED_GET_SHORTCUTFunction · 0.85
get_colorMethod · 0.45
get_editor_themeMethod · 0.45
appendMethod · 0.45
send_messageMethod · 0.45

Tested by

no test coverage detected