diff options
Diffstat (limited to 'editor/script_editor_debugger.cpp')
-rw-r--r-- | editor/script_editor_debugger.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index afbd8832f2..71a946b256 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -35,9 +35,11 @@ #include "core/ustring.h" #include "editor/plugins/canvas_item_editor_plugin.h" #include "editor/plugins/spatial_editor_plugin.h" +#include "editor_log.h" #include "editor_network_profiler.h" #include "editor_node.h" #include "editor_profiler.h" +#include "editor_scale.h" #include "editor_settings.h" #include "main/performance.h" #include "property_editor.h" @@ -492,7 +494,7 @@ void ScriptEditorDebugger::_video_mem_request() { Size2 ScriptEditorDebugger::get_minimum_size() const { - Size2 ms = Control::get_minimum_size(); + Size2 ms = MarginContainer::get_minimum_size(); ms.y = MAX(ms.y, 250 * EDSCALE); return ms; } @@ -846,7 +848,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da time_vals.push_back(err[2]); time_vals.push_back(err[3]); bool e; - String time = String("%d:%02d:%02d:%04d").sprintf(time_vals, &e); + String time = String("%d:%02d:%02d.%03d").sprintf(time_vals, &e); // Rest of the error data. String method = err[4]; @@ -1426,11 +1428,12 @@ void ScriptEditorDebugger::_notification(int p_what) { } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT)); + add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); + tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles")); tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles")); tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles")); - tabs->set_margin(MARGIN_LEFT, -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT)); - tabs->set_margin(MARGIN_RIGHT, EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); copy->set_icon(get_icon("ActionCopy", "EditorIcons")); step->set_icon(get_icon("DebugStep", "EditorIcons")); @@ -2242,8 +2245,11 @@ void ScriptEditorDebugger::_bind_methods() { ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { + add_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT)); + add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); + ppeer = Ref<PacketPeerStream>(memnew(PacketPeerStream)); - ppeer->set_input_buffer_max_size(1024 * 1024 * 8); //8mb should be enough + ppeer->set_input_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be enough, minus 4 bytes for separator. editor = p_editor; editor->get_inspector()->connect("object_id_selected", this, "_scene_tree_property_select_object"); @@ -2253,9 +2259,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles")); tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles")); - tabs->set_anchors_and_margins_preset(Control::PRESET_WIDE); - tabs->set_margin(MARGIN_LEFT, -editor->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT)); - tabs->set_margin(MARGIN_RIGHT, editor->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); add_child(tabs); { //debugger @@ -2600,6 +2603,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { p_editor->get_undo_redo()->set_method_notify_callback(_method_changeds, this); p_editor->get_undo_redo()->set_property_notify_callback(_property_changeds, this); live_debug = true; + camera_override = OVERRIDE_NONE; last_path_id = false; error_count = 0; warning_count = 0; |