Extract editor run toolbar into its own component

- Simplify and update its logic.
- Simplify EditorScript.
- Improve EditorNode and other relevant includes.
- Fix scene-based path in the movie writer when
reloading a scene.
This commit is contained in:
Yuri Sizov
2023-04-12 21:02:28 +02:00
parent 27253f3eb2
commit 8a74d8438f
37 changed files with 771 additions and 538 deletions

View File

@@ -33,6 +33,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/export/editor_export.h"
#include "editor/export/editor_export_platform.h"
void EditorRunNative::_notification(int p_what) {
@@ -77,7 +78,7 @@ void EditorRunNative::_notification(int p_what) {
}
}
Error EditorRunNative::run_native(int p_id) {
Error EditorRunNative::start_run_native(int p_id) {
if (p_id < 0) {
return OK;
}
@@ -142,7 +143,7 @@ Error EditorRunNative::run_native(int p_id) {
}
void EditorRunNative::resume_run_native() {
run_native(resume_id);
start_run_native(resume_id);
}
void EditorRunNative::_bind_methods() {
@@ -155,7 +156,7 @@ bool EditorRunNative::is_deploy_debug_remote_enabled() const {
EditorRunNative::EditorRunNative() {
remote_debug = memnew(MenuButton);
remote_debug->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::run_native));
remote_debug->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::start_run_native));
remote_debug->set_tooltip_text(TTR("Remote Debug"));
remote_debug->set_disabled(true);