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/gui | |
parent | 9cfcc9131fc03693893e0ed2ac19878c392a0125 (diff) | |
parent | e48c5daddfa70172c0eab57b8045a7087eec6e2c (diff) |
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/control.cpp | 2 | ||||
-rw-r--r-- | scene/gui/item_list.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 7f2e7a2855..c5cb7157e8 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -633,7 +633,7 @@ Rect2 Control::get_parent_anchorable_rect() const { #ifdef TOOLS_ENABLED Node *edited_root = get_tree()->get_edited_scene_root(); if (edited_root && (this == edited_root || edited_root->is_ancestor_of(this))) { - parent_rect.size = Size2(ProjectSettings::get_singleton()->get("display/window/size/viewport_width"), ProjectSettings::get_singleton()->get("display/window/size/viewport_height")); + parent_rect.size = Size2(GLOBAL_GET("display/window/size/viewport_width"), GLOBAL_GET("display/window/size/viewport_height")); } else { parent_rect = get_viewport()->get_visible_rect(); } diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 223428906a..d6b5557a3f 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -733,7 +733,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) { uint64_t now = OS::get_singleton()->get_ticks_msec(); uint64_t diff = now - search_time_msec; - if (diff < uint64_t(ProjectSettings::get_singleton()->get("gui/timers/incremental_search_max_interval_msec")) * 2) { + if (diff < uint64_t(GLOBAL_GET("gui/timers/incremental_search_max_interval_msec")) * 2) { for (int i = current - 1; i >= 0; i--) { if (CAN_SELECT(i) && items[i].text.begins_with(search_string)) { set_current(i); @@ -771,7 +771,7 @@ void ItemList::gui_input(const Ref<InputEvent> &p_event) { uint64_t now = OS::get_singleton()->get_ticks_msec(); uint64_t diff = now - search_time_msec; - if (diff < uint64_t(ProjectSettings::get_singleton()->get("gui/timers/incremental_search_max_interval_msec")) * 2) { + if (diff < uint64_t(GLOBAL_GET("gui/timers/incremental_search_max_interval_msec")) * 2) { for (int i = current + 1; i < items.size(); i++) { if (CAN_SELECT(i) && items[i].text.begins_with(search_string)) { set_current(i); |