mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user