feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -35,6 +35,7 @@
#include "editor/gui/editor_run_bar.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/check_box.h"
#include "scene/gui/flow_container.h"
void EditorNetworkProfiler::_bind_methods() {
ADD_SIGNAL(MethodInfo("enable_profiling", PropertyInfo(Variant::BOOL, "enable")));
@ -297,30 +298,37 @@ bool EditorNetworkProfiler::is_profiling() {
}
EditorNetworkProfiler::EditorNetworkProfiler() {
HBoxContainer *hb = memnew(HBoxContainer);
hb->add_theme_constant_override("separation", 8 * EDSCALE);
add_child(hb);
FlowContainer *container = memnew(FlowContainer);
container->add_theme_constant_override(SNAME("h_separation"), 8 * EDSCALE);
container->add_theme_constant_override(SNAME("v_separation"), 2 * EDSCALE);
add_child(container);
activate = memnew(Button);
activate->set_toggle_mode(true);
activate->set_text(TTR("Start"));
activate->set_disabled(true);
activate->connect(SceneStringName(pressed), callable_mp(this, &EditorNetworkProfiler::_activate_pressed));
hb->add_child(activate);
container->add_child(activate);
clear_button = memnew(Button);
clear_button->set_text(TTR("Clear"));
clear_button->set_disabled(true);
clear_button->connect(SceneStringName(pressed), callable_mp(this, &EditorNetworkProfiler::_clear_pressed));
hb->add_child(clear_button);
container->add_child(clear_button);
CheckBox *autostart_checkbox = memnew(CheckBox);
autostart_checkbox->set_text(TTR("Autostart"));
autostart_checkbox->set_pressed(EditorSettings::get_singleton()->get_project_metadata("debug_options", "autostart_network_profiler", false));
autostart_checkbox->connect(SceneStringName(toggled), callable_mp(this, &EditorNetworkProfiler::_autostart_toggled));
hb->add_child(autostart_checkbox);
container->add_child(autostart_checkbox);
hb->add_spacer();
Control *c = memnew(Control);
c->set_h_size_flags(SIZE_EXPAND_FILL);
container->add_child(c);
HBoxContainer *hb = memnew(HBoxContainer);
hb->add_theme_constant_override(SNAME("separation"), 8 * EDSCALE);
container->add_child(hb);
Label *lb = memnew(Label);
// TRANSLATORS: This is the label for the network profiler's incoming bandwidth.
@ -331,6 +339,7 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
incoming_bandwidth_text->set_editable(false);
incoming_bandwidth_text->set_custom_minimum_size(Size2(120, 0) * EDSCALE);
incoming_bandwidth_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
incoming_bandwidth_text->set_accessibility_name(TTRC("Incoming Bandwidth"));
hb->add_child(incoming_bandwidth_text);
Control *down_up_spacer = memnew(Control);
@ -346,6 +355,7 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
outgoing_bandwidth_text->set_editable(false);
outgoing_bandwidth_text->set_custom_minimum_size(Size2(120, 0) * EDSCALE);
outgoing_bandwidth_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
outgoing_bandwidth_text->set_accessibility_name(TTRC("Outgoing Bandwidth"));
hb->add_child(outgoing_bandwidth_text);
// Set initial texts in the incoming/outgoing bandwidth labels
@ -359,7 +369,7 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
// RPC
counters_display = memnew(Tree);
counters_display->set_custom_minimum_size(Size2(320, 0) * EDSCALE);
counters_display->set_custom_minimum_size(Size2(280, 0) * EDSCALE);
counters_display->set_v_size_flags(SIZE_EXPAND_FILL);
counters_display->set_h_size_flags(SIZE_EXPAND_FILL);
counters_display->set_hide_folding(true);
@ -382,7 +392,7 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
// Replication
replication_display = memnew(Tree);
replication_display->set_custom_minimum_size(Size2(320, 0) * EDSCALE);
replication_display->set_custom_minimum_size(Size2(280, 0) * EDSCALE);
replication_display->set_v_size_flags(SIZE_EXPAND_FILL);
replication_display->set_h_size_flags(SIZE_EXPAND_FILL);
replication_display->set_hide_folding(true);

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef EDITOR_NETWORK_PROFILER_H
#define EDITOR_NETWORK_PROFILER_H
#pragma once
#include "../multiplayer_debugger.h"
@ -120,5 +119,3 @@ public:
EditorNetworkProfiler();
};
#endif // EDITOR_NETWORK_PROFILER_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef MULTIPLAYER_EDITOR_PLUGIN_H
#define MULTIPLAYER_EDITOR_PLUGIN_H
#pragma once
#include "editor/plugins/editor_debugger_plugin.h"
#include "editor/plugins/editor_plugin.h"
@ -51,8 +50,6 @@ public:
virtual bool has_capture(const String &p_capture) const override;
virtual bool capture(const String &p_message, const Array &p_data, int p_index) override;
virtual void setup_session(int p_session_id) override;
MultiplayerEditorDebugger() {}
};
class ReplicationEditor;
@ -80,5 +77,3 @@ public:
MultiplayerEditorPlugin();
};
#endif // MULTIPLAYER_EDITOR_PLUGIN_H

View file

@ -234,6 +234,7 @@ ReplicationEditor::ReplicationEditor() {
np_line_edit = memnew(LineEdit);
np_line_edit->set_placeholder(":property");
np_line_edit->set_accessibility_name(TTRC("Path"));
np_line_edit->set_h_size_flags(SIZE_EXPAND_FILL);
np_line_edit->connect(SceneStringName(text_submitted), callable_mp(this, &ReplicationEditor::_np_text_submitted));
hb->add_child(np_line_edit);
@ -251,6 +252,7 @@ ReplicationEditor::ReplicationEditor() {
pin->set_theme_type_variation(SceneStringName(FlatButton));
pin->set_toggle_mode(true);
pin->set_tooltip_text(TTR("Pin replication editor"));
pin->set_accessibility_name(TTRC("Pin"));
hb->add_child(pin);
tree = memnew(Tree);

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef REPLICATION_EDITOR_H
#define REPLICATION_EDITOR_H
#pragma once
#include "../scene_replication_config.h"
@ -102,7 +101,4 @@ public:
Button *get_pin() { return pin; }
ReplicationEditor();
~ReplicationEditor() {}
};
#endif // REPLICATION_EDITOR_H