class_referencerect.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the ReferenceRect.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_ReferenceRect:
  6. ReferenceRect
  7. =============
  8. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Reference frame for GUI.
  10. Description
  11. -----------
  12. A rectangle box that displays only a :ref:`border_color<class_ReferenceRect_property_border_color>` border color around its rectangle. ``ReferenceRect`` has no fill :ref:`Color<class_Color>`. If you need to display a rectangle filled with a solid color, consider using :ref:`ColorRect<class_ColorRect>` instead.
  13. Properties
  14. ----------
  15. +---------------------------+----------------------------------------------------------------+-------------------------+
  16. | :ref:`Color<class_Color>` | :ref:`border_color<class_ReferenceRect_property_border_color>` | ``Color( 1, 0, 0, 1 )`` |
  17. +---------------------------+----------------------------------------------------------------+-------------------------+
  18. | :ref:`float<class_float>` | :ref:`border_width<class_ReferenceRect_property_border_width>` | ``1.0`` |
  19. +---------------------------+----------------------------------------------------------------+-------------------------+
  20. | :ref:`bool<class_bool>` | :ref:`editor_only<class_ReferenceRect_property_editor_only>` | ``true`` |
  21. +---------------------------+----------------------------------------------------------------+-------------------------+
  22. Property Descriptions
  23. ---------------------
  24. .. _class_ReferenceRect_property_border_color:
  25. - :ref:`Color<class_Color>` **border_color**
  26. +-----------+-------------------------+
  27. | *Default* | ``Color( 1, 0, 0, 1 )`` |
  28. +-----------+-------------------------+
  29. | *Setter* | set_border_color(value) |
  30. +-----------+-------------------------+
  31. | *Getter* | get_border_color() |
  32. +-----------+-------------------------+
  33. Sets the border :ref:`Color<class_Color>` of the ``ReferenceRect``.
  34. ----
  35. .. _class_ReferenceRect_property_border_width:
  36. - :ref:`float<class_float>` **border_width**
  37. +-----------+-------------------------+
  38. | *Default* | ``1.0`` |
  39. +-----------+-------------------------+
  40. | *Setter* | set_border_width(value) |
  41. +-----------+-------------------------+
  42. | *Getter* | get_border_width() |
  43. +-----------+-------------------------+
  44. Sets the border width of the ``ReferenceRect``. The border grows both inwards and outwards with respect to the rectangle box.
  45. ----
  46. .. _class_ReferenceRect_property_editor_only:
  47. - :ref:`bool<class_bool>` **editor_only**
  48. +-----------+------------------------+
  49. | *Default* | ``true`` |
  50. +-----------+------------------------+
  51. | *Setter* | set_editor_only(value) |
  52. +-----------+------------------------+
  53. | *Getter* | get_editor_only() |
  54. +-----------+------------------------+
  55. If set to ``true``, the ``ReferenceRect`` will only be visible while in editor. Otherwise, ``ReferenceRect`` will be visible in game.
  56. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  57. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  58. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`