This commit is contained in:
Spartan322
2025-08-16 23:07:50 -04:00
90 changed files with 1009 additions and 230 deletions

View File

@@ -181,7 +181,7 @@
<return type="int" />
<description>
On Windows, returns the number of drives (partitions) mounted on the current filesystem.
On macOS, returns the number of mounted volumes.
On macOS and Android, returns the number of mounted volumes.
On Linux, returns the number of mounted volumes and GTK 3 bookmarks.
On other platforms, the method returns 0.
</description>
@@ -193,6 +193,7 @@
On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]).
On macOS, returns the path to the mounted volume passed as an argument.
On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument.
On Android (API level 30+), returns the path to the mounted volume as an argument.
On other platforms, or if the requested drive does not exist, the method returns an empty String.
</description>
</method>

View File

@@ -212,7 +212,20 @@
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
[b]Note:[/b] Returning [code]true[/code] does not imply that the action is [i]still[/i] pressed. An action can be pressed and released again rapidly, and [code]true[/code] will still be returned so as not to miss input.
[b]Note:[/b] Due to keyboard ghosting, [method is_action_just_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
[b]Note:[/b] During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_pressed] instead to query the action state of the current event.
[b]Note:[/b] During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_pressed] instead to query the action state of the current event. See also [method is_action_just_pressed_by_event].
</description>
</method>
<method name="is_action_just_pressed_by_event" qualifiers="const">
<return type="bool" />
<param index="0" name="action" type="StringName" />
<param index="1" name="event" type="InputEvent" />
<param index="2" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] when the user has [i]started[/i] pressing the action event in the current frame or physics tick, and the first event that triggered action press in the current frame/physics tick was [param event]. It will only return [code]true[/code] on the frame or tick that the user pressed down the button.
This is useful for code that needs to run only once when an action is pressed, and the action is processed during input handling (e.g. [method Node._input]).
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
[b]Note:[/b] Returning [code]true[/code] does not imply that the action is [i]still[/i] pressed. An action can be pressed and released again rapidly, and [code]true[/code] will still be returned so as not to miss input.
[b]Note:[/b] Due to keyboard ghosting, [method is_action_just_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
<method name="is_action_just_released" qualifiers="const">
@@ -223,7 +236,19 @@
Returns [code]true[/code] when the user [i]stops[/i] pressing the action event in the current frame or physics tick. It will only return [code]true[/code] on the frame or tick that the user releases the button.
[b]Note:[/b] Returning [code]true[/code] does not imply that the action is [i]still[/i] not pressed. An action can be released and pressed again rapidly, and [code]true[/code] will still be returned so as not to miss input.
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
[b]Note:[/b] During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_released] instead to query the action state of the current event.
[b]Note:[/b] During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_released] instead to query the action state of the current event. See also [method is_action_just_released_by_event].
</description>
</method>
<method name="is_action_just_released_by_event" qualifiers="const">
<return type="bool" />
<param index="0" name="action" type="StringName" />
<param index="1" name="event" type="InputEvent" />
<param index="2" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] when the user [i]stops[/i] pressing the action event in the current frame or physics tick, and the first event that triggered action release in the current frame/physics tick was [param event]. It will only return [code]true[/code] on the frame or tick that the user releases the button.
This is useful when an action is processed during input handling (e.g. [method Node._input]).
[b]Note:[/b] Returning [code]true[/code] does not imply that the action is [i]still[/i] not pressed. An action can be released and pressed again rapidly, and [code]true[/code] will still be returned so as not to miss input.
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_action_pressed" qualifiers="const">

View File

@@ -68,7 +68,7 @@
<method name="is_action_type" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if this input event's type is one that can be assigned to an input action.
Returns [code]true[/code] if this input event's type is one that can be assigned to an input action: [InputEventKey], [InputEventMouseButton], [InputEventJoypadButton], [InputEventJoypadMotion], [InputEventAction]. Returns [code]false[/code] for all other input event types.
</description>
</method>
<method name="is_canceled" qualifiers="const">

View File

