For context, I am making a customization system akin to Sims 4 or Baldur’s gate and need to be able to scroll through the long list of cosmetic items within each tab.
I have been following along with some tutorials on making scroll containers but for some reason when I go to add my children to the VboxContainer, it doesn’t add the scroll wheel like it should and doesn’t let me scroll with my mouse or emulated touch either. However, when I tested the same structure with a few duplicated label nodes that were intentionally too big to fit, the scroll wheel showed up and it let me scroll through the label nodes.
(The buttons with white hair are a template for additional cosmetic options)
Each cosmetic option has a sprite2D node with a PNG as it’s texture, and a button underneath the “thumbnail” to instance in the cosmetic onto the player model.
I am at a bit of a loss. I thought by making a control node a root of the template, I would be able to scroll through, but when I try to place them, they all get stuck in a corner, and I get a warning that tells me I can’t move the control node’s position because it’s determined by the parent. I’m not sure how to make this function with the buttons I already have placed and local to my UI scene. I tried reparenting them to new control nodes, but the position gets wonky there too. What would you recommend?
Example 1 w/ Template Button :
After playing around with it, I’m not sure what to do now…Is there any type of container that I can freely move the units around in? I was hoping to keep the look it currently had, but all the containers I’ve tried don’t allow for a lot of spacing in between like I’d like but thank you anyways! May just have to find another way around this…I wish I could do something that had a good even mix of all of the containers.
You can set the container’s spacing through theme or theme overrides on the container node. Containers do not let you freely move items around though, they are built to organize items for you.