示例#1
0
        private void setSubFilter(Logic.ItemType type)
        {
            switch (type)
            {
            case SimpleGame.Logic.ItemType.None:
                this.subFilterMode = Logic.ItemType.None;
                if (inventorySubFilter.Visible)
                {
                    this.inventorySubFilter.Hide();
                }
                this.inventorySubFilter.SelectedIndex = 0;
                break;

            case SimpleGame.Logic.ItemType.Weapon:
                this.subFilterMode = Logic.ItemType.Weapon;
                if (!inventorySubFilter.Visible)
                {
                    this.inventorySubFilter.Show();
                }
                this.inventorySubFilter.Items.Clear();
                this.inventorySubFilter.Items.AddRange(new object[]
                {
                    "All",
                    "Small",
                    "Medium",
                    "Large"
                });
                this.inventorySubFilter.SelectedIndex = 0;
                applySubFilter();
                break;

            case SimpleGame.Logic.ItemType.Armour:
                this.subFilterMode = Logic.ItemType.Armour;
                if (!inventorySubFilter.Visible)
                {
                    this.inventorySubFilter.Show();
                }
                this.inventorySubFilter.Items.Clear();
                this.inventorySubFilter.Items.AddRange(new object[]
                {
                    "All",
                    "Head",
                    "Torso",
                    "Hands",
                    "Legs",
                    "Feet"
                });
                this.inventorySubFilter.SelectedIndex = 0;
                applySubFilter();
                break;

            case SimpleGame.Logic.ItemType.Consumable:
                this.subFilterMode = Logic.ItemType.Consumable;
                if (inventorySubFilter.Visible)
                {
                    this.inventorySubFilter.Hide();
                }
                this.inventorySubFilter.SelectedIndex = 0;
                break;

            default:
                break;
            }
        }
示例#2
0
 private void setSubFilter(Logic.ItemType type)
 {
     switch (type)
     {
         case SimpleGame.Logic.ItemType.None:
             this.subFilterMode = Logic.ItemType.None;
             if (inventorySubFilter.Visible)
                 this.inventorySubFilter.Hide();
             this.inventorySubFilter.SelectedIndex = 0;
             break;
         case SimpleGame.Logic.ItemType.Weapon:
             this.subFilterMode = Logic.ItemType.Weapon;
             if (!inventorySubFilter.Visible)
                 this.inventorySubFilter.Show();
             this.inventorySubFilter.Items.Clear();
             this.inventorySubFilter.Items.AddRange(new object[]
             {
                 "All",
                 "Small",
                 "Medium",
                 "Large"
             });
             this.inventorySubFilter.SelectedIndex = 0;
             applySubFilter();
             break;
         case SimpleGame.Logic.ItemType.Armour:
             this.subFilterMode = Logic.ItemType.Armour;
             if (!inventorySubFilter.Visible)
                 this.inventorySubFilter.Show();
             this.inventorySubFilter.Items.Clear();
             this.inventorySubFilter.Items.AddRange(new object[]
             {
                 "All",
                 "Head",
                 "Torso",
                 "Hands",
                 "Legs",
                 "Feet"
             });
             this.inventorySubFilter.SelectedIndex = 0;
             applySubFilter();
             break;
         case SimpleGame.Logic.ItemType.Consumable:
             this.subFilterMode = Logic.ItemType.Consumable;
             if (inventorySubFilter.Visible)
                 this.inventorySubFilter.Hide();
             this.inventorySubFilter.SelectedIndex = 0;
             break;
         default:
             break;
     }
 }