CanvasLayer.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CanvasLayer" inherits="Node" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Canvas drawing layer.
  5. </brief_description>
  6. <description>
  7. Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [code]CanvasLayer[/code] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [code]CanvasLayer[/code] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_custom_viewport" qualifiers="const">
  15. <return type="Node">
  16. </return>
  17. <description>
  18. </description>
  19. </method>
  20. <method name="get_layer" qualifiers="const">
  21. <return type="int">
  22. </return>
  23. <description>
  24. Return the layer index, determines the draw order, a lower value will be below a higher one.
  25. </description>
  26. </method>
  27. <method name="get_offset" qualifiers="const">
  28. <return type="Vector2">
  29. </return>
  30. <description>
  31. Return the base offset for this layer (helper).
  32. </description>
  33. </method>
  34. <method name="get_rotation" qualifiers="const">
  35. <return type="float">
  36. </return>
  37. <description>
  38. Return the base rotation for this layer in radians (helper).
  39. </description>
  40. </method>
  41. <method name="get_rotationd" qualifiers="const">
  42. <return type="float">
  43. </return>
  44. <description>
  45. Return the base rotation for this layer in degrees.
  46. </description>
  47. </method>
  48. <method name="get_scale" qualifiers="const">
  49. <return type="Vector2">
  50. </return>
  51. <description>
  52. Return the base scale for this layer (helper).
  53. </description>
  54. </method>
  55. <method name="get_transform" qualifiers="const">
  56. <return type="Transform2D">
  57. </return>
  58. <description>
  59. Return the base transform for this layer.
  60. </description>
  61. </method>
  62. <method name="get_world_2d" qualifiers="const">
  63. <return type="World2D">
  64. </return>
  65. <description>
  66. Return the [World2D] used by this layer.
  67. </description>
  68. </method>
  69. <method name="set_custom_viewport">
  70. <return type="void">
  71. </return>
  72. <argument index="0" name="viewport" type="Node">
  73. </argument>
  74. <description>
  75. </description>
  76. </method>
  77. <method name="set_layer">
  78. <return type="void">
  79. </return>
  80. <argument index="0" name="layer" type="int">
  81. </argument>
  82. <description>
  83. Set the layer index, determines the draw order, a lower value will be below a higher one.
  84. </description>
  85. </method>
  86. <method name="set_offset">
  87. <return type="void">
  88. </return>
  89. <argument index="0" name="offset" type="Vector2">
  90. </argument>
  91. <description>
  92. Set the base offset for this layer (helper).
  93. </description>
  94. </method>
  95. <method name="set_rotation">
  96. <return type="void">
  97. </return>
  98. <argument index="0" name="radians" type="float">
  99. </argument>
  100. <description>
  101. Set the base rotation for this layer in radians (helper).
  102. </description>
  103. </method>
  104. <method name="set_rotationd">
  105. <return type="void">
  106. </return>
  107. <argument index="0" name="degrees" type="float">
  108. </argument>
  109. <description>
  110. Set the base rotation for this layer in degrees (helper).
  111. </description>
  112. </method>
  113. <method name="set_scale">
  114. <return type="void">
  115. </return>
  116. <argument index="0" name="scale" type="Vector2">
  117. </argument>
  118. <description>
  119. Set the base scale for this layer (helper).
  120. </description>
  121. </method>
  122. <method name="set_transform">
  123. <return type="void">
  124. </return>
  125. <argument index="0" name="transform" type="Transform2D">
  126. </argument>
  127. <description>
  128. Set the base transform for this layer.
  129. </description>
  130. </method>
  131. </methods>
  132. <members>
  133. <member name="layer" type="int" setter="set_layer" getter="get_layer">
  134. Layer index for draw order. Lower values are drawn first. Default value: [code]1[/code].
  135. </member>
  136. <member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
  137. The layer's base offset.
  138. </member>
  139. <member name="rotation" type="float" setter="set_rotationd" getter="get_rotationd">
  140. The layer's rotation in degrees.
  141. </member>
  142. <member name="scale" type="Vector2" setter="set_scale" getter="get_scale">
  143. The layer's scale.
  144. </member>
  145. </members>
  146. <constants>
  147. </constants>
  148. </class>