summaryrefslogtreecommitdiff
path: root/editor/editor_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r--editor/editor_settings.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index a32b736851..5d5bb1242d 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -49,11 +49,11 @@
#include "editor/editor_translations.gen.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
-#include "scene/main/viewport.h"
+#include "scene/main/window.h"
// PRIVATE METHODS
-Ref<EditorSettings> EditorSettings::singleton = NULL;
+Ref<EditorSettings> EditorSettings::singleton = nullptr;
// Properties
@@ -177,7 +177,7 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
_THREAD_SAFE_METHOD_
- const String *k = NULL;
+ const String *k = nullptr;
Set<_EVCSort> vclist;
while ((k = props.next(k))) {
@@ -341,6 +341,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/separate_distraction_mode", false);
_initial_set("interface/editor/automatically_open_screenshots", true);
+ _initial_set("interface/editor/single_window_mode", false);
+ hints["interface/editor/single_window_mode"] = PropertyInfo(Variant::BOOL, "interface/editor/single_window_mode", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/hide_console_window", false);
_initial_set("interface/editor/save_each_scene_on_quit", true); // Regression
_initial_set("interface/editor/quit_confirmation", true);
@@ -599,7 +601,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("run/window_placement/rect", 1);
hints["run/window_placement/rect"] = PropertyInfo(Variant::INT, "run/window_placement/rect", PROPERTY_HINT_ENUM, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen");
String screen_hints = "Same as Editor,Previous Monitor,Next Monitor";
- for (int i = 0; i < OS::get_singleton()->get_screen_count(); i++) {
+ for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) {
screen_hints += ",Monitor " + itos(i + 1);
}
_initial_set("run/window_placement/rect_custom_position", Vector2());
@@ -778,7 +780,7 @@ void EditorSettings::create() {
if (singleton.ptr())
return; //pointless
- DirAccess *dir = NULL;
+ DirAccess *dir = nullptr;
String data_path;
String data_dir;
@@ -1524,7 +1526,7 @@ void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) {
Ref<ShortCut> ED_GET_SHORTCUT(const String &p_path) {
if (!EditorSettings::get_singleton()) {
- return NULL;
+ return nullptr;
}
Ref<ShortCut> sc = EditorSettings::get_singleton()->get_shortcut(p_path);