diff options
author | kobewi <kobewi4e@gmail.com> | 2023-12-02 18:55:27 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2024-04-26 14:44:38 +0200 |
commit | 3ebb5b84a0053c4a2ba560ac06dc9f1fe57769b8 (patch) | |
tree | 577434f2f4183cc44e1597c1cde29b7b3542806a /core | |
parent | 86bf8354a06ab7b23a0ff6a81b48fd015e92ac94 (diff) | |
download | redot-engine-3ebb5b84a0053c4a2ba560ac06dc9f1fe57769b8.tar.gz |
Add separate feature tags for editor runtime
Diffstat (limited to 'core')
-rw-r--r-- | core/config/project_settings.cpp | 8 | ||||
-rw-r--r-- | core/os/os.cpp | 5 | ||||
-rw-r--r-- | core/os/os.h | 1 |
3 files changed, 13 insertions, 1 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 104b17961d..c1fb536316 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1473,7 +1473,9 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF(PropertyInfo(Variant::INT, "display/window/size/window_height_override", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"), 0); // 8K resolution GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true); - GLOBAL_DEF("display/window/energy_saving/keep_screen_on.editor", false); +#ifdef TOOLS_ENABLED + GLOBAL_DEF("display/window/energy_saving/keep_screen_on.editor_hint", false); +#endif GLOBAL_DEF("animation/warnings/check_invalid_track_paths", true); GLOBAL_DEF("animation/warnings/check_angle_interpolation_type_conflicting", true); @@ -1531,6 +1533,10 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF_BASIC("internationalization/rendering/root_node_auto_translate", true); GLOBAL_DEF(PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 2000); + GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"), 0.5); +#ifdef TOOLS_ENABLED + GLOBAL_DEF("gui/timers/tooltip_delay_sec.editor_hint", 0.5); +#endif GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true); GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true); diff --git a/core/os/os.cpp b/core/os/os.cpp index 8582888740..fa7f23ded0 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -398,6 +398,11 @@ bool OS::has_feature(const String &p_feature) { if (p_feature == "editor") { return true; } + if (p_feature == "editor_hint") { + return _in_editor; + } else if (p_feature == "editor_runtime") { + return !_in_editor; + } #else if (p_feature == "template") { return true; diff --git a/core/os/os.h b/core/os/os.h index 069a3876af..d20f84b4ff 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -63,6 +63,7 @@ class OS { bool _stdout_enabled = true; bool _stderr_enabled = true; bool _writing_movie = false; + bool _in_editor = false; CompositeLogger *_logger = nullptr; |