From d5322bc1bb789b974d00f8fcbe61e201c9b030b8 Mon Sep 17 00:00:00 2001 From: Zoryn Aaron Date: Mon, 4 Apr 2016 06:25:09 -0400 Subject: graphics events for rendering --- StardewModdingAPI/Inheritance/SGame.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'StardewModdingAPI/Inheritance') diff --git a/StardewModdingAPI/Inheritance/SGame.cs b/StardewModdingAPI/Inheritance/SGame.cs index 9cf204b8..2e6dc909 100644 --- a/StardewModdingAPI/Inheritance/SGame.cs +++ b/StardewModdingAPI/Inheritance/SGame.cs @@ -1219,6 +1219,8 @@ namespace StardewModdingAPI.Inheritance { drawBillboard(); } + + GraphicsEvents.InvokeOnPreRenderHudEventNoCheck(null, EventArgs.Empty); if ((displayHUD || eventUp) && currentBillboard == 0 && gameMode == 3 && !freezeControls && !panMode) { GraphicsEvents.InvokeOnPreRenderHudEvent(null, EventArgs.Empty); @@ -1231,6 +1233,8 @@ namespace StardewModdingAPI.Inheritance { spriteBatch.Draw(mouseCursors, new Vector2(getOldMouseX(), getOldMouseY()), getSourceRectForStandardTileSheet(mouseCursors, 0, 16, 16), Color.White, 0f, Vector2.Zero, 4f + dialogueButtonScale / 150f, SpriteEffects.None, 1f); } + GraphicsEvents.InvokeOnPostRenderHudEventNoCheck(null, EventArgs.Empty); + if (hudMessages.Any() && (!eventUp || isFestival())) { for (int l = hudMessages.Count - 1; l >= 0; l--) @@ -1299,6 +1303,8 @@ namespace StardewModdingAPI.Inheritance { spriteBatch.DrawString(smallFont, keyHelpString, new Vector2(tileSize, viewport.Height - tileSize - (dialogueUp ? (tileSize * 3 + (isQuestion ? (questionChoices.Count * tileSize) : 0)) : 0) - smallFont.MeasureString(keyHelpString).Y), Color.LightGray, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0.9999999f); } + + GraphicsEvents.InvokeOnPreRenderGuiEventNoCheck(null, EventArgs.Empty); if (activeClickableMenu != null) { GraphicsEvents.InvokeOnPreRenderGuiEvent(null, EventArgs.Empty); @@ -1309,6 +1315,7 @@ namespace StardewModdingAPI.Inheritance { farmEvent?.drawAboveEverything(spriteBatch); } + GraphicsEvents.InvokeOnPostRenderGuiEventNoCheck(null, EventArgs.Empty); GraphicsEvents.InvokeOnPostRenderEvent(null, EventArgs.Empty); spriteBatch.End(); -- cgit