From d127436533fba5168a89501f5b442b6575ed3723 Mon Sep 17 00:00:00 2001 From: Zoryn Aaron Date: Sun, 27 Mar 2016 01:32:15 -0400 Subject: fixes bugs --- StardewModdingAPI/Events/Graphics.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'StardewModdingAPI/Events') diff --git a/StardewModdingAPI/Events/Graphics.cs b/StardewModdingAPI/Events/Graphics.cs index a2e7fc40..2b91144a 100644 --- a/StardewModdingAPI/Events/Graphics.cs +++ b/StardewModdingAPI/Events/Graphics.cs @@ -8,6 +8,14 @@ namespace StardewModdingAPI.Events public static event EventHandler DrawTick = delegate { }; public static event EventHandler DrawInRenderTargetTick = delegate { }; + /// + /// Draws when SGame.Debug is true. F3 toggles this. + /// Game1.spriteBatch.Begin() is pre-called. + /// Do not make end or begin calls to the spritebatch. + /// If you are only trying to add debug information, use SGame.DebugMessageQueue in your Update loop. + /// + public static event EventHandler DrawDebug = delegate { }; + public static void InvokeDrawTick() { try @@ -29,5 +37,10 @@ namespace StardewModdingAPI.Events { Resize.Invoke(sender, e); } + + public static void InvokeDrawDebug(object sender, EventArgs e) + { + DrawDebug.Invoke(sender, e); + } } } \ No newline at end of file -- cgit