summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Events.cs
diff options
context:
space:
mode:
authorZoryn Aaron <zoryn4163@gmail.com>2016-03-01 17:22:19 -0500
committerZoryn Aaron <zoryn4163@gmail.com>2016-03-01 17:22:19 -0500
commitc7ecc201bbd5cc18c52f173ae550ea42743b53fb (patch)
tree7ee2d57748256a3fce66c729a248bfb0c3cea606 /StardewModdingAPI/Events.cs
parentad683d0a0ff26c23a0c6a2c6ef160a5b6c773411 (diff)
downloadSMAPI-c7ecc201bbd5cc18c52f173ae550ea42743b53fb.tar.gz
SMAPI-c7ecc201bbd5cc18c52f173ae550ea42743b53fb.tar.bz2
SMAPI-c7ecc201bbd5cc18c52f173ae550ea42743b53fb.zip
partial implement of Required event handlers
Diffstat (limited to 'StardewModdingAPI/Events.cs')
-rw-r--r--StardewModdingAPI/Events.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/StardewModdingAPI/Events.cs b/StardewModdingAPI/Events.cs
index e0cfc9ce..05cabc4b 100644
--- a/StardewModdingAPI/Events.cs
+++ b/StardewModdingAPI/Events.cs
@@ -19,12 +19,15 @@ namespace StardewModdingAPI
public static event BlankEventHandler UpdateTick = delegate { };
public static event BlankEventHandler DrawTick = delegate { };
- public delegate void StateChanged(KeyboardState newState);
- public static event StateChanged KeyboardChanged = delegate { };
+ public delegate void KStateChanged(KeyboardState newState);
+ public static event KStateChanged KeyboardChanged = delegate { };
public delegate void KeyStateChanged(Keys key);
public static event KeyStateChanged KeyPressed = delegate { };
+ public delegate void MStateChanged(MouseState newState);
+ public static event MStateChanged MouseChanged = delegate { };
+
public delegate void ClickableMenuChanged(IClickableMenu newMenu);
public static event ClickableMenuChanged MenuChanged = delegate { };
@@ -34,6 +37,8 @@ namespace StardewModdingAPI
public delegate void CurrentLocationsChanged(GameLocation newLocation);
public static event CurrentLocationsChanged CurrentLocationChanged = delegate { };
+ public static event EventHandler Resize = delegate { };
+
public static void InvokeGameLoaded()
{
GameLoaded.Invoke();
@@ -92,6 +97,11 @@ namespace StardewModdingAPI
KeyboardChanged.Invoke(newState);
}
+ public static void InvokeMouseChanged(MouseState newState)
+ {
+ MouseChanged.Invoke(newState);
+ }
+
public static void InvokeKeyPressed(Keys key)
{
KeyPressed.Invoke(key);
@@ -111,5 +121,10 @@ namespace StardewModdingAPI
{
CurrentLocationChanged.Invoke(newLocation);
}
+
+ public static void InvokeResize(object sender, EventArgs e)
+ {
+ Resize.Invoke(sender, e);
+ }
}
}