#Giving a VBoxContainer a Background and border
22 messages · Page 1 of 1 (latest)
Something like this but adjusting size with more text options
I think that you can use a Panel as a parent of the VBoxContainer
look into 9 slice as well : https://docs.godotengine.org/en/stable/classes/class_ninepatchrect.html
Inherits: Control< CanvasItem< Node< Object Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes. Descr...
I want the background to size to the content wich is not happening with both solutions when i tried
Can you share an example ?
Example for what i mean or how its not working?
Nevermind, I'm looking into it, I thought that it resized automatically 
Oh thanks for the effort
PanelContainer is the one that resizes itself based on its children but Panel doesn't
That works! Does the panel change with the theme editor or can i change the look somewhere else?
Nice!
You can override the theme settings in the inspector or you can create a theme and assign it
Oh yeah got it thanks you helped alot
If you want to use a NinePatchRect, it will resize itself to the size of PanelContainer if it is one of its children, NinePatchRect is the node you'd use to get the Animal Crossing look where it can stretch on the sides but the corners stay the same
No problem 
What do you mean with the corners are staying the same?
it's called Nine Slice, it's a technique used to scale UI elements
it's a texture with 9 parts, the corners (1, 3, 7, 9) are never stretched, however the sides (2, 4, 6, 8) and the middle (5) can either be stretched or tiled (repeated)
Oh so when it has texture in the middle it doesn't look weird thats cool thanks :)
No problem, I never used it in Godot so I don't know what the workflow is but it doesn't look that complicated to figure out