diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-19 01:02:07 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-02-19 01:02:07 -0500 |
commit | b2efd34fec00a952cd7d2ebdc02a2c2be506380e (patch) | |
tree | a5841e829288dd6958fa1d1422b37090fd21da12 /src/StardewModdingAPI/Events/GraphicsEvents.cs | |
parent | e321362378eaacd0081db44f0db3ef457ef97368 (diff) | |
download | SMAPI-b2efd34fec00a952cd7d2ebdc02a2c2be506380e.tar.gz SMAPI-b2efd34fec00a952cd7d2ebdc02a2c2be506380e.tar.bz2 SMAPI-b2efd34fec00a952cd7d2ebdc02a2c2be506380e.zip |
fix on-post-render graphics event being raised after screen is rendered
This causes mods to draw on top of the rendered screen instead of within it, which leads to strange bugs like cursor coordinates not lining up with the cursor and transparency issues.
Diffstat (limited to 'src/StardewModdingAPI/Events/GraphicsEvents.cs')
-rw-r--r-- | src/StardewModdingAPI/Events/GraphicsEvents.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Events/GraphicsEvents.cs b/src/StardewModdingAPI/Events/GraphicsEvents.cs index d9d57a8d..25b976f1 100644 --- a/src/StardewModdingAPI/Events/GraphicsEvents.cs +++ b/src/StardewModdingAPI/Events/GraphicsEvents.cs @@ -75,6 +75,12 @@ namespace StardewModdingAPI.Events monitor.SafelyRaisePlainEvent($"{nameof(GraphicsEvents)}.{nameof(GraphicsEvents.OnPostRenderEvent)}", GraphicsEvents.OnPostRenderEvent?.GetInvocationList()); } + /// <summary>Get whether there are any post-render event listeners.</summary> + internal static bool HasPostRenderListeners() + { + return GraphicsEvents.OnPostRenderEvent != null; + } + /**** ** GUI events ****/ |