summaryrefslogtreecommitdiffstats
path: root/editor/editor_interface.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-04-12 21:02:28 +0200
committerYuri Sizov <yuris@humnom.net>2023-04-19 17:12:28 +0200
commit8a74d8438f5dee92927d953a7954ad3c3022cbd9 (patch)
tree96cce146518007954f44c79c359dda170bd32265 /editor/editor_interface.cpp
parent27253f3eb2c78a9ad5114c92eae2036b10e1d7e0 (diff)
downloadredot-engine-8a74d8438f5dee92927d953a7954ad3c3022cbd9.tar.gz
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.
Diffstat (limited to 'editor/editor_interface.cpp')
-rw-r--r--editor/editor_interface.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/editor/editor_interface.cpp b/editor/editor_interface.cpp
index 99803fd82d..167a5a3dba 100644
--- a/editor/editor_interface.cpp
+++ b/editor/editor_interface.cpp
@@ -37,6 +37,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/filesystem_dock.h"
+#include "editor/gui/editor_run_bar.h"
#include "editor/inspector_dock.h"
#include "main/main.h"
#include "scene/gui/box_container.h"
@@ -317,35 +318,35 @@ void EditorInterface::save_scene_as(const String &p_scene, bool p_with_preview)
// Scene playback.
void EditorInterface::play_main_scene() {
- EditorNode::get_singleton()->run_play();
+ EditorRunBar::get_singleton()->play_main_scene();
}
void EditorInterface::play_current_scene() {
- EditorNode::get_singleton()->run_play_current();
+ EditorRunBar::get_singleton()->play_current_scene();
}
void EditorInterface::play_custom_scene(const String &scene_path) {
- EditorNode::get_singleton()->run_play_custom(scene_path);
+ EditorRunBar::get_singleton()->play_custom_scene(scene_path);
}
void EditorInterface::stop_playing_scene() {
- EditorNode::get_singleton()->run_stop();
+ EditorRunBar::get_singleton()->stop_playing();
}
bool EditorInterface::is_playing_scene() const {
- return EditorNode::get_singleton()->is_run_playing();
+ return EditorRunBar::get_singleton()->is_playing();
}
String EditorInterface::get_playing_scene() const {
- return EditorNode::get_singleton()->get_run_playing_scene();
+ return EditorRunBar::get_singleton()->get_playing_scene();
}
void EditorInterface::set_movie_maker_enabled(bool p_enabled) {
- EditorNode::get_singleton()->set_movie_maker_enabled(p_enabled);
+ EditorRunBar::get_singleton()->set_movie_maker_enabled(p_enabled);
}
bool EditorInterface::is_movie_maker_enabled() const {
- return EditorNode::get_singleton()->is_movie_maker_enabled();
+ return EditorRunBar::get_singleton()->is_movie_maker_enabled();
}
// Base.