Skip to content

Commit

Permalink
docs: fix return values for input, drivers
Browse files Browse the repository at this point in the history
Fixed documented return values for button and text-edit drivers, and
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 6a952c1
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion GodotTestDriver/Drivers/BaseButtonDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public void Press()
/// Clicks the center of the button.
/// </summary>
/// <param name="button">Mouse button.</param>
/// <returns>Task that completes when the click finishes.</returns>
/// <exception cref="InvalidOperationException" />
public override void ClickCenter(MouseButton button = MouseButton.Left)
{
Expand Down
1 change: 0 additions & 1 deletion GodotTestDriver/Drivers/TextEditDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public TextEditDriver(Func<T> producer, string description = "") : base(producer
/// Types the given text into the text edit. Existing text will be overwritten.
/// </summary>
/// <param name="text">Text to input.</param>
/// <returns>Task that completes when the input finishes.</returns>
/// <exception cref="InvalidOperationException" />
public void Type(string text)
{
Expand Down
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 6a952c1

Please sign in to comment.