summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/MenuEvents.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Events/MenuEvents.cs')
-rw-r--r--src/StardewModdingAPI/Events/MenuEvents.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Events/MenuEvents.cs b/src/StardewModdingAPI/Events/MenuEvents.cs
new file mode 100644
index 00000000..fdd96f00
--- /dev/null
+++ b/src/StardewModdingAPI/Events/MenuEvents.cs
@@ -0,0 +1,21 @@
+using System;
+using StardewValley.Menus;
+
+namespace StardewModdingAPI.Events
+{
+ public static class MenuEvents
+ {
+ public static event EventHandler<EventArgsClickableMenuChanged> MenuChanged = delegate { };
+ public static event EventHandler<EventArgsClickableMenuClosed> MenuClosed = delegate { };
+
+ internal static void InvokeMenuChanged(IClickableMenu priorMenu, IClickableMenu newMenu)
+ {
+ MenuChanged.Invoke(null, new EventArgsClickableMenuChanged(priorMenu, newMenu));
+ }
+
+ internal static void InvokeMenuClosed(IClickableMenu priorMenu)
+ {
+ MenuClosed.Invoke(null, new EventArgsClickableMenuClosed(priorMenu));
+ }
+ }
+} \ No newline at end of file