diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/AStarGrid2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/Basis.xml | 2 | ||||
-rw-r--r-- | doc/classes/DirAccess.xml | 4 | ||||
-rw-r--r-- | doc/classes/FileAccess.xml | 10 | ||||
-rw-r--r-- | doc/classes/MenuButton.xml | 6 | ||||
-rw-r--r-- | doc/classes/OS.xml | 14 | ||||
-rw-r--r-- | doc/classes/OptionButton.xml | 6 |
7 files changed, 28 insertions, 16 deletions
diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml index 331862ebfa..8dde3748d7 100644 --- a/doc/classes/AStarGrid2D.xml +++ b/doc/classes/AStarGrid2D.xml @@ -53,7 +53,7 @@ </description> </method> <method name="get_id_path"> - <return type="PackedVector2Array" /> + <return type="Vector2i[]" /> <param index="0" name="from_id" type="Vector2i" /> <param index="1" name="to_id" type="Vector2i" /> <description> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index d62f704528..6d9b679fbc 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -83,7 +83,7 @@ <return type="Vector3" /> <param index="0" name="order" type="int" default="2" /> <description> - Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + Returns the basis's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, by default it uses the YXZ convention: when decomposing, first Z, then X, and Y last. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles. </description> </method> diff --git a/doc/classes/DirAccess.xml b/doc/classes/DirAccess.xml index 554ef9e2da..7d1612e59c 100644 --- a/doc/classes/DirAccess.xml +++ b/doc/classes/DirAccess.xml @@ -80,7 +80,7 @@ <param index="2" name="chmod_flags" type="int" default="-1" /> <description> Copies the [param from] file to the [param to] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - If [param chmod_flags] is different than [code]-1[/code], the unix permissions for the destination path will be set to the provided value, if available on the current operating system. + If [param chmod_flags] is different than [code]-1[/code], the Unix permissions for the destination path will be set to the provided value, if available on the current operating system. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> @@ -199,7 +199,7 @@ <method name="get_space_left"> <return type="int" /> <description> - On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. + Returns the available space on the current directory's disk, in bytes. Returns [code]0[/code] if the platform-specific method to query the available space fails. </description> </method> <method name="list_dir_begin"> diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml index f4ae70cf22..e52f897164 100644 --- a/doc/classes/FileAccess.xml +++ b/doc/classes/FileAccess.xml @@ -20,13 +20,13 @@ [csharp] public void Save(string content) { - using var file = FileAccess.Open("user://save_game.dat", File.ModeFlags.Write); + using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Write); file.StoreString(content); } public string Load() { - using var file = FileAccess.Open("user://save_game.dat", File.ModeFlags.Read); + using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Read); string content = file.GetAsText(); return content; } @@ -316,8 +316,7 @@ return (unsigned + MAX_15B) % MAX_16B - MAX_15B func _ready(): - var f = File.new() - f.open("user://file.dat", File.WRITE_READ) + var f = FileAccess.open("user://file.dat", FileAccess.WRITE_READ) f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42). f.store_16(121) # In bounds, will store 121. f.seek(0) # Go back to start to read the stored value. @@ -329,8 +328,7 @@ [csharp] public override void _Ready() { - var f = new File(); - f.Open("user://file.dat", File.ModeFlags.WriteRead); + using var f = FileAccess.Open("user://file.dat", FileAccess.ModeFlags.WriteRead); f.Store16(unchecked((ushort)-42)); // This wraps around and stores 65494 (2^16 - 42). f.Store16(121); // In bounds, will store 121. f.Seek(0); // Go back to start to read the stored value. diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 1f38510e83..4d5d5a011b 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -25,6 +25,12 @@ If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button. </description> </method> + <method name="show_popup"> + <return type="void" /> + <description> + Adjusts popup position and sizing for the [MenuButton], then shows the [PopupMenu]. Prefer this over using [code]get_popup().popup()[/code]. + </description> + </method> </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" /> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 313f3ab6db..bc6ac8012f 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -18,12 +18,6 @@ Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. </description> </method> - <method name="can_use_threads" qualifiers="const"> - <return type="bool" /> - <description> - Returns [code]true[/code] if the current host platform is using multiple threads. - </description> - </method> <method name="close_midi_inputs"> <return type="void" /> <description> @@ -544,6 +538,14 @@ [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> + <method name="read_string_from_stdin"> + <return type="String" /> + <param index="0" name="block" type="bool" default="true" /> + <description> + Reads a user input string from the standard input (usually the terminal). + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Non-blocking reads are not currently supported on any platform. + </description> + </method> <method name="request_permission"> <return type="bool" /> <param index="0" name="name" type="String" /> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index f10c096c1b..199535298c 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -190,6 +190,12 @@ Sets the tooltip of the item at index [param idx]. </description> </method> + <method name="show_popup"> + <return type="void" /> + <description> + Adjusts popup position and sizing for the [OptionButton], then shows the [PopupMenu]. Prefer this over using [code]get_popup().popup()[/code]. + </description> + </method> </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" /> |