Added documentation for some clases
Variant, ToolButton, Button, GradientTexture, BitMap Added documentation for CollisionShape(2D)
This commit is contained in:
parent
d1cb73b47a
commit
ecb92bc6c3
1 changed files with 39 additions and 16 deletions
|
@ -9025,8 +9025,10 @@
|
||||||
</class>
|
</class>
|
||||||
<class name="BitMap" inherits="Resource" category="Core">
|
<class name="BitMap" inherits="Resource" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
Boolean matrix.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates.
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="create">
|
<method name="create">
|
||||||
|
@ -9035,6 +9037,7 @@
|
||||||
<argument index="0" name="size" type="Vector2">
|
<argument index="0" name="size" type="Vector2">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Creates a bitmap with the specified size, filled with false.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="create_from_image_alpha">
|
<method name="create_from_image_alpha">
|
||||||
|
@ -9043,6 +9046,7 @@
|
||||||
<argument index="0" name="image" type="Image">
|
<argument index="0" name="image" type="Image">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is 0, and true in other case.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_bit" qualifiers="const">
|
<method name="get_bit" qualifiers="const">
|
||||||
|
@ -9051,18 +9055,21 @@
|
||||||
<argument index="0" name="pos" type="Vector2">
|
<argument index="0" name="pos" type="Vector2">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Returns bitmap's value at the specified position.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_size" qualifiers="const">
|
<method name="get_size" qualifiers="const">
|
||||||
<return type="Vector2">
|
<return type="Vector2">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns bitmap's dimensions.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_true_bit_count" qualifiers="const">
|
<method name="get_true_bit_count" qualifiers="const">
|
||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Returns the amount of bitmap elements that are set to true.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_bit">
|
<method name="set_bit">
|
||||||
|
@ -9073,6 +9080,7 @@
|
||||||
<argument index="1" name="bit" type="bool">
|
<argument index="1" name="bit" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Sets the bitmap's element at the specified position, to the specified value.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_bit_rect">
|
<method name="set_bit_rect">
|
||||||
|
@ -9083,6 +9091,7 @@
|
||||||
<argument index="1" name="bit" type="bool">
|
<argument index="1" name="bit" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Sets a rectangular portion of the bitmap to the specified value.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -9370,35 +9379,30 @@
|
||||||
<return type="Texture">
|
<return type="Texture">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Return the button icon.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_clip_text" qualifiers="const">
|
<method name="get_clip_text" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Return the state of the [i]clip_text[/i] property (see [method set_clip_text])
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_text" qualifiers="const">
|
<method name="get_text" qualifiers="const">
|
||||||
<return type="String">
|
<return type="String">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Return the button text.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_text_align" qualifiers="const">
|
<method name="get_text_align" qualifiers="const">
|
||||||
<return type="int" enum="Button.TextAlign">
|
<return type="int" enum="Button.TextAlign">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Return the text alignment policy.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_flat" qualifiers="const">
|
<method name="is_flat" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Return the state of the [i]flat[/i] property (see [method set_flat]).
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_button_icon">
|
<method name="set_button_icon">
|
||||||
|
@ -9407,7 +9411,6 @@
|
||||||
<argument index="0" name="texture" type="Texture">
|
<argument index="0" name="texture" type="Texture">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Set the icon that will be displayed next to the text inside the button area.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_clip_text">
|
<method name="set_clip_text">
|
||||||
|
@ -9416,7 +9419,6 @@
|
||||||
<argument index="0" name="enabled" type="bool">
|
<argument index="0" name="enabled" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Set the [i]clip_text[/i] property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_flat">
|
<method name="set_flat">
|
||||||
|
@ -9425,7 +9427,6 @@
|
||||||
<argument index="0" name="enabled" type="bool">
|
<argument index="0" name="enabled" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Set the [i]flat[/i] property of a Button. Flat buttons don't display decoration unless hovered or pressed.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_text">
|
<method name="set_text">
|
||||||
|
@ -9434,7 +9435,6 @@
|
||||||
<argument index="0" name="text" type="String">
|
<argument index="0" name="text" type="String">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Set the button text, which will be displayed inside the button area.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_text_align">
|
<method name="set_text_align">
|
||||||
|
@ -9443,20 +9443,24 @@
|
||||||
<argument index="0" name="align" type="int" enum="Button.TextAlign">
|
<argument index="0" name="align" type="int" enum="Button.TextAlign">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Set the text alignment policy, using one of the ALIGN_* constants.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="align" type="int" setter="set_text_align" getter="get_text_align" brief="" enum="Button.TextAlign">
|
<member name="align" type="int" setter="set_text_align" getter="get_text_align" brief="" enum="Button.TextAlign">
|
||||||
|
Text alignment policy for the button's text, use one of the ALIGN_* constants.
|
||||||
</member>
|
</member>
|
||||||
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" brief="">
|
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" brief="">
|
||||||
|
When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default.
|
||||||
</member>
|
</member>
|
||||||
<member name="flat" type="bool" setter="set_flat" getter="is_flat" brief="">
|
<member name="flat" type="bool" setter="set_flat" getter="is_flat" brief="button decoration mode">
|
||||||
|
Flat buttons don't display decoration.
|
||||||
</member>
|
</member>
|
||||||
<member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon" brief="">
|
<member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon" brief="">
|
||||||
|
Button's icon, if text is present the icon will be placed before the text.
|
||||||
</member>
|
</member>
|
||||||
<member name="text" type="String" setter="set_text" getter="get_text" brief="">
|
<member name="text" type="String" setter="set_text" getter="get_text" brief="">
|
||||||
|
The button's text that will be displayed inside the button's area.
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
@ -9464,7 +9468,7 @@
|
||||||
Align the text to the left.
|
Align the text to the left.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="ALIGN_CENTER" value="1">
|
<constant name="ALIGN_CENTER" value="1">
|
||||||
Center the text.
|
Align the text to the center.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="ALIGN_RIGHT" value="2">
|
<constant name="ALIGN_RIGHT" value="2">
|
||||||
Align the text to the right.
|
Align the text to the right.
|
||||||
|
@ -12155,8 +12159,10 @@
|
||||||
</class>
|
</class>
|
||||||
<class name="CollisionShape" inherits="Spatial" category="Core">
|
<class name="CollisionShape" inherits="Spatial" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
Node that represents collision shape data in 3D space.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="get_shape" qualifiers="const">
|
<method name="get_shape" qualifiers="const">
|
||||||
|
@ -12175,6 +12181,7 @@
|
||||||
<return type="void">
|
<return type="void">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="resource_changed">
|
<method name="resource_changed">
|
||||||
|
@ -12204,8 +12211,10 @@
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
|
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
|
||||||
|
A disabled collision shape has no effect in the world.
|
||||||
</member>
|
</member>
|
||||||
<member name="shape" type="Shape" setter="set_shape" getter="get_shape" brief="">
|
<member name="shape" type="Shape" setter="set_shape" getter="get_shape" brief="">
|
||||||
|
The actual shape owned by this collision shape.
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
@ -12213,17 +12222,16 @@
|
||||||
</class>
|
</class>
|
||||||
<class name="CollisionShape2D" inherits="Node2D" category="Core">
|
<class name="CollisionShape2D" inherits="Node2D" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
Editor-only class for easy editing of shapes.
|
Node that represents collision shape data in 2D space.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
Editor-only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code.
|
Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to give create solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method get_shape] to get the actual shape.
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="get_shape" qualifiers="const">
|
<method name="get_shape" qualifiers="const">
|
||||||
<return type="Shape2D">
|
<return type="Shape2D">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
Return this shape's [Shape2D].
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_disabled" qualifiers="const">
|
<method name="is_disabled" qualifiers="const">
|
||||||
|
@ -12260,16 +12268,18 @@
|
||||||
<argument index="0" name="shape" type="Shape2D">
|
<argument index="0" name="shape" type="Shape2D">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Set this shape's [Shape2D]. This will not appear as a node, but can be directly edited as a property.
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
|
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
|
||||||
|
A disabled collision shape has no effect in the world.
|
||||||
</member>
|
</member>
|
||||||
<member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" brief="">
|
<member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" brief="">
|
||||||
|
Sets whether this collision shape should only detect collision on one side (top or bottom).
|
||||||
</member>
|
</member>
|
||||||
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape" brief="">
|
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape" brief="">
|
||||||
|
The actual shape owned by this collision shape.
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
@ -20461,8 +20471,10 @@
|
||||||
</class>
|
</class>
|
||||||
<class name="GradientTexture" inherits="Texture" category="Core">
|
<class name="GradientTexture" inherits="Texture" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
Gradient filled texture.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [method set_width]).
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="get_gradient" qualifiers="const">
|
<method name="get_gradient" qualifiers="const">
|
||||||
|
@ -20490,8 +20502,10 @@
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" brief="">
|
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" brief="">
|
||||||
|
The [Gradient] that will be used to fill the texture.
|
||||||
</member>
|
</member>
|
||||||
<member name="width" type="int" setter="set_width" getter="get_width" brief="">
|
<member name="width" type="int" setter="set_width" getter="get_width" brief="">
|
||||||
|
The number of color samples that will be obtained from the [Gradient].
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
@ -53197,8 +53211,15 @@
|
||||||
</class>
|
</class>
|
||||||
<class name="ToolButton" inherits="Button" category="Core">
|
<class name="ToolButton" inherits="Button" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
Flat button helper class.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
This is a helper class to generate a flat [Button] (see [method Button.set_flat]), creating a ToolButton is equivalent to:
|
||||||
|
|
||||||
|
[codeblock]
|
||||||
|
var btn = Button.new()
|
||||||
|
btn.set_flat(true)
|
||||||
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
</methods>
|
</methods>
|
||||||
|
@ -55584,8 +55605,10 @@
|
||||||
</class>
|
</class>
|
||||||
<class name="Variant" category="Core">
|
<class name="Variant" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
The most important data type in Godot.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time, instead they are used mainly for communication, editing, serialization and moving data around.
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
</methods>
|
</methods>
|
||||||
|
|
Loading…
Add table
Reference in a new issue