예제 #1
0
        public override void UpdateUI(GameTime gameTime)
        {
            base.UpdateUI(gameTime);

            if (Main.netMode == 1 && ModContent.GetInstance <CheatSheetServerConfig>().DisableCheatsForNonHostUsers&& !IsPlayerLocalServerOwner(Main.LocalPlayer))
            {
                return;
            }

            if (PaintToolsEx.schematicsToLoad != null && numberOnlineToLoad > 0 && CheatSheet.instance.paintToolsUI.view.childrenToRemove.Count == 0)
            {
                PaintToolsEx.LoadSingleSchematic();
                //CheatSheet.instance.paintToolsUI.view.ReorderSlots();
            }

            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;
                    }
                }
                if (!oneUpdated)
                {
                    PaintToolsSlot.updateNeeded = false;
                }
            }
        }
예제 #2
0
        public override void UpdateUI(GameTime gameTime)
        {
            base.UpdateUI(gameTime);

            if (PaintToolsEx.schematicsToLoad != null && numberOnlineToLoad > 0 && CheatSheet.instance.paintToolsUI.view.childrenToRemove.Count == 0)
            {
                PaintToolsEx.LoadSingleSchematic();
                //CheatSheet.instance.paintToolsUI.view.ReorderSlots();
            }

            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;
                    }
                }
                if (!oneUpdated)
                {
                    PaintToolsSlot.updateNeeded = false;
                }
            }
        }