The
int selected_ = 0;
int* selector_ = nullptr;
members of ContainerBase should be updated to point to a valid focusable child when some child becomes unfocusable. I had a case where I used Maybe() with several Button()s in a Container::Horizontal() nested in a Container::Vertical() and when the button was made unfocusable, when I focused again on the horizontal container, no button was highlighted because selector_ was not updated.
The
members of
ContainerBaseshould be updated to point to a valid focusable child when some child becomes unfocusable. I had a case where I usedMaybe()with severalButton()s in aContainer::Horizontal()nested in aContainer::Vertical()and when the button was made unfocusable, when I focused again on the horizontal container, no button was highlighted becauseselector_was not updated.