summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Events
diff options
context:
space:
mode:
Diffstat (limited to 'StardewModdingAPI/Events')
-rw-r--r--StardewModdingAPI/Events/EventArgs.cs10
-rw-r--r--StardewModdingAPI/Events/Menu.cs6
2 files changed, 16 insertions, 0 deletions
diff --git a/StardewModdingAPI/Events/EventArgs.cs b/StardewModdingAPI/Events/EventArgs.cs
index d057796a..2bce964e 100644
--- a/StardewModdingAPI/Events/EventArgs.cs
+++ b/StardewModdingAPI/Events/EventArgs.cs
@@ -108,6 +108,16 @@ namespace StardewModdingAPI.Events
public IClickableMenu PriorMenu { get; private set; }
}
+ public class EventArgsClickableMenuClosed : EventArgs
+ {
+ public EventArgsClickableMenuClosed(IClickableMenu priorMenu)
+ {
+ PriorMenu = priorMenu;
+ }
+
+ public IClickableMenu PriorMenu { get; private set; }
+ }
+
public class EventArgsGameLocationsChanged : EventArgs
{
public EventArgsGameLocationsChanged(List<GameLocation> newLocations)
diff --git a/StardewModdingAPI/Events/Menu.cs b/StardewModdingAPI/Events/Menu.cs
index 466a364e..0e043780 100644
--- a/StardewModdingAPI/Events/Menu.cs
+++ b/StardewModdingAPI/Events/Menu.cs
@@ -6,10 +6,16 @@ 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