From 7b04028ca9d58bc924e31d5987936ecf61a96e6f Mon Sep 17 00:00:00 2001 From: JavidPack Date: Sun, 3 Jun 2018 15:04:16 -0600 Subject: [PATCH] more performance --- CheatSheet.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CheatSheet.cs b/CheatSheet.cs index 055f535..5177626 100644 --- a/CheatSheet.cs +++ b/CheatSheet.cs @@ -242,14 +242,18 @@ public override void UpdateUI(GameTime gameTime) if (PaintToolsSlot.updateNeeded) { + bool oneUpdated = false; foreach (var item in paintToolsUI.view.slotList) { if(item.texture == Main.magicPixel) { item.texture = item.MakeThumbnail(item.stampInfo); + oneUpdated = true; + break; } } - PaintToolsSlot.updateNeeded = false; + if(!oneUpdated) + PaintToolsSlot.updateNeeded = false; } }