-
-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manage inactive container selection #970
base: main
Are you sure you want to change the base?
Conversation
Thanks! It seems to fix the problem from the linked bug, but I don't understand the solution. I believe we should reinvent the whole think from the ground up. Instead of 2-level of focus in between |
Sure! Component ActiveChild() override {
if (children_.empty()) {
return nullptr;
}
return children_[static_cast<size_t>(*selector_) % children_.size()];
} a component is returned as const bool active = Active();
...
auto focus_management = focused ? focus : active ? select : nothing; the button is always set to here's a representation of what happens: Screencast_20241223_004618.mp4My Solution
If I;m not interpreting this incorrectly, you mean to get rid of either In that case too we'll have to find a way so that the What do you think? I'll be happy to help! |
Thanks! There are 3 layers in FTXUI:
I believe the problem currently is that the "focusing" happens in both I believe we should modify enum Selection {
NORMAL = 0,
SELECTED = 1,
FOCUSED = 2,
}; To bool is_selected; Then we should unite the decorator Then we should add Finally, we should Modify What do you think? |
Hello there! Re-implementing I want to confirm the replacement of Also i think we unite |
Sounds good to me. I confirm both. |
Sure! I will open a new pr with the updated code |
Hello there!
I had a similar issue as #935
What appears to be a reset is actually frame correctly identifying selected (by default) button in
Container::Horizontal
So if our parent container contains a few buttons followed by a few horizontal containers of buttons, the scroll works fine until we pass by the first horizontal container, after which it will see the first horizontal container's button as
selected
.This can be resolved by managing the state of
selector_
based on whether the container isactive
or not so that theActiveChild()
is managed properly while rendering.after managing selector:
Screencast_20241216_214405.mp4
this will close #935