diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 13:15:58 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 13:15:58 +0100 |
commit | 5947f22be9441b3b4d41604af8301515558d0f03 (patch) | |
tree | 7323e3023e0519d23bcf4ca23b8990c3363d6a99 /scene/main | |
parent | 9cfcc9131fc03693893e0ed2ac19878c392a0125 (diff) | |
parent | e48c5daddfa70172c0eab57b8045a7087eec6e2c (diff) |
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/node.cpp | 2 | ||||
-rw-r--r-- | scene/main/scene_tree.cpp | 4 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 038f182e8b..304504a82e 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2958,7 +2958,7 @@ void Node::_bind_methods() { } String Node::_get_name_num_separator() { - switch (ProjectSettings::get_singleton()->get("editor/node_naming/name_num_separator").operator int()) { + switch (GLOBAL_GET("editor/node_naming/name_num_separator").operator int()) { case 0: return ""; case 1: diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 5ff9a29792..41eefe0f85 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -485,7 +485,7 @@ bool SceneTree::process(double p_time) { #ifndef _3D_DISABLED if (Engine::get_singleton()->is_editor_hint()) { //simple hack to reload fallback environment if it changed from editor - String env_path = ProjectSettings::get_singleton()->get(SNAME("rendering/environment/defaults/default_environment")); + String env_path = GLOBAL_GET(SNAME("rendering/environment/defaults/default_environment")); env_path = env_path.strip_edges(); //user may have added a space or two String cpath; Ref<Environment> fallback = get_root()->get_world_3d()->get_fallback_environment(); @@ -1390,7 +1390,7 @@ SceneTree::SceneTree() { root = memnew(Window); root->set_process_mode(Node::PROCESS_MODE_PAUSABLE); root->set_name("root"); - root->set_title(ProjectSettings::get_singleton()->get("application/config/name")); + root->set_title(GLOBAL_GET("application/config/name")); #ifndef _3D_DISABLED if (!root->get_world_3d().is_valid()) { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index f395ede409..6af96a4147 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1261,7 +1261,7 @@ void Viewport::_gui_show_tooltip() { tooltip_owner->add_child(gui.tooltip_popup); - Point2 tooltip_offset = ProjectSettings::get_singleton()->get("display/mouse_cursor/tooltip_position_offset"); + Point2 tooltip_offset = GLOBAL_GET("display/mouse_cursor/tooltip_position_offset"); Rect2 r(gui.tooltip_pos + tooltip_offset, gui.tooltip_popup->get_contents_minimum_size()); r.size = r.size.min(panel->get_max_size()); |