@@ -76,18 +76,21 @@
<return type="bool" />
<param index="0" name="delta" type="float" />
<description>
Called each physics frame with the time since the last physics frame as argument ([param delta], in seconds). Equivalent to [method Node._physics_process].
If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
[b]Note:[/b] [param delta] will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [param delta] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].
Called each physics tick. [param delta] is the logical time between physics ticks in seconds and is equal to [member Engine.time_scale] / [member Engine.physics_ticks_per_second]. Equivalent to [method Node._physics_process].
If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next step.
[b]Note:[/b] [method _physics_process] may be called up to [member Engine.max_physics_steps_per_frame] times per (idle) frame. This step limit may be reached when the engine is suffering performance issues.
[b]Note:[/b] Accumulated [param delta] may diverge from real world seconds.
</description>
</method>
<method name="_process" qualifiers="virtual">
<return type="bool" />
<param index="0" name="delta" type="float" />
<description>
Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to [method Node._process].
Called on each idle frame, prior to rendering, and after physics ticks have been processed. [param delta] is the time between frames in seconds. Equivalent to [method Node._process].
If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
[b]Note:[/b] [param delta] will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [param delta] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].
[b]Note:[/b] When the engine is struggling and the frame rate is lowered, [param delta] will increase. When [param delta] is increased, it's capped at a maximum of [member Engine.time_scale] * [member Engine.max_physics_steps_per_frame] / [member Engine.physics_ticks_per_second]. As a result, accumulated [param delta] may not represent real world time.
[b]Note:[/b] When [code]--fixed-fps[/code] is enabled or the engine is running in Movie Maker mode (see [MovieWriter]), process [param delta] will always be the same for every frame, regardless of how much time the frame took to render.
[b]Note:[/b] Frame delta may be post-processed by [member OS.delta_smoothing] if this is enabled for the project.
</description>
</method>
</methods>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MenuButton" inherits="Button" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<class name="MenuButton" inherits="Button" keywords="dropdown" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A button that brings up a [PopupMenu] when clicked.
</brief_description>

View File

@@ -84,24 +84,26 @@
<return type="void" />
<param index="0" name="delta" type="float" />
<description>
Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [param delta] parameter will [i]generally[/i] be constant (see exceptions below). [param delta] is in seconds.
It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process].
Called once on each physics tick, and allows Nodes to synchronize their logic with physics ticks. [param delta] is the logical time between physics ticks in seconds and is equal to [member Engine.time_scale] / [member Engine.physics_ticks_per_second].
It is only called if physics processing is enabled for this Node, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process].
Processing happens in order of [member process_physics_priority], lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal).
Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification].
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
[b]Note:[/b] [param delta] will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [param delta] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].
[b]Note:[/b] Accumulated [param delta] may diverge from real world seconds.
</description>
</method>
<method name="_process" qualifiers="virtual">
<return type="void" />
<param index="0" name="delta" type="float" />
<description>
Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [param delta] time since the previous frame is not constant. [param delta] is in seconds.
It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process].
Called on each idle frame, prior to rendering, and after physics ticks have been processed. [param delta] is the time between frames in seconds.
It is only called if processing is enabled for this Node, which is done automatically if this method is overridden, and can be toggled with [method set_process].
Processing happens in order of [member process_priority], lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal).
Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification].
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
[b]Note:[/b] [param delta] will be larger than expected if running at a framerate lower than [member Engine.physics_ticks_per_second] / [member Engine.max_physics_steps_per_frame] FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both [method _process] and [method _physics_process]. As a result, avoid using [param delta] for time measurements in real-world seconds. Use the [Time] singleton's methods for this purpose instead, such as [method Time.get_ticks_usec].
[b]Note:[/b] When the engine is struggling and the frame rate is lowered, [param delta] will increase. When [param delta] is increased, it's capped at a maximum of [member Engine.time_scale] * [member Engine.max_physics_steps_per_frame] / [member Engine.physics_ticks_per_second]. As a result, accumulated [param delta] may not represent real world time.
[b]Note:[/b] When [code]--fixed-fps[/code] is enabled or the engine is running in Movie Maker mode (see [MovieWriter]), process [param delta] will always be the same for every frame, regardless of how much time the frame took to render.
[b]Note:[/b] Frame delta may be post-processed by [member OS.delta_smoothing] if this is enabled for the project.
</description>
</method>
<method name="_ready" qualifiers="virtual">

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="OptionButton" inherits="Button" keywords="select" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<class name="OptionButton" inherits="Button" keywords="select, dropdown" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A button that brings up a dropdown with selectable options when pressed.
</brief_description>

View File

@@ -232,6 +232,12 @@
<member name="center_of_mass_local" type="Vector2" setter="" getter="get_center_of_mass_local">
The body's center of mass position in the body's local coordinate system.
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
The body's collision layer.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
The body's collision mask.
</member>
<member name="inverse_inertia" type="float" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
</member>

View File

@@ -94,6 +94,16 @@
Implement to override the behavior of [member PhysicsDirectBodyState2D.center_of_mass_local] and its respective getter.
</description>
</method>
<method name="_get_collision_layer" qualifiers="virtual required const">
<return type="int" />
<description>
</description>
</method>
<method name="_get_collision_mask" qualifiers="virtual required const">
<return type="int" />
<description>
</description>
</method>
<method name="_get_constant_force" qualifiers="virtual required const">
<return type="Vector2" />
<description>
@@ -269,6 +279,18 @@
Implement to override the behavior of [member PhysicsDirectBodyState2D.angular_velocity] and its respective setter.
</description>
</method>
<method name="_set_collision_layer" qualifiers="virtual required">
<return type="void" />
<param index="0" name="layer" type="int" />
<description>
</description>
</method>
<method name="_set_collision_mask" qualifiers="virtual required">
<return type="void" />
<param index="0" name="mask" type="int" />
<description>
</description>
</method>
<method name="_set_constant_force" qualifiers="virtual required">
<return type="void" />
<param index="0" name="force" type="Vector2" />

View File

@@ -232,6 +232,12 @@
<member name="center_of_mass_local" type="Vector3" setter="" getter="get_center_of_mass_local">
The body's center of mass position in the body's local coordinate system.
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
The body's collision layer.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
The body's collision mask.
</member>
<member name="inverse_inertia" type="Vector3" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
</member>

View File

@@ -82,6 +82,16 @@
<description>
</description>
</method>
<method name="_get_collision_layer" qualifiers="virtual required const">
<return type="int" />
<description>
</description>
</method>
<method name="_get_collision_mask" qualifiers="virtual required const">
<return type="int" />
<description>
</description>
</method>
<method name="_get_constant_force" qualifiers="virtual required const">
<return type="Vector3" />
<description>
@@ -240,6 +250,18 @@
<description>
</description>
</method>
<method name="_set_collision_layer" qualifiers="virtual required">
<return type="void" />
<param index="0" name="layer" type="int" />
<description>
</description>
</method>
<method name="_set_collision_mask" qualifiers="virtual required">
<return type="void" />
<param index="0" name="mask" type="int" />
<description>
</description>
</method>
<method name="_set_constant_force" qualifiers="virtual required">
<return type="void" />
<param index="0" name="force" type="Vector3" />

View File

@@ -35,7 +35,7 @@
The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API:
[codeblocks]
[gdscript]
var shape_rid = PhysicsServer3D.shape_create(PhysicsServer3D.SHAPE_SPHERE)
var shape_rid = PhysicsServer3D.sphere_shape_create()
var radius = 2.0
PhysicsServer3D.shape_set_data(shape_rid, radius)
@@ -48,7 +48,7 @@
PhysicsServer3D.free_rid(shape_rid)
[/gdscript]
[csharp]
RID shapeRid = PhysicsServer3D.ShapeCreate(PhysicsServer3D.ShapeType.Sphere);
RID shapeRid = PhysicsServer3D.SphereShapeCreate();
float radius = 2.0f;
PhysicsServer3D.ShapeSetData(shapeRid, radius);

View File

@@ -64,7 +64,7 @@
</member>
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" is_bitfield="true" default="0" />
<member name="step" type="float" setter="set_step" getter="get_step" default="0.01">
If greater than 0, [member value] will always be rounded to a multiple of this property's value. If [member rounded] is also [code]true[/code], [member value] will first be rounded to a multiple of this property's value, then rounded to the nearest integer.
If greater than 0, [member value] will always be rounded to a multiple of this property's value above [member min_value]. For example, if [member min_value] is [code]0.1[/code] and step is 0.2, then [member value] is limited to [code]0.1[/code], [code]0.3[/code], [code]0.5[/code], and so on. If [member rounded] is also [code]true[/code], [member value] will first be rounded to a multiple of this property's value, then rounded to the nearest integer.
</member>
<member name="value" type="float" setter="set_value" getter="get_value" default="0.0">
Range's current value. Changing this property (even via code) will trigger [signal value_changed] signal. Use [method set_value_no_signal] if you want to avoid it.