summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/EventArgsControllerButtonPressed.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Events/EventArgsControllerButtonPressed.cs')
-rw-r--r--src/StardewModdingAPI/Events/EventArgsControllerButtonPressed.cs28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/StardewModdingAPI/Events/EventArgsControllerButtonPressed.cs b/src/StardewModdingAPI/Events/EventArgsControllerButtonPressed.cs
index b51a8a5b..87c96678 100644
--- a/src/StardewModdingAPI/Events/EventArgsControllerButtonPressed.cs
+++ b/src/StardewModdingAPI/Events/EventArgsControllerButtonPressed.cs
@@ -4,15 +4,29 @@ using Microsoft.Xna.Framework.Input;
namespace StardewModdingAPI.Events
{
+ /// <summary>Event arguments for a <see cref="ControlEvents.ControllerButtonPressed"/> event.</summary>
public class EventArgsControllerButtonPressed : EventArgs
{
- public EventArgsControllerButtonPressed(PlayerIndex playerIndex, Buttons buttonPressed)
- {
- PlayerIndex = playerIndex;
- ButtonPressed = buttonPressed;
- }
-
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The player who pressed the button.</summary>
public PlayerIndex PlayerIndex { get; private set; }
+
+ /// <summary>The controller button that was pressed.</summary>
public Buttons ButtonPressed { get; private set; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="playerIndex">The player who pressed the button.</param>
+ /// <param name="button">The controller button that was pressed.</param>
+ public EventArgsControllerButtonPressed(PlayerIndex playerIndex, Buttons button)
+ {
+ this.PlayerIndex = playerIndex;
+ this.ButtonPressed = button;
+ }
}
-} \ No newline at end of file
+}