summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Color.xml8
-rw-r--r--doc/classes/ColorPicker.xml2
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/Label.xml20
-rw-r--r--doc/classes/OS.xml2
-rw-r--r--doc/classes/OptionButton.xml9
-rw-r--r--doc/classes/PrimitiveMesh.xml2
-rw-r--r--doc/classes/RichTextLabel.xml18
8 files changed, 49 insertions, 14 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 21d17969e2..f3fcd90f51 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -4,7 +4,7 @@
Color in RGBA format using floats on the range of 0 to 1.
</brief_description>
<description>
- A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
+ A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for opacity. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
@@ -30,10 +30,10 @@
Constructs a [Color] from an existing color, but with a custom alpha value.
[codeblocks]
[gdscript]
- var red = Color(Color.red, 0.5) # 50% transparent red.
+ var red = Color(Color.red, 0.2) # 20% opaque red.
[/gdscript]
[csharp]
- var red = new Color(Colors.Red, 0.5f); // 50% transparent red.
+ var red = new Color(Colors.Red, 0.2f); // 20% opaque red.
[/csharp]
[/codeblocks]
</description>
@@ -405,7 +405,7 @@
</methods>
<members>
<member name="a" type="float" setter="" getter="" default="1.0">
- The color's alpha (transparency) component, typically on the range of 0 to 1.
+ The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque.
</member>
<member name="a8" type="int" setter="" getter="" default="255">
Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1.
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 22439f6ca5..cb543afaba 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -41,7 +41,7 @@
If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).
</member>
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
- If [code]true[/code], shows an alpha channel slider (transparency).
+ If [code]true[/code], shows an alpha channel slider (opacity).
</member>
<member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode" default="false">
If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders.
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index ec7583e68b..62f8f00a82 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -20,7 +20,7 @@
</methods>
<members>
<member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array()">
- The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
+ The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use [method set_point_cloud] to generate a convex hull shape from concave shape points.
</member>
</members>
</class>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index e1d8b9e9f4..bdf451e710 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -82,6 +82,7 @@
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" />
<member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0">
Limits the amount of visible characters. If you set [code]percent_visible[/code] to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box.
+ [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
</member>
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" />
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
@@ -107,6 +108,10 @@
</member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
Restricts the number of characters to display. Set to -1 to disable.
+ [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
+ </member>
+ <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="Label.VisibleCharactersBehavior" default="0">
+ Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info.
</member>
</members>
<constants>
@@ -137,6 +142,21 @@
<constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
Trims the text per word and adds an ellipsis to indicate that parts are hidden.
</constant>
+ <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
+ Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
+ </constant>
+ <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
+ Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
+ </constant>
+ <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ </constant>
+ <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left.
+ </constant>
+ <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the right.
+ </constant>
</constants>
<theme_items>
<theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index ffc02f09a9..1ed4b335ad 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -348,7 +348,7 @@
<method name="get_static_memory_usage" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of static memory being used by the program in bytes.
+ Returns the amount of static memory being used by the program in bytes (only works in debug).
</description>
</method>
<method name="get_system_dir" qualifiers="const">
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index b91d8f22a7..87561917f3 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -39,12 +39,6 @@
Clears all the items in the [OptionButton].
</description>
</method>
- <method name="get_item_count" qualifiers="const">
- <return type="int" />
- <description>
- Returns the amount of items in the OptionButton, including separators.
- </description>
- </method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="idx" type="int" />
@@ -165,6 +159,9 @@
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
<member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
+ The number of items to select from.
+ </member>
<member name="selected" type="int" setter="_select_int" getter="get_selected" default="-1">
The index of the currently selected item, or [code]-1[/code] if no item is selected.
</member>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 6d63f56f1c..e9b3b887ae 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -34,7 +34,7 @@
</member>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
- This gives the same result as using [constant BaseMaterial3D.CULL_BACK] in [member BaseMaterial3D.cull_mode].
+ This gives the same result as using [constant BaseMaterial3D.CULL_FRONT] in [member BaseMaterial3D.cull_mode].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The current [Material] of the primitive mesh.
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 1a6fa65f75..132ede7a0a 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -429,6 +429,9 @@
The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed.
[b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
</member>
+ <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="RichTextLabel.VisibleCharactersBehavior" default="0">
+ Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info.
+ </member>
</members>
<signals>
<signal name="meta_clicked">
@@ -515,6 +518,21 @@
</constant>
<constant name="ITEM_CUSTOMFX" value="25" enum="ItemType">
</constant>
+ <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
+ Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
+ </constant>
+ <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
+ Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
+ </constant>
+ <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ </constant>
+ <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the left.
+ </constant>
+ <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
+ Displays [member percent_visible] glyphs, starting from the right.
+ </constant>
</constants>
<theme_items>
<theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">