Whenever I add an image source which exceeds the container limits, my HBoxContainer is always resizing itself to fit the image.
This is exactly what I would expect from it. However, if you don't want this to happen, you should set the rect_clip_content
-property to true on your "Menu Container"-node. Then, the rect_size
of that node will define how much of the HboxContainer is rendered, the rest is simply cut off. If you want to scroll through it, change the type of your "Menu Container"-node into a ScrollContainer.
Furthermore I can't change the height or the width of it by any means.
If, by "it", you're referring to the HBoxContainer: Why would you want to do this in the first place? It scales automatically with the content.
If you're referring to the TextureRect: That's indeed a bit unintuitive. Setting the rect_size
- or scale
-properties won't have the effect you're likely going for. What you can do instead, is setting the expand
-property to true, selecting "Keep Aspect" as a stretch_mode
and then set rect_min_size
to your liking.