Terraria.UI.ChestUI.DrawButtons C# (CSharp) Method

DrawButtons() private static method

private static DrawButtons ( SpriteBatch spritebatch ) : void
spritebatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void
        private static void DrawButtons(SpriteBatch spritebatch)
        {
            for (int ID = 0; ID < 6; ++ID)
                ChestUI.DrawButton(spritebatch, ID, 506, Main.instance.invBottom + 40);
        }

Usage Example

Ejemplo n.º 1
0
 public static void Draw(SpriteBatch spritebatch)
 {
     if (Main.player[Main.myPlayer].chest != -1 && !Main.recBigList)
     {
         Main.inventoryScale = 0.755f;
         if (Utils.FloatIntersect((float)Main.mouseX, (float)Main.mouseY, 0.0f, 0.0f, 73f, (float)Main.instance.invBottom, 560f * Main.inventoryScale, 224f * Main.inventoryScale))
         {
             Main.player[Main.myPlayer].mouseInterface = true;
         }
         ChestUI.DrawName(spritebatch);
         ChestUI.DrawButtons(spritebatch);
         ChestUI.DrawSlots(spritebatch);
     }
     else
     {
         for (int index = 0; index < 6; ++index)
         {
             ChestUI.ButtonScale[index]   = 0.75f;
             ChestUI.ButtonHovered[index] = false;
         }
     }
 }