2 using Microsoft.Xna.Framework;
3 using Microsoft.Xna.Framework.Graphics;
8 partial class ItemInventory : Inventory
12 base.ControlInput(cam);
28 if (firstSlot ==
null) {
return; }
30 frame.Location += firstSlot.DrawOffset.ToPoint();
44 public override void Draw(SpriteBatch spriteBatch,
bool subInventory =
false)
49 if (container.InventoryBackSprite ==
null)
55 GUI.DrawRectangle(spriteBatch,
BackgroundFrame, Color.Black * 0.8f,
true);
60 container.InventoryBackSprite.Draw(
62 Color.White, Vector2.Zero, 0,
68 base.Draw(spriteBatch, subInventory);
70 if (container.InventoryBottomSprite !=
null && !subInventory)
72 container.InventoryBottomSprite.Draw(spriteBatch,
77 if (container.InventoryTopSprite !=
null && !subInventory)
84 base.Draw(spriteBatch, subInventory);
readonly int capacity
Capacity, or the number of slots in the inventory.
Rectangle BackgroundFrame
void SharedWrite(IWriteMessage msg, Range slotRange)
override void Draw(SpriteBatch spriteBatch, bool subInventory=false)
override void CalculateBackgroundFrame()
void ClientEventWrite(IWriteMessage msg, Item.InventoryStateEventData extraData)
override void ControlInput(Camera cam)