Skip to content

Commit

Permalink
Prevent Recalculate spam with ModMenu.UserInterface.
Browse files Browse the repository at this point in the history
(cherry picked from commit 17b4266)
  • Loading branch information
Mirsario committed Jan 7, 2024
1 parent 703dfb8 commit ed6a264
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions patches/tModLoader/Terraria/ModLoader/MenuLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ private static void UpdateAndDrawModMenuInner(SpriteBatch spriteBatch, GameTime
}

currentMenu.UserInterface.Update(gameTime);
// Prevent Recalculate() spam due to Use() in UserInterface.Draw().
UserInterface.ActiveInstance = currentMenu.UserInterface;
currentMenu.UserInterface.Draw(spriteBatch, gameTime);

currentMenu.Update(Main.menuMode == 0);

Texture2D logo = currentMenu.Logo.Value;
Expand Down

0 comments on commit ed6a264

Please sign in to comment.