Hello I learn to use godot and I took a book from packt to learn the basics. I came ipon ui chapter and i have questions:

-MarginContainer
--HBoxContainer
---Label
---HBoxContainer
----TxtRect
----TxtRect
----TxtRect
----TxtRect

This is the tree, the idea behind is the label is for score and the second hboxcontainer is for keeping the hearts textures . My problem with this that the texture is to big and i want to make it smaller but it's imposible. I tried the expand method and min size value but dosen't do anything. Their is a more easy way or i need to hard code it, if it's even possible?

  • housatic replied to this.
  • Start from the top and work your way down. With container nodes it's always the parent that takes priority. If the parent size is smaller then the child can't be sized bigger. It's in the name, container contains.

    Shortanel I tried the expand method and min size value but dosen't do anything.

    Did you set both Layout > Expand mode: Ignore Size and Layout > Transform > Size? Minimum size means what's the smallest size that the TextureRect can be, but it won't automatically resize it (unless min. size is bigger than size)

    i can't edit size variable, it says that only the a parent node can do that, the hboxcontainer as well , so i can change only the margincontainer size which make all small. I don't knowi need to set up the parents somehow so that i can acces the texture size?

    Start from the top and work your way down. With container nodes it's always the parent that takes priority. If the parent size is smaller then the child can't be sized bigger. It's in the name, container contains.