Implement concept of multiple focus targets#6095
Implement concept of multiple focus targets#6095frenzibyte wants to merge 3 commits intoppy:masterfrom
Conversation
|
My immediate concern with this is that it's a very specific way of handling this one case. But as soon as you have multiple focus in a case that's slightly less contained within one component -- suppose some I'm going to do my own investigations into this while keeping this PR in the back pocket. Ideally all of these scenarios would be something akin to nested focus. There's a few things I don't understand about how focus currently works (I think specifically related to the dropdown+header component), so it'll be a good exercise for me to at least understand why things are even working as they are. I'm not sold on the idea of explicit multiple focus targets right now. |
|
I'm not sure if I had a dangling review that I lost, or I mentioned my thoughts somewhere else like discord but I came to roughly the same conclusion (aka. i hope we can avoid this). I'd definitely agree on the direction of attempting to fix the underlying issue without this change. |
Preliminary step for removing the necessity of an input manager from
DropdownSearchBar.The end goal of this implementation is to make it possible for the dropdown search bar and menu to be focused together at once when the dropdown is open (in addition to
Dropdownitself), to promote non-positional input to all those components.After countless attempts at multiple approaches for this end goal, I've settled on this implementation as one with the least resistance when integrated with existing usages of focus in o!f and osu!.
The approach taken here revolves around a property in the
Drawableclass returning a list of drawables that should gain/lose focus alongside the main drawable providing them (in my case, the main drawable class would beDropdown, and it would override the property to return bothMenuandDropdownHeader->DropdownSearchBar->TextBox).Test coverage made here is pretty basic (showcasing how the feature can be utilised), but I aim to add more cases if the approach is agreed upon.