So I’m following this video to help me know about making menus in Godot. But when I tried to replicate the scroll container, It didn’t work as it was supposed to. Not even the docs or any available information on the internet was able to help me out.
Could any one please tell me what I’m doing wrong? Here’s what it looks like btw:
As you can see, the box increases it size and expands to take up the space. But in the video (22:10), The squares stay the same and can be scrolled to see more.
Any help would be greatly appreciated. Thanks in advance!
If you want the items to stack downwards, use a V = Vertical one.
Also, the items you add need to actually reach outside the boundaries of the ScrollContainer for there to be any scroll bar.
So, you’d need to make sure the ScrollContainer has a fixed size and that the content spans wider (since you are using a Horizontal Box Container) than it’s width.
To answer your first point: Yes, I intended to use a HBoxContainer. I’m making a horizontal scroll bar, not a vertical one.
And to answer your 2nd point: That’s the problem I’m having, How do I set the ScrollContainer to a fixed size and increase the HBoxContainer? Only the ScrollContainer is able to set it’s size and scale, but the node cant do it on it’s own
Oh, I’m sorry. I thought maybe people weren’t able to see the topic in other to respond back to it again (if they don’t have notifications) so I tried making it stay on top in the topic page for people to see and respond. I guess I’ll have to till the weekends before my issue can be solved
Just wait… You won’t get more help by just repeatedly asking when no one has answered, if no one answers it means either that no one knows or that you haven’t asked in a way that people can help with
While inside the ScrollContainer, the HBoxContainers size will expand to fit its contents.
Size the ScrollContainer smaller than the HBox to bring up the scrollbar.
Yeah but, the HBoxContainer keeps changing it’s size when I resize the scroll container. How do I size the ScrollContainer to make it smaller without changing it’s contents. Does it have something to do with my full rect option?
Yes, setting the ScrollContainer LayoutMode to fullrect will prevent the scroll bars from appearing.
In the inspector under Layout find LayoutMode and reset it.
Then resize the ScrollContainer.