Skip to content

Commit

Permalink
more performance
Browse files Browse the repository at this point in the history
  • Loading branch information
JavidPack committed Jun 3, 2018
1 parent a4f1d7d commit 7b04028
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CheatSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 7b04028

Please sign in to comment.