示例#1
0
 public override void Draw(DrawContext dc)
 {
     if (m_inventory != null && m_inventoryDragData != null)
     {
         int slotValue = m_inventoryDragData.Inventory.GetSlotValue(m_inventoryDragData.SlotIndex);
         if (m_inventory.GetSlotProcessCapacity(m_slotIndex, slotValue) >= 0 || m_inventory.GetSlotCapacity(m_slotIndex, slotValue) > 0)
         {
             float       num         = 80f * base.GlobalTransform.Right.Length();
             Vector2     center      = Vector2.Transform(base.ActualSize / 2f, base.GlobalTransform);
             FlatBatch2D flatBatch2D = dc.PrimitivesRenderer2D.FlatBatch(100);
             flatBatch2D.QueueEllipse(center, new Vector2(num), 0f, new Color(0, 0, 0, 96) * base.GlobalColorTransform, 64);
             flatBatch2D.QueueEllipse(center, new Vector2(num - 0.5f), 0f, new Color(0, 0, 0, 64) * base.GlobalColorTransform, 64);
             flatBatch2D.QueueEllipse(center, new Vector2(num + 0.5f), 0f, new Color(0, 0, 0, 48) * base.GlobalColorTransform, 64);
             flatBatch2D.QueueDisc(center, new Vector2(num), 0f, new Color(0, 0, 0, 48) * base.GlobalColorTransform, 64);
         }
     }
     m_inventoryDragData = null;
 }