flame
flame copied to clipboard
Create layout component similar to IndexedStack
Problem to solve
I have a use-case where I want to show/hide some components, which can be done by add/remove them to the tree as described here. I can be nicer to have a layout component that can show one of its child components and hide the rest, somehow similar to IndexedStack layout component in Flutter.
Proposal
Create a layout component similar to IndexedStack in Flutter that support show/hide child components.
More information
I have implemented it in my project here. It can be adapted to flame engine with some generalization.
Other
- [x] Are you interested in working on a PR for this?
Sorry for the late reply, could you expand a bit more on the use-cases this could have in a Flame game?