Exemple #1
0
        public Worship(Widget parent) : base(parent)
        {
            lblTitle           = new Label(this, Fonts.LabelText);
            lblTitle.TextAlign = TextAlign.Center;

            for (int i = 0; i < wishes.Length; i++)
            {
                var inv = new InventoryWidget(this);
                inv.Move(3 + i * 31, 122);
                inv.SetInventorySize(1, 1);
                wishes[i] = new ItemWidget(inv, null);
                wishes[i].Move(1, 1);
                wishes[i].Visible = false;
            }

            var btnForfeit = new Button(this, 80);

            btnForfeit.Text = "Forfeit";
            btnForfeit.Move(10, 160);
            btnForfeit.Click += () => Forfeit.Raise();

            lblNumen      = new Label(this, Fonts.LabelText);
            lblNumen.Text = "0";

            this.Resize(100, 200);
        }
Exemple #2
0
 public Equipory(Widget parent, GobCache gobCache) : base(parent, "Equipment")
 {
     this.gobCache = gobCache;
     this.gobId    = -1;
     this.items    = new ItemWidget[slotPositions.Length];
     for (int i = 0; i < slotPositions.Length; i++)
     {
         int slotIndex = i;
         var inv       = new InventoryWidget(this);
         inv.Move(slotPositions[i]);
         inv.SetInventorySize(1, 1);
         inv.Drop += (p) => Drop.Raise(slotIndex);
     }
     Pack();
 }
Exemple #3
0
        public void AddOutput(Item item)
        {
            var inv = new InventoryWidget(this);

            inv.SetInventorySize(1, 1);
            var itemWidget = new ItemWidget(inv, null);

            itemWidget.Item = item;

            int column = outputLayout.ColumnCount;

            outputLayout.AddWidget(inv, 0, column);
            outputLayout.SetColumnWidth(column, 31);
            outputLayout.UpdateGeometry(50, 65, 0, 0);

            outputs.Add(inv);
        }