From d9b5c588fbb4ac07306b3b5ca8c0721677a2b294 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Mon, 13 Nov 2023 10:54:31 -0800 Subject: [PATCH] OnGamepadConnected and OnGamepadDisconnected --- src/Input/Input.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Input/Input.cs b/src/Input/Input.cs index d2ea27e..44434e4 100644 --- a/src/Input/Input.cs +++ b/src/Input/Input.cs @@ -35,6 +35,22 @@ namespace MoonWorks.Input /// public VirtualButton AnyPressedButton { get; private set; } + public delegate void OnGamepadConnectedFunc(); + + /// + /// Called when a game pad has been connected. + /// + /// The slot where the connection occurred. + public OnGamepadConnectedFunc OnGamepadConnected; + + public delegate void OnGamepadDisconnectedFunc(); + + /// + /// Called when a game pad has been disconnected. + /// + /// The slot where the disconnection occurred. + public OnGamepadDisconnectedFunc OnGamepadDisconnected; + internal Inputs() { Keyboard = new Keyboard();