Skip to content

Commit

Permalink
docs: fix action, mouse extensions return values
Browse files Browse the repository at this point in the history
Fixed documented return values for action and mouse input extensions
to reflect that they are now void instead of returning Tasks.
  • Loading branch information
wlsnmrk committed Jan 22, 2024
1 parent aca85b3 commit e5cd58d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
6 changes: 1 addition & 5 deletions GodotTestDriver/Input/ActionsControlExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ string actionName
/// </summary>
/// <param name="node">Node to supply input to.</param>
/// <param name="actionName">Name of the action.</param>
/// <param name="strength">Action strength (optional — default is 1.0).
/// </param>
/// <returns>Task that completes when the input finishes.</returns>
/// <param name="strength">Action strength (optional — default is 1.0).</param>
public static void StartAction(
this Node node, string actionName, float strength = 1f
)
Expand All @@ -57,8 +55,6 @@ public static void StartAction(
/// </summary>
/// <param name="node">Node to supply input to.</param>
/// <param name="actionName">Name of the action.</param>

/// <returns>Task that completes when the input finishes.</returns>
public static void EndAction(this Node node, string actionName)
{
Input.ParseInputEvent(new InputEventAction
Expand Down
5 changes: 0 additions & 5 deletions GodotTestDriver/Input/MouseControlExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public static class MouseControlExtensions
/// <param name="viewport">Viewport.</param>
/// <param name="position">Position, in viewport coordinates.</param>
/// <param name="button">Mouse button.</param>
/// <returns>Task that completes when the input finishes.</returns>
public static void ClickMouseAt(this Viewport viewport, Vector2 position, MouseButton button = MouseButton.Left)
{
viewport.PressMouseAt(position, button);
Expand All @@ -27,7 +26,6 @@ public static void ClickMouseAt(this Viewport viewport, Vector2 position, MouseB
/// </summary>
/// <param name="viewport">Viewport.</param>
/// <param name="position">Position, in viewport coordinates.</param>
/// <returns>Task that completes when the input finishes.</returns>
public static void MoveMouseTo(this Viewport viewport, Vector2 position)
{
var oldPosition = viewport.GetMousePosition();
Expand All @@ -49,7 +47,6 @@ public static void MoveMouseTo(this Viewport viewport, Vector2 position)
/// <param name="start">Start position, in viewport coordinates.</param>
/// <param name="end">End position, in viewport coordinates.</param>
/// <param name="button">Mouse button.</param>
/// <returns>Task that completes when the input finishes.</returns>
public static void DragMouse(this Viewport viewport, Vector2 start, Vector2 end, MouseButton button = MouseButton.Left)
{
viewport.PressMouseAt(start, button);
Expand All @@ -61,7 +58,6 @@ public static void DragMouse(this Viewport viewport, Vector2 start, Vector2 end,
/// </summary>
/// <param name="_">Viewport.</param>
/// <param name="button">Mouse button (left by default).</param>
/// <returns>Task that completes when the input finishes.</returns>
public static void PressMouse(this Viewport _, MouseButton button = MouseButton.Left)
{
var action = new InputEventMouseButton
Expand All @@ -78,7 +74,6 @@ public static void PressMouse(this Viewport _, MouseButton button = MouseButton.
/// </summary>
/// <param name="_">Viewport.</param>
/// <param name="button">Mouse button (left by default).</param>
/// <returns>Task that completes when the input finishes.</returns>
public static void ReleaseMouse(this Viewport _, MouseButton button = MouseButton.Left)
{
var action = new InputEventMouseButton
Expand Down

0 comments on commit e5cd58d

Please sign in to comment.