コード例 #1
0
        public InventoryPanel(GameDesktop Desktop)
        {
            Name = "Inventory";
            Bounds = new Rectangle(0, 0, 176, 200);

            for (InventorySlot slot = InventorySlot.First; slot <= InventorySlot.Last; slot++)
            {
                InventoryItemButton InventoryItem = new InventoryItemButton(Viewport, slot)
                {
                    Bounds = GetSlotPosition(slot)
                };
                InventoryItem.Autoresizable = false;
                ContentView.AddSubview(InventoryItem);
            }

            this.Desktop = Desktop;
            Desktop.ActiveViewportChanged += ViewportChanged;
            ViewportChanged(Desktop.ActiveViewport);
        }
コード例 #2
0
        public InventoryPanel(GameDesktop Desktop)
        {
            Name   = "Inventory";
            Bounds = new Rectangle(0, 0, 176, 200);

            for (InventorySlot slot = InventorySlot.First; slot <= InventorySlot.Last; slot++)
            {
                InventoryItemButton InventoryItem = new InventoryItemButton(Viewport, slot)
                {
                    Bounds = GetSlotPosition(slot)
                };
                InventoryItem.Autoresizable = false;
                ContentView.AddSubview(InventoryItem);
            }

            this.Desktop = Desktop;
            Desktop.ActiveViewportChanged += ViewportChanged;
            ViewportChanged(Desktop.ActiveViewport);
        }