Godot Version
v4.3.stable.official [77dcf97d8]
Question
How do I manage a menu with lots of subpages?
Hi,
I’m creating a menu UI inside a scrollcontainer.
All menus are different but they have the same buttons to switch between different pages.
As of now the pages are all contained inside a Node2D container and I cycle through them to hide and show only what I need.
The pages are all different scenes but they all have the same “info” tab to switch between the nodes. Like so:
->Container
->->Home(ScrollContainer)
->->->InfoTab (Buttons to switch between pages)
->->->PageContent
->->News(ScrollContainer)
->->->InfoTab (Buttons to switch between pages)
->->->PageContent
->->Other(ScrollContainer)
->->->InfoTab (Buttons to switch between pages)
->->->PageContent
Obviously I can’t put the info tab outside because then it wouldn’t scroll so what would be the best approach? I can’t manually connect all the instances of these buttons, they are nested inside scenes and I can’t wrap my head around to find the best way to do it.
It gets even messier when I have to think how to make subpages inside the news page.
Should I make every page inside a scrollcontainer and disable the content (except the info tab) and switch that instead of switching the entire page?
Is there a better way to organize menus with multiple sub-pages?
Thanks