feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -47,9 +47,9 @@
|
|||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
#ifndef XR_DISABLED
|
||||
#include "servers/xr_server.h"
|
||||
#endif // _3D_DISABLED
|
||||
#endif // XR_DISABLED
|
||||
|
||||
EditorRunBar *EditorRunBar::singleton = nullptr;
|
||||
|
||||
|
|
@ -218,6 +218,10 @@ void EditorRunBar::_run_scene(const String &p_scene_path, const Vector<String> &
|
|||
return;
|
||||
}
|
||||
|
||||
if (!EditorNode::get_singleton()->validate_custom_directory()) {
|
||||
return;
|
||||
}
|
||||
|
||||
_reset_play_buttons();
|
||||
|
||||
String write_movie_file;
|
||||
|
|
@ -255,7 +259,7 @@ void EditorRunBar::_run_scene(const String &p_scene_path, const Vector<String> &
|
|||
String run_filename;
|
||||
switch (current_mode) {
|
||||
case RUN_CUSTOM: {
|
||||
run_filename = p_scene_path;
|
||||
run_filename = ResourceUID::ensure_path(p_scene_path);
|
||||
run_custom_filename = run_filename;
|
||||
} break;
|
||||
|
||||
|
|
@ -530,6 +534,7 @@ EditorRunBar::EditorRunBar() {
|
|||
recovery_mode_reload_button->set_theme_type_variation("RunBarButton");
|
||||
recovery_mode_reload_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
recovery_mode_reload_button->set_tooltip_text(TTR("Disable recovery mode and reload the project."));
|
||||
recovery_mode_reload_button->set_accessibility_name(TTRC("Disable Recovery Mode"));
|
||||
recovery_mode_reload_button->connect(SceneStringName(pressed), callable_mp(this, &EditorRunBar::recovery_mode_reload_project));
|
||||
|
||||
recovery_mode_panel = memnew(PanelContainer);
|
||||
|
|
@ -552,6 +557,7 @@ EditorRunBar::EditorRunBar() {
|
|||
play_button->set_toggle_mode(true);
|
||||
play_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
play_button->set_tooltip_text(TTRC("Run the project's default scene."));
|
||||
play_button->set_accessibility_name(TTRC("Run Default Scene"));
|
||||
play_button->connect(SceneStringName(pressed), callable_mp(this, &EditorRunBar::play_main_scene).bind(false));
|
||||
|
||||
ED_SHORTCUT_AND_COMMAND("editor/run_project", TTRC("Run Project"), Key::F5);
|
||||
|
|
@ -564,6 +570,7 @@ EditorRunBar::EditorRunBar() {
|
|||
pause_button->set_toggle_mode(true);
|
||||
pause_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
pause_button->set_tooltip_text(TTRC("Pause the running project's execution for debugging."));
|
||||
pause_button->set_accessibility_name(TTRC("Pause"));
|
||||
pause_button->set_disabled(true);
|
||||
|
||||
ED_SHORTCUT("editor/pause_running_project", TTRC("Pause Running Project"), Key::F7);
|
||||
|
|
@ -575,6 +582,7 @@ EditorRunBar::EditorRunBar() {
|
|||
stop_button->set_theme_type_variation("RunBarButton");
|
||||
stop_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
stop_button->set_tooltip_text(TTRC("Stop the currently running project."));
|
||||
stop_button->set_accessibility_name(TTRC("Stop"));
|
||||
stop_button->set_disabled(true);
|
||||
stop_button->connect(SceneStringName(pressed), callable_mp(this, &EditorRunBar::stop_playing));
|
||||
|
||||
|
|
@ -587,7 +595,7 @@ EditorRunBar::EditorRunBar() {
|
|||
run_native->connect("native_run", callable_mp(this, &EditorRunBar::_run_native));
|
||||
|
||||
bool add_play_xr_mode_options = false;
|
||||
#ifndef _3D_DISABLED
|
||||
#ifndef XR_DISABLED
|
||||
if (OS::get_singleton()->has_feature("xr_editor") &&
|
||||
(XRServer::get_xr_mode() == XRServer::XRMODE_ON ||
|
||||
(XRServer::get_xr_mode() == XRServer::XRMODE_DEFAULT && GLOBAL_GET("xr/openxr/enabled")))) {
|
||||
|
|
@ -596,7 +604,7 @@ EditorRunBar::EditorRunBar() {
|
|||
// either regular mode or XR mode.
|
||||
add_play_xr_mode_options = true;
|
||||
}
|
||||
#endif // _3D_DISABLED
|
||||
#endif // XR_DISABLED
|
||||
|
||||
if (add_play_xr_mode_options) {
|
||||
MenuButton *menu_button = memnew(MenuButton);
|
||||
|
|
@ -614,6 +622,7 @@ EditorRunBar::EditorRunBar() {
|
|||
play_scene_button->set_theme_type_variation("RunBarButton");
|
||||
play_scene_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
play_scene_button->set_tooltip_text(TTRC("Run the currently edited scene."));
|
||||
play_scene_button->set_accessibility_name(TTRC("Run Edited Scene"));
|
||||
|
||||
ED_SHORTCUT_AND_COMMAND("editor/run_current_scene", TTRC("Run Current Scene"), Key::F6);
|
||||
ED_SHORTCUT_OVERRIDE("editor/run_current_scene", "macos", KeyModifierMask::META | Key::R);
|
||||
|
|
@ -635,6 +644,7 @@ EditorRunBar::EditorRunBar() {
|
|||
play_custom_scene_button->set_theme_type_variation("RunBarButton");
|
||||
play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
play_custom_scene_button->set_tooltip_text(TTRC("Run a specific scene."));
|
||||
play_custom_scene_button->set_accessibility_name(TTRC("Run Specific Scene"));
|
||||
|
||||
ED_SHORTCUT_AND_COMMAND("editor/run_specific_scene", TTRC("Run Specific Scene"), KeyModifierMask::CTRL | KeyModifierMask::SHIFT | Key::F5);
|
||||
ED_SHORTCUT_OVERRIDE("editor/run_specific_scene", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::R);
|
||||
|
|
@ -650,5 +660,6 @@ EditorRunBar::EditorRunBar() {
|
|||
write_movie_button->set_pressed(false);
|
||||
write_movie_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
write_movie_button->set_tooltip_text(TTR("Enable Movie Maker mode.\nThe project will run at stable FPS and the visual and audio output will be recorded to a video file."));
|
||||
write_movie_button->set_accessibility_name(TTRC("Enable Movie Maker Mode"));
|
||||
write_movie_button->connect(SceneStringName(toggled), callable_mp(this, &EditorRunBar::_write_movie_toggled));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue