Conversation
| return; | ||
| } | ||
|
|
||
| for entity in q_indicators.iter() { |
There was a problem hiding this comment.
Might be simpler if you just find the current InputFocus entity and set outlines on it and all its descendants with FocusIndicator and record those focus ringed nodes. Then afterwards, iterate through all the FocusIndicator nodes With<Outline> and remove all Outlines except those already visited.
There was a problem hiding this comment.
Would that be faster? I'm concerned about the cost of allocating memory (although we know how many items there are so we could reserve the collection up front).
There was a problem hiding this comment.
Well the number of focus ringed entities wouldn't normally be very large, it could just use a Local smallvec or something with 5 capacity or so.
There was a problem hiding this comment.
It would be much faster I think otherwise, as you wouldn't need to walk back up the tree each time. And you would only visit nodes and queue a remove command for those that already have an outline.
Co-authored-by: ickshonpe <david.curthoys@googlemail.com>
Objective
Part of #19236
Solution
Implements basic focus outlines for feathers widgets using
Outline.Testing
Manual testing