BoxContainer.xml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="BoxContainer" inherits="Container" version="4.0">
  3. <brief_description>
  4. Base class for box containers.
  5. </brief_description>
  6. <description>
  7. Arranges child [Control] nodes vertically or horizontally, and rearranges them automatically when their minimum size changes.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="add_spacer">
  13. <return type="Control" />
  14. <argument index="0" name="begin" type="bool" />
  15. <description>
  16. Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children.
  17. </description>
  18. </method>
  19. </methods>
  20. <members>
  21. <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0">
  22. The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER], or [constant ALIGN_END]).
  23. </member>
  24. </members>
  25. <constants>
  26. <constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
  27. Aligns children with the beginning of the container.
  28. </constant>
  29. <constant name="ALIGN_CENTER" value="1" enum="AlignMode">
  30. Aligns children with the center of the container.
  31. </constant>
  32. <constant name="ALIGN_END" value="2" enum="AlignMode">
  33. Aligns children with the end of the container.
  34. </constant>
  35. </constants>
  36. </class>