Merge pull request #20554 from YeldhamDev/cursor_doc_linux

Small doc formating changes and Linux cursor theme note
This commit is contained in:
Rémi Verschelde 2018-08-13 07:49:44 +02:00 committed by GitHub
commit fe74e996e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 15 deletions

View File

@ -514,7 +514,8 @@
<argument index="0" name="var" type="Variant"> <argument index="0" name="var" type="Variant">
</argument> </argument>
<description> <description>
Returns length of Variant [code]var[/code]. Length is the character count of String, element count of Array, size of Dictionary, etc. Note: Generates a fatal error if Variant can not provide a length. Returns length of Variant [code]var[/code]. Length is the character count of String, element count of Array, size of Dictionary, etc.
[b]Note:[/b] Generates a fatal error if Variant can not provide a length.
[codeblock] [codeblock]
a = [1, 2, 3, 4] a = [1, 2, 3, 4]
len(a) # returns 4 len(a) # returns 4
@ -552,7 +553,8 @@
<argument index="0" name="path" type="String"> <argument index="0" name="path" type="String">
</argument> </argument>
<description> <description>
Loads a resource from the filesystem located at [code]path[/code]. Note: resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path". Loads a resource from the filesystem located at [code]path[/code].
[b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
[codeblock] [codeblock]
# load a scene called main located in the root of the project directory # load a scene called main located in the root of the project directory
var main = load("res://main.tscn") var main = load("res://main.tscn")
@ -565,7 +567,8 @@
<argument index="0" name="s" type="float"> <argument index="0" name="s" type="float">
</argument> </argument>
<description> <description>
Natural logarithm. The amount of time needed to reach a certain level of continuous growth. Note: This is not the same as the log function on your calculator which is a base 10 logarithm. Natural logarithm. The amount of time needed to reach a certain level of continuous growth.
[b]Note:[/b] This is not the same as the log function on your calculator which is a base 10 logarithm.
[codeblock] [codeblock]
log(10) # returns 2.302585 log(10) # returns 2.302585
[/codeblock] [/codeblock]
@ -664,7 +667,8 @@
<argument index="0" name="path" type="String"> <argument index="0" name="path" type="String">
</argument> </argument>
<description> <description>
Returns a resource from the filesystem that is loaded during script parsing. Note: resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path". Returns a resource from the filesystem that is loaded during script parsing.
[b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
[codeblock] [codeblock]
# load a scene called main located in the root of the project directory # load a scene called main located in the root of the project directory
var main = preload("res://main.tscn") var main = preload("res://main.tscn")

View File

@ -552,7 +552,8 @@
<argument index="1" name="path" type="NodePath"> <argument index="1" name="path" type="NodePath">
</argument> </argument>
<description> <description>
Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local" Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":".
[b]Example:[/b] "character/skeleton:ankle" or "character/mesh:transform/local".
</description> </description>
</method> </method>
<method name="track_swap"> <method name="track_swap">

View File

@ -300,7 +300,8 @@
<argument index="1" name="func" type="String"> <argument index="1" name="func" type="String">
</argument> </argument>
<description> <description>
Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise.
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblock] [codeblock]
class MyCustomSorter: class MyCustomSorter:
static func sort(a, b): static func sort(a, b):

View File

@ -661,6 +661,7 @@
</member> </member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape"> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape">
The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.
[b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system.
</member> </member>
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter"> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter">
Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Use one of the [code]MOUSE_FILTER_*[/code] constants. See the constants to learn what each does. Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Use one of the [code]MOUSE_FILTER_*[/code] constants. See the constants to learn what each does.

View File

@ -4,10 +4,8 @@
Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns. Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns.
</brief_description> </brief_description>
<description> <description>
This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list.
or both text and icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key).
may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled
to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key).
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>

View File

@ -223,8 +223,8 @@
</argument> </argument>
<description> <description>
Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and attempts to access it will result in an "Attempt to call &lt;method&gt; on a null instance." error. Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and attempts to access it will result in an "Attempt to call &lt;method&gt; on a null instance." error.
Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). [b]Note:[/b] Fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
[i]Example:[/i] Assume your current node is Character and the following tree: [b]Example:[/b] Assume your current node is Character and the following tree:
[codeblock] [codeblock]
/root /root
/root/Character /root/Character

View File

@ -653,7 +653,8 @@
<argument index="2" name="maxsplit" type="int" default="0"> <argument index="2" name="maxsplit" type="int" default="0">
</argument> </argument>
<description> <description>
Splits the string by a [code]divisor[/code] string and returns an array of the substrings, starting from right. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",". Splits the string by a [code]divisor[/code] string and returns an array of the substrings, starting from right.
[b]Example:[/b] "One,Two,Three" will return ["One","Two","Three"] if split by ",".
If [code]maxsplit[/code] is specified, then it is number of splits to do, default is 0 which splits all the items. If [code]maxsplit[/code] is specified, then it is number of splits to do, default is 0 which splits all the items.
</description> </description>
</method> </method>
@ -698,7 +699,8 @@
<argument index="2" name="maxsplit" type="int" default="0"> <argument index="2" name="maxsplit" type="int" default="0">
</argument> </argument>
<description> <description>
Splits the string by a divisor string and returns an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",". Splits the string by a divisor string and returns an array of the substrings.
[b]Example:[/b] "One,Two,Three" will return ["One","Two","Three"] if split by ",".
If [code]maxsplit[/code] is given, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements) If [code]maxsplit[/code] is given, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements)
</description> </description>
</method> </method>
@ -710,7 +712,8 @@
<argument index="1" name="allow_empty" type="bool" default="True"> <argument index="1" name="allow_empty" type="bool" default="True">
</argument> </argument>
<description> <description>
Splits the string in floats by using a divisor string and returns an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",". Splits the string in floats by using a divisor string and returns an array of the substrings.
[b]Example:[/b] "1,2.5,3" will return [1,2.5,3] if split by ",".
</description> </description>
</method> </method>
<method name="strip_edges"> <method name="strip_edges">