Fix getting wrong focus neighbor when the control is in ScrollContainer

Exclude controls inside a `ScrollContainer` that are outside the visible area of ​​
the `ScrollContainer` when looking for focus neighbors.
This commit is contained in:
Rindbee 2022-07-16 13:23:33 +08:00 committed by 风青山
parent b3a44e8d51
commit e197463525
No known key found for this signature in database
GPG key ID: 056264D70ECB0FD5
2 changed files with 140 additions and 75 deletions

View file

@ -314,7 +314,7 @@ private:
// Focus.
void _window_find_focus_neighbor(const Vector2 &p_dir, Node *p_at, const Point2 *p_points, real_t p_min, real_t &r_closest_dist, Control **r_closest);
void _window_find_focus_neighbor(const Vector2 &p_dir, Node *p_at, const Rect2 &p_rect, const Rect2 &p_clamp, real_t p_min, real_t &r_closest_dist_squared, Control **r_closest);
Control *_get_focus_neighbor(Side p_side, int p_count = 0);
// Theming.