1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Rename is_a_parent_of() to is_ancestor_of()

This commit is contained in:
Lightning_A
2021-06-18 16:02:50 -06:00
parent 8ffb631cdb
commit 899e5f8685
17 changed files with 37 additions and 37 deletions

View File

@@ -239,13 +239,13 @@ void ScrollContainer::_update_scrollbar_position() {
}
void ScrollContainer::_gui_focus_changed(Control *p_control) {
if (follow_focus && is_a_parent_of(p_control)) {
if (follow_focus && is_ancestor_of(p_control)) {
ensure_control_visible(p_control);
}
}
void ScrollContainer::ensure_control_visible(Control *p_control) {
ERR_FAIL_COND_MSG(!is_a_parent_of(p_control), "Must be a parent of the control.");
ERR_FAIL_COND_MSG(!is_ancestor_of(p_control), "Must be an ancestor of the control.");
Rect2 global_rect = get_global_rect();
Rect2 other_rect = p_control->get_global_rect();