class_viewportcontainer.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the ViewportContainer.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_ViewportContainer:
  6. ViewportContainer
  7. =================
  8. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Control for holding :ref:`Viewport<class_Viewport>`\ s.
  13. Properties
  14. ----------
  15. +-------------------------+------------------------------------------------------------------------+-------+
  16. | :ref:`bool<class_bool>` | :ref:`stretch<class_ViewportContainer_property_stretch>` | false |
  17. +-------------------------+------------------------------------------------------------------------+-------+
  18. | :ref:`int<class_int>` | :ref:`stretch_shrink<class_ViewportContainer_property_stretch_shrink>` | 1 |
  19. +-------------------------+------------------------------------------------------------------------+-------+
  20. Description
  21. -----------
  22. A :ref:`Container<class_Container>` node that holds a :ref:`Viewport<class_Viewport>`, automatically setting its size.
  23. Property Descriptions
  24. ---------------------
  25. .. _class_ViewportContainer_property_stretch:
  26. - :ref:`bool<class_bool>` **stretch**
  27. +-----------+----------------------+
  28. | *Default* | false |
  29. +-----------+----------------------+
  30. | *Setter* | set_stretch(value) |
  31. +-----------+----------------------+
  32. | *Getter* | is_stretch_enabled() |
  33. +-----------+----------------------+
  34. If ``true``, the viewport will be scaled to the control's size.
  35. .. _class_ViewportContainer_property_stretch_shrink:
  36. - :ref:`int<class_int>` **stretch_shrink**
  37. +-----------+---------------------------+
  38. | *Default* | 1 |
  39. +-----------+---------------------------+
  40. | *Setter* | set_stretch_shrink(value) |
  41. +-----------+---------------------------+
  42. | *Getter* | get_stretch_shrink() |
  43. +-----------+---------------------------+