コード例 #1
0
        void UpdateShopStockObject(Tuple <int, int> ItemTup)
        {
            string Cost = "";

            if (ItemTup.Item1 == 1)
            {
                Storage.Campaign.Modules[Storage.ModNum].Shop.AddWeapon(GameObjects.Weapons[ItemTup.Item2]);
                Storage.Campaign.Modules[Storage.ModNum].Shop.ItemType = 0;
                Cost = Convert.ToString(GameObjects.Weapons[ItemTup.Item2].Cost);
            }
            else if (ItemTup.Item1 == 2)
            {
                Storage.Campaign.Modules[Storage.ModNum].Shop.AddArmour(GameObjects.Armour[ItemTup.Item2]);
                Storage.Campaign.Modules[Storage.ModNum].Shop.ItemType = 1;
                Cost = Convert.ToString(GameObjects.Armour[ItemTup.Item2].Cost);
            }
            else if (ItemTup.Item1 == 3)
            {
                Storage.Campaign.Modules[Storage.ModNum].Shop.AddPotion(GameObjects.Potions[ItemTup.Item2]);
                Storage.Campaign.Modules[Storage.ModNum].Shop.ItemType = 2;
                Cost = Convert.ToString(GameObjects.Potions[ItemTup.Item2].Cost);
            }
            GetTextInput GTI = new GetTextInput();

            GTI.MyParent  = this;
            GTI.Textbox   = Cost;
            GTI.LabelText = "Item Cost";
            GTI.Arg       = 1;
            GTI.NumOnly   = true;
            GTI.Show();
        }
コード例 #2
0
        private void renameCampaignToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GetTextInput GTI = new GetTextInput();

            GTI.MyParent  = this;
            GTI.Arg       = 0;
            GTI.Textbox   = Storage.Campaign.Name;
            GTI.LabelText = "Campaign Name";
            GTI.Show();
        }