feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -30,6 +30,10 @@
|
|||
|
||||
#include "editor_debugger_node.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "core/object/undo_redo.h"
|
||||
#include "editor/debugger/editor_debugger_plugin.h"
|
||||
#include "editor/debugger/editor_debugger_tree.h"
|
||||
|
|
@ -49,6 +53,7 @@
|
|||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/tab_container.h"
|
||||
#include "scene/resources/packed_scene.h"
|
||||
#include "servers/display/display_server.h"
|
||||
|
||||
template <typename Func>
|
||||
void _for_all(TabContainer *p_node, const Func &p_func) {
|
||||
|
|
@ -67,9 +72,7 @@ EditorDebuggerNode::EditorDebuggerNode() {
|
|||
set_layout_key("Debugger");
|
||||
set_dock_shortcut(ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_debugger_bottom_panel", TTRC("Toggle Debugger Dock"), KeyModifierMask::ALT | Key::D));
|
||||
set_default_slot(EditorDock::DOCK_SLOT_BOTTOM);
|
||||
set_available_layouts(EditorDock::DOCK_LAYOUT_HORIZONTAL);
|
||||
set_global(false);
|
||||
set_transient(true);
|
||||
set_available_layouts(EditorDock::DOCK_LAYOUT_HORIZONTAL | EditorDock::DOCK_LAYOUT_FLOATING);
|
||||
|
||||
_update_margins();
|
||||
|
||||
|
|
@ -164,7 +167,7 @@ void EditorDebuggerNode::_stack_frame_selected(int p_debugger) {
|
|||
void EditorDebuggerNode::_error_selected(const String &p_file, int p_line, int p_debugger) {
|
||||
if (!p_file.is_resource_file() && !ResourceCache::has(p_file)) {
|
||||
// If it's a built-in script, make sure the scene is opened first.
|
||||
EditorNode::get_singleton()->load_scene(p_file.get_slice("::", 0));
|
||||
EditorNode::get_singleton()->open_scene(p_file.get_slice("::", 0));
|
||||
}
|
||||
Ref<Script> s = ResourceLoader::load(p_file);
|
||||
emit_signal(SNAME("goto_script_line"), s, p_line - 1);
|
||||
|
|
@ -233,6 +236,12 @@ void EditorDebuggerNode::_bind_methods() {
|
|||
ADD_SIGNAL(MethodInfo("breakpoints_cleared_in_tree", PropertyInfo(Variant::INT, "debugger")));
|
||||
}
|
||||
|
||||
void EditorDebuggerNode::update_layout(EditorDock::DockLayout p_layout, int p_slot) {
|
||||
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
|
||||
dbg->update_layout(p_layout, p_slot);
|
||||
});
|
||||
}
|
||||
|
||||
void EditorDebuggerNode::register_undo_redo(UndoRedo *p_undo_redo) {
|
||||
p_undo_redo->set_method_notify_callback(_methods_changed, this);
|
||||
p_undo_redo->set_property_notify_callback(_properties_changed, this);
|
||||
|
|
@ -308,6 +317,17 @@ void EditorDebuggerNode::stop(bool p_force) {
|
|||
inspect_edited_object_wait = false;
|
||||
|
||||
current_uri.clear();
|
||||
// Also close all debugging sessions.
|
||||
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
|
||||
// If the server is also still active, let the debugger notify that it stopped.
|
||||
// Otherwise, just stop it silently.
|
||||
if (server.is_valid() || dbg->is_session_active()) {
|
||||
dbg->_stop_and_notify();
|
||||
} else {
|
||||
dbg->stop();
|
||||
}
|
||||
});
|
||||
|
||||
if (server.is_valid()) {
|
||||
server->stop();
|
||||
EditorNode::get_log()->add_message("--- Debugging process stopped ---", EditorLog::MSG_TYPE_EDITOR);
|
||||
|
|
@ -320,12 +340,6 @@ void EditorDebuggerNode::stop(bool p_force) {
|
|||
server.unref();
|
||||
}
|
||||
|
||||
// Also close all debugging sessions.
|
||||
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
|
||||
if (dbg->is_session_active()) {
|
||||
dbg->_stop_and_notify();
|
||||
}
|
||||
});
|
||||
_break_state_changed();
|
||||
breakpoints.clear();
|
||||
EditorUndoRedoManager::get_singleton()->clear_history(EditorUndoRedoManager::REMOTE_HISTORY, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue