Two separate focused elements
Posted: 08 Oct 2019, 13:27
Hi guys,
What is the suggested method of having 2 different users control focus on different parts of the screen. We have a lobby-style screen where 2 different users are controlling different elements. Currently I've implemented the input in our game with keyboard focus and the focus manager. Most of the input is handled automatically for us by the KeyboardNavigation class.
My current thinking is that I need to ignore the keyboard focus and instead just use the UIElement::IsFocused property. I would then need to implement my own function to navigate the buttons (essentially re-implement KeyboardNavigation and instance it for each controlling user). When a user changes focus, instead of setting the keyboard focus I only need to set the element itself to be focused. Does this sound reasonable? Is there a simpler solution? If not, that's fine, I just wanted to make sure I'm not missing something trivial.
Cheers,
-Steven
What is the suggested method of having 2 different users control focus on different parts of the screen. We have a lobby-style screen where 2 different users are controlling different elements. Currently I've implemented the input in our game with keyboard focus and the focus manager. Most of the input is handled automatically for us by the KeyboardNavigation class.
My current thinking is that I need to ignore the keyboard focus and instead just use the UIElement::IsFocused property. I would then need to implement my own function to navigate the buttons (essentially re-implement KeyboardNavigation and instance it for each controlling user). When a user changes focus, instead of setting the keyboard focus I only need to set the element itself to be focused. Does this sound reasonable? Is there a simpler solution? If not, that's fine, I just wanted to make sure I'm not missing something trivial.
Cheers,
-Steven