From 929dccb75a1405737975d76648e015a3e7c00177 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 Oct 2017 23:07:10 -0400 Subject: reorganise repo structure --- src/StardewModdingAPI/Events/GraphicsEvents.cs | 116 ------------------------- 1 file changed, 116 deletions(-) delete mode 100644 src/StardewModdingAPI/Events/GraphicsEvents.cs (limited to 'src/StardewModdingAPI/Events/GraphicsEvents.cs') diff --git a/src/StardewModdingAPI/Events/GraphicsEvents.cs b/src/StardewModdingAPI/Events/GraphicsEvents.cs deleted file mode 100644 index fff51bed..00000000 --- a/src/StardewModdingAPI/Events/GraphicsEvents.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using StardewModdingAPI.Framework; - -namespace StardewModdingAPI.Events -{ - /// Events raised during the game's draw loop, when the game is rendering content to the window. - public static class GraphicsEvents - { - /********* - ** Events - *********/ - /**** - ** Generic events - ****/ - /// Raised after the game window is resized. - public static event EventHandler Resize; - - /**** - ** Main render events - ****/ - /// Raised before drawing the world to the screen. - public static event EventHandler OnPreRenderEvent; - - /// Raised after drawing the world to the screen. - public static event EventHandler OnPostRenderEvent; - - /**** - ** HUD events - ****/ - /// Raised before drawing the HUD (item toolbar, clock, etc) to the screen. The HUD is available at this point, but not necessarily visible. (For example, the event is raised even if a menu is open.) - public static event EventHandler OnPreRenderHudEvent; - - /// Raised after drawing the HUD (item toolbar, clock, etc) to the screen. The HUD is available at this point, but not necessarily visible. (For example, the event is raised even if a menu is open.) - public static event EventHandler OnPostRenderHudEvent; - - /**** - ** GUI events - ****/ - /// Raised before drawing a menu to the screen during a draw loop. This includes the game's internal menus like the title screen. - public static event EventHandler OnPreRenderGuiEvent; - - /// Raised after drawing a menu to the screen during a draw loop. This includes the game's internal menus like the title screen. - public static event EventHandler OnPostRenderGuiEvent; - - - /********* - ** Internal methods - *********/ - /**** - ** Generic events - ****/ - /// Raise a event. - /// Encapsulates monitoring and logging. - internal static void InvokeResize(IMonitor monitor) - { - monitor.SafelyRaisePlainEvent($"{nameof(GraphicsEvents)}.{nameof(GraphicsEvents.Resize)}", GraphicsEvents.Resize?.GetInvocationList()); - } - - /**** - ** Main render events - ****/ - /// Raise an event. - /// Encapsulates monitoring and logging. - internal static void InvokeOnPreRenderEvent(IMonitor monitor) - { - monitor.SafelyRaisePlainEvent($"{nameof(GraphicsEvents)}.{nameof(GraphicsEvents.OnPreRenderEvent)}", GraphicsEvents.OnPreRenderEvent?.GetInvocationList()); - } - - /// Raise an event. - /// Encapsulates monitoring and logging. - internal static void InvokeOnPostRenderEvent(IMonitor monitor) - { - monitor.SafelyRaisePlainEvent($"{nameof(GraphicsEvents)}.{nameof(GraphicsEvents.OnPostRenderEvent)}", GraphicsEvents.OnPostRenderEvent?.GetInvocationList()); - } - - /// Get whether there are any post-render event listeners. - internal static bool HasPostRenderListeners() - { - return GraphicsEvents.OnPostRenderEvent != null; - } - - /**** - ** GUI events - ****/ - /// Raise an event. - /// Encapsulates monitoring and logging. - internal static void InvokeOnPreRenderGuiEvent(IMonitor monitor) - { - monitor.SafelyRaisePlainEvent($"{nameof(GraphicsEvents)}.{nameof(GraphicsEvents.OnPreRenderGuiEvent)}", GraphicsEvents.OnPreRenderGuiEvent?.GetInvocationList()); - } - - /// Raise an event. - /// Encapsulates monitoring and logging. - internal static void InvokeOnPostRenderGuiEvent(IMonitor monitor) - { - monitor.SafelyRaisePlainEvent($"{nameof(GraphicsEvents)}.{nameof(GraphicsEvents.OnPostRenderGuiEvent)}", GraphicsEvents.OnPostRenderGuiEvent?.GetInvocationList()); - } - - /**** - ** HUD events - ****/ - /// Raise an event. - /// Encapsulates monitoring and logging. - internal static void InvokeOnPreRenderHudEvent(IMonitor monitor) - { - monitor.SafelyRaisePlainEvent($"{nameof(GraphicsEvents)}.{nameof(GraphicsEvents.OnPreRenderHudEvent)}", GraphicsEvents.OnPreRenderHudEvent?.GetInvocationList()); - } - - /// Raise an event. - /// Encapsulates monitoring and logging. - internal static void InvokeOnPostRenderHudEvent(IMonitor monitor) - { - monitor.SafelyRaisePlainEvent($"{nameof(GraphicsEvents)}.{nameof(GraphicsEvents.OnPostRenderHudEvent)}", GraphicsEvents.OnPostRenderHudEvent?.GetInvocationList()); - } - } -} -- cgit