示例#1
0
 void LoadInventory()
 {
     SdlDotNet.Graphics.Font font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
     lstInv.Items.Clear();
     for (int i = 1; i < Players.PlayerManager.MyPlayer.Inventory.Length; i++)
     {
         if (Players.PlayerManager.MyPlayer.Inventory[i].Num > 0)
         {
             string itemName = Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.Inventory[i].Num].Name;
             if (Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.Inventory[i].Num].Type == Enums.ItemType.Currency || Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.Inventory[i].Num].StackCap > 0)
             {
                 itemName += " (" + Players.PlayerManager.MyPlayer.Inventory[i].Value + ")";
             }
             if (!string.IsNullOrEmpty(itemName))
             {
                 if (lstInv.Items.Count <= i - 1)
                 {
                     ListBoxTextItem item = new ListBoxTextItem(font, itemName);
                     item.Tag = i;
                     lstInv.Items.Add(item);
                 }
                 else
                 {
                     ((ListBoxTextItem)lstInv.Items[i - 1]).Text = itemName;
                 }
             }
         }
     }
 }
示例#2
0
        public void UpdateMember(int index, Enums.GuildRank rank)
        {
            Color color;

            switch (rank)
            {
            case Enums.GuildRank.Member:
                color = Color.LightSkyBlue;
                break;

            case Enums.GuildRank.Admin:
                color = Color.Yellow;
                break;

            case Enums.GuildRank.Founder:
                color = Color.LawnGreen;
                break;

            default:
                color = Color.Red;
                break;
            }
            string          name    = ((ListBoxTextItem)lbxMembers.Items[index]).Text.Split(']')[1];
            ListBoxTextItem lbiName = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "[" + rank + "] " + name);

            ranks[index] = rank;
            ((ListBoxTextItem)lbxMembers.Items[index]).ForeColor = color;
            ((ListBoxTextItem)lbxMembers.Items[index]).Text      = "[" + rank + "] " + name;

            Refresh();
        }
示例#3
0
        void btnAddEnemy_Click(object sender, MouseButtonEventArgs e)
        {
            missionPool.Enemies.Add(nudNpcNum.Value);

            ListBoxTextItem lbiEnemy = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), missionPool.Enemies.Count + ": NPC #" + missionPool.Enemies[missionPool.Enemies.Count - 1] + ", " + Npc.NpcHelper.Npcs[missionPool.Enemies[missionPool.Enemies.Count - 1]].Name);

            lbxMissionEnemies.Items.Add(lbiEnemy);
        }
示例#4
0
        void LoadPartyFromPacket(string[] parse)
        {
            int count = parse[1].ToInt();

            for (int i = 0; i < count; i++)
            {
                ListBoxTextItem lbiName = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), parse[i + 2]);
                lbxMembers.Items.Add(lbiName);
            }
        }
示例#5
0
 public void LoadHelpTopics()
 {
     string[] dirs = System.IO.Directory.GetDirectories(IO.Paths.StartupPath + "Help");
     for (int i = 0; i < dirs.Length; i++)
     {
         ListBoxTextItem lbi = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), System.IO.Path.GetFileNameWithoutExtension(dirs[i]));
         lbi.ForeColor = Color.WhiteSmoke;
         lstHelpTopics.Items.Add(lbi);
     }
 }
示例#6
0
        public void AddMember(string name)
        {
            Color           color   = Color.LightSkyBlue;
            ListBoxTextItem lbiName = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "[" + Enums.GuildRank.Member + "] " + name + " (NEW)");

            ranks.Add(Enums.GuildRank.Member);
            lbiName.ForeColor = color;
            lbxMembers.Items.Add(lbiName);

            Refresh();
        }
示例#7
0
        void btnAddMissionClient_Click(object sender, MouseButtonEventArgs e)
        {
            Logic.Editors.Missions.EditableMissionClient client = new Logic.Editors.Missions.EditableMissionClient();
            client.DexNum  = nudDexNum.Value;
            client.FormNum = nudFormNum.Value;

            missionPool.Clients.Add(client);

            ListBoxTextItem lbiClient = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), missionPool.Clients.Count + ": #" + client.DexNum + " " + Pokedex.PokemonHelper.Pokemon[client.DexNum - 1].Name + " (Form: " + client.FormNum + ")");

            lbxMissionClients.Items.Add(lbiClient);
        }
示例#8
0
        public void AddEntries()
        {
            string[] messageArray = Logic.Logs.BattleLog.Messages.ToArray();
            Color[]  colorArray   = Logic.Logs.BattleLog.MessageColor.ToArray();

            for (int i = 0; i < messageArray.Length; i++)
            {
                ListBoxTextItem item = new ListBoxTextItem(FontManager.LoadFont("PMDCP", 16), messageArray[i]);
                item.ForeColor = colorArray[i];
                lstBattleEntries.Items.Add(item);
            }
        }
示例#9
0
 void btnRemoveItem_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxMissionRewards.SelectedIndex > -1)
     {
         missionPool.Rewards.RemoveAt(lbxMissionRewards.SelectedIndex);
         lbxMissionRewards.Items.Clear();
         for (int rewards = 0; rewards < missionPool.Rewards.Count; rewards++)
         {
             ListBoxTextItem lbiReward = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), (rewards + 1) + ": " + Items.ItemHelper.Items[missionPool.Rewards[rewards].ItemNum].Name + " x" + missionPool.Rewards[rewards].ItemAmount + " (Tag: " + missionPool.Rewards[rewards].ItemTag + ")");
             lbxMissionRewards.Items.Add(lbiReward);
         }
     }
 }
示例#10
0
        void btnAddItem_Click(object sender, MouseButtonEventArgs e)
        {
            Logic.Editors.Missions.EditableMissionReward reward = new Logic.Editors.Missions.EditableMissionReward();
            reward.ItemNum    = nudItemNum.Value;
            reward.ItemAmount = nudItemAmount.Value;
            reward.ItemTag    = txtItemTag.Text;

            missionPool.Rewards.Add(reward);

            ListBoxTextItem lbiReward = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), missionPool.Rewards.Count + ": " + Items.ItemHelper.Items[reward.ItemNum].Name + " x" + reward.ItemAmount + " (Tag: " + reward.ItemTag + ")");

            lbxMissionRewards.Items.Add(lbiReward);
        }
示例#11
0
 void btnRemoveMissionClient_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxMissionClients.SelectedIndex > -1)
     {
         missionPool.Clients.RemoveAt(lbxMissionClients.SelectedIndex);
         lbxMissionClients.Items.Clear();
         for (int clients = 0; clients < missionPool.Clients.Count; clients++)
         {
             ListBoxTextItem lbiClient = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), (clients + 1) + ": #" + missionPool.Clients[clients].DexNum + " " + Pokedex.PokemonHelper.Pokemon[missionPool.Clients[clients].DexNum - 1].Name + " (Form: " + missionPool.Clients[clients].FormNum + ")");
             lbxMissionClients.Items.Add(lbiClient);
         }
     }
 }
示例#12
0
 void btnRemoveScript_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxDungeonScripts.SelectedIndex > -1)
     {
         dungeon.ScriptList.RemoveAt(lbxDungeonScripts.SelectedIndex);
         lbxDungeonScripts.Items.Clear();
         for (int scripts = 0; scripts < dungeon.ScriptList.Count; scripts++)
         {
             ListBoxTextItem lbiScript = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), dungeon.ScriptList.KeyByIndex(scripts) + ": " + dungeon.ScriptList.ValueByIndex(scripts));
             lbxDungeonScripts.Items.Add(lbiScript);
         }
     }
 }
示例#13
0
 void btnRemoveEnemy_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxMissionEnemies.SelectedIndex > -1)
     {
         missionPool.Enemies.RemoveAt(lbxMissionEnemies.SelectedIndex);
         lbxMissionEnemies.Items.Clear();
         for (int enemies = 0; enemies < missionPool.Enemies.Count; enemies++)
         {
             ListBoxTextItem lbiEnemy = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), (enemies + 1) + ": NPC #" + missionPool.Enemies[enemies] + ", " + Npc.NpcHelper.Npcs[missionPool.Enemies[enemies]].Name);
             lbxMissionEnemies.Items.Add(lbiEnemy);
         }
     }
 }
示例#14
0
 void btnAddScript_Click(object sender, MouseButtonEventArgs e)
 {
     if (dungeon.ScriptList.ContainsKey(nudScriptNum.Value))
     {
         dungeon.ScriptList.RemoveAtKey(nudScriptNum.Value);
     }
     dungeon.ScriptList.Add(nudScriptNum.Value, txtScriptParam.Text);
     lbxDungeonScripts.Items.Clear();
     for (int scripts = 0; scripts < dungeon.ScriptList.Count; scripts++)
     {
         ListBoxTextItem lbiScript = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), dungeon.ScriptList.KeyByIndex(scripts) + ": " + dungeon.ScriptList.ValueByIndex(scripts));
         lbxDungeonScripts.Items.Add(lbiScript);
     }
 }
示例#15
0
        void btnAddRMap_Click(object sender, MouseButtonEventArgs e)
        {
            for (int i = nudRDungeonFloor.Value; i <= nudRDungeonFloorEnd.Value; i++)
            {
                int index = DungeonFloorIndex(nudRDungeonIndex.Value - 1, i - 1);
                if (index > -1)
                {
                    dungeon.RandomMaps.RemoveAt(index);
                }
            }

            lbxDungeonRMaps.Items.Clear();
            for (int maps = 0; maps < dungeon.RandomMaps.Count; maps++)
            {
                string mapText;
                if (dungeon.RandomMaps[maps].IsBadGoalMap)
                {
                    mapText = (maps + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(dungeon.RandomMaps[maps].Difficulty) + "] Dun #" + (dungeon.RandomMaps[maps].RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[dungeon.RandomMaps[maps].RDungeonIndex].Name + ") " + (dungeon.RandomMaps[maps].RDungeonFloor + 1) + "F";
                }
                else
                {
                    mapText = (maps + 1) + ": [" + Missions.MissionManager.DifficultyToString(dungeon.RandomMaps[maps].Difficulty) + "] Dun #" + (dungeon.RandomMaps[maps].RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[dungeon.RandomMaps[maps].RDungeonIndex].Name + ") " + (dungeon.RandomMaps[maps].RDungeonFloor + 1) + "F";
                }
                ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
                lbxDungeonRMaps.Items.Add(lbiMap);
            }

            for (int i = nudRDungeonFloor.Value; i <= nudRDungeonFloorEnd.Value; i++)
            {
                Logic.Editors.Dungeons.EditableRandomDungeonMap map = new Logic.Editors.Dungeons.EditableRandomDungeonMap();
                map.RDungeonIndex = nudRDungeonIndex.Value - 1;
                map.RDungeonFloor = i - 1;
                map.Difficulty    = (Enums.JobDifficulty)nudRMapDifficulty.Value;
                map.IsBadGoalMap  = chkRMapBad.Checked;

                dungeon.RandomMaps.Add(map);

                string mapText;
                if (map.IsBadGoalMap)
                {
                    mapText = (lbxDungeonRMaps.Items.Count + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Dun #" + (map.RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[map.RDungeonIndex].Name + ") " + (map.RDungeonFloor + 1) + "F";
                }
                else
                {
                    mapText = (lbxDungeonRMaps.Items.Count + 1) + ": [" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Dun #" + (map.RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[map.RDungeonIndex].Name + ") " + (map.RDungeonFloor + 1) + "F";
                }
                ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
                lbxDungeonRMaps.Items.Add(lbiMap);
            }
        }
示例#16
0
        public kitMapReport(string name)
            : base(name)
        {
            enabled        = true;
            base.BackColor = Color.Transparent;

            lstMaps             = new ListBox("lstMaps");
            lstMaps.Location    = new Point(5, 5);
            lstMaps.MultiSelect = false;
            lstMaps.Height      = 300;
            for (int i = 0; i < 10; i++)
            {
                ListBoxTextItem lbiMaps = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "");//(i + 1) + ": " + MapName);
                lstMaps.Items.Add(lbiMaps);
            }

            vsbMaps = new VScrollBar("vsbMaps");
            vsbMaps.ValueChanged += new EventHandler <ValueChangedEventArgs>(vsbMaps_ValueChanged);
            vsbMaps.Maximum       = 0;

            btnLoadMapNames      = new Button("btnLoadMapNames");
            btnLoadMapNames.Size = new Size(100, 30);
            btnLoadMapNames.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            btnLoadMapNames.Text = "Load Maps";
            Skins.SkinManager.LoadButtonGui(btnLoadMapNames);
            btnLoadMapNames.Click += new EventHandler <MouseButtonEventArgs>(btnLoadMapNames_Click);

            lblFindMap           = new Label("lblFindMap");
            lblFindMap.Font      = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            lblFindMap.AutoSize  = true;
            lblFindMap.Text      = "Search for maps";
            lblFindMap.ForeColor = Color.WhiteSmoke;
            lblFindMap.Hide();

            txtFindMap          = new TextBox("txtFindMap");
            txtFindMap.KeyDown += new EventHandler <SdlDotNet.Input.KeyboardEventArgs>(txtFindMap_KeyDown);
            txtFindMap.Hide();

            lstFindResults             = new ListBox("lstFindResults");
            lstFindResults.MultiSelect = false;
            lstFindResults.Hide();

            this.AddWidget(lstMaps);
            this.AddWidget(vsbMaps);
            this.AddWidget(btnLoadMapNames);
            this.AddWidget(lblFindMap);
            this.AddWidget(txtFindMap);
            this.AddWidget(lstFindResults);
        }
示例#17
0
        public kitMapReport(string name)
            : base(name)
        {
            enabled = true;
            base.BackColor = Color.Transparent;

            lstMaps = new ListBox("lstMaps");
            lstMaps.Location = new Point(5, 5);
            lstMaps.MultiSelect = false;
            lstMaps.Height = 300;
            for (int i = 0; i < 10; i++) {
                ListBoxTextItem lbiMaps = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "");//(i + 1) + ": " + MapName);
                lstMaps.Items.Add(lbiMaps);
            }

            vsbMaps = new VScrollBar("vsbMaps");
            vsbMaps.ValueChanged += new EventHandler<ValueChangedEventArgs>(vsbMaps_ValueChanged);
            vsbMaps.Maximum = 0;

            btnLoadMapNames = new Button("btnLoadMapNames");
            btnLoadMapNames.Size = new Size(100, 30);
            btnLoadMapNames.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            btnLoadMapNames.Text = "Load Maps";
            Skins.SkinManager.LoadButtonGui(btnLoadMapNames);
            btnLoadMapNames.Click += new EventHandler<MouseButtonEventArgs>(btnLoadMapNames_Click);

            lblFindMap = new Label("lblFindMap");
            lblFindMap.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            lblFindMap.AutoSize = true;
            lblFindMap.Text = "Search for maps";
            lblFindMap.ForeColor = Color.WhiteSmoke;
            lblFindMap.Hide();

            txtFindMap = new TextBox("txtFindMap");
            txtFindMap.KeyDown += new EventHandler<SdlDotNet.Input.KeyboardEventArgs>(txtFindMap_KeyDown);
            txtFindMap.Hide();

            lstFindResults = new ListBox("lstFindResults");
            lstFindResults.MultiSelect = false;
            lstFindResults.Hide();

            this.AddWidget(lstMaps);
            this.AddWidget(vsbMaps);
            this.AddWidget(btnLoadMapNames);
            this.AddWidget(lblFindMap);
            this.AddWidget(txtFindMap);
            this.AddWidget(lstFindResults);
        }
示例#18
0
        public void AddOnlinePlayers(string[] parse)
        {
            lblLoading.Visible = false;
            int count = parse[1].ToInt();

            int n = 2;

            for (int i = 0; i < count; i++)
            {
                ListBoxTextItem item = new ListBoxTextItem(FontManager.LoadFont("PMU", 16), parse[i + n]);
                item.ForeColor = Color.WhiteSmoke;
                lstOnlinePlayers.Items.Add(item);
            }

            lblTotal.Text = count + " Players Online";
        }
示例#19
0
        public void AddOnlinePlayers(string[] parse)
        {
            lblLoading.Visible = false;
            int count = parse[1].ToInt();

            int n = 2;

            for (int i = 0; i < count; i++)
            {
                // Try not to be too impressed... ;)
                ListBoxTextItem item = new ListBoxTextItem(FontManager.LoadFont("PMDCP", 16), parse[n++]);
                item.ForeColor = Color.FromArgb(parse[n++].ToInt());
                n++;
                lstOnlinePlayers.Items.Add(item);
            }

            lblTotal.Text = count + " Players Online";
        }
示例#20
0
        void btnAddSMap_Click(object sender, MouseButtonEventArgs e)
        {
            if (MapIndex(nudMapNum.Value) > -1)
            {
                dungeon.StandardMaps.RemoveAt(MapIndex(nudMapNum.Value));
                lbxDungeonSMaps.Items.Clear();
                for (int maps = 0; maps < dungeon.StandardMaps.Count; maps++)
                {
                    string mapText2;
                    if (dungeon.StandardMaps[maps].IsBadGoalMap)
                    {
                        mapText2 = (maps + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(dungeon.StandardMaps[maps].Difficulty) + "] Map #" + dungeon.StandardMaps[maps].MapNum;
                    }
                    else
                    {
                        mapText2 = (maps + 1) + ": [" + Missions.MissionManager.DifficultyToString(dungeon.StandardMaps[maps].Difficulty) + "] Map #" + dungeon.StandardMaps[maps].MapNum;
                    }
                    ListBoxTextItem lbiMap2 = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText2);
                    lbxDungeonSMaps.Items.Add(lbiMap2);
                }
            }

            Logic.Editors.Dungeons.EditableStandardDungeonMap map = new Logic.Editors.Dungeons.EditableStandardDungeonMap();
            map.MapNum       = nudMapNum.Value;
            map.Difficulty   = (Enums.JobDifficulty)nudSMapDifficulty.Value;
            map.IsBadGoalMap = chkSMapBad.Checked;

            dungeon.StandardMaps.Add(map);

            string mapText;

            if (map.IsBadGoalMap)
            {
                mapText = (lbxDungeonSMaps.Items.Count + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Map #" + map.MapNum;
            }
            else
            {
                mapText = (lbxDungeonSMaps.Items.Count + 1) + ": [" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Map #" + map.MapNum;
            }
            ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);

            lbxDungeonSMaps.Items.Add(lbiMap);
        }
示例#21
0
 void btnRemoveSMap_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxDungeonSMaps.SelectedIndex > -1)
     {
         dungeon.StandardMaps.RemoveAt(lbxDungeonSMaps.SelectedIndex);
         lbxDungeonSMaps.Items.Clear();
         for (int maps = 0; maps < dungeon.StandardMaps.Count; maps++)
         {
             string mapText;
             if (dungeon.StandardMaps[maps].IsBadGoalMap)
             {
                 mapText = (maps + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(dungeon.StandardMaps[maps].Difficulty) + "] Map #" + dungeon.StandardMaps[maps].MapNum;
             }
             else
             {
                 mapText = (maps + 1) + ": [" + Missions.MissionManager.DifficultyToString(dungeon.StandardMaps[maps].Difficulty) + "] Map #" + dungeon.StandardMaps[maps].MapNum;
             }
             ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
             lbxDungeonSMaps.Items.Add(lbiMap);
         }
     }
 }
示例#22
0
 void btnRemoveRMap_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxDungeonRMaps.SelectedIndex > -1)
     {
         dungeon.RandomMaps.RemoveAt(lbxDungeonRMaps.SelectedIndex);
         lbxDungeonRMaps.Items.Clear();
         for (int maps = 0; maps < dungeon.RandomMaps.Count; maps++)
         {
             string mapText;
             if (dungeon.RandomMaps[maps].IsBadGoalMap)
             {
                 mapText = (maps + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(dungeon.RandomMaps[maps].Difficulty) + "] Dun #" + (dungeon.RandomMaps[maps].RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[dungeon.RandomMaps[maps].RDungeonIndex].Name + ") " + (dungeon.RandomMaps[maps].RDungeonFloor + 1) + "F";
             }
             else
             {
                 mapText = (maps + 1) + ": [" + Missions.MissionManager.DifficultyToString(dungeon.RandomMaps[maps].Difficulty) + "] Dun #" + (dungeon.RandomMaps[maps].RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[dungeon.RandomMaps[maps].RDungeonIndex].Name + ") " + (dungeon.RandomMaps[maps].RDungeonFloor + 1) + "F";
             }
             ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
             lbxDungeonRMaps.Items.Add(lbiMap);
         }
     }
 }
示例#23
0
        public void LoadGuildFromPacket(string[] parse)
        {
            ranks = new List <Enums.GuildRank>();
            lbxMembers.Items.Clear();

            int count = parse[1].ToInt();

            for (int i = 0; i < count; i++)
            {
                Enums.GuildRank rank = (Enums.GuildRank)parse[2 + i * 3 + 1].ToInt();
                Color           color;
                switch (rank)
                {
                case Enums.GuildRank.Member:
                    color = Color.LightSkyBlue;
                    break;

                case Enums.GuildRank.Admin:
                    color = Color.Yellow;
                    break;

                case Enums.GuildRank.Founder:
                    color = Color.LawnGreen;
                    break;

                default:
                    color = Color.Red;
                    break;
                }
                ListBoxTextItem lbiName = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "[" + rank + "] " + parse[2 + i * 3] + " (Last Login: "******")");
                ranks.Add(rank);
                lbiName.ForeColor = color;
                lbxMembers.Items.Add(lbiName);
            }
            Refresh();
        }
示例#24
0
        public void LoadDungeon(string[] parse)
        {
            this.Size = pnlDungeonEditor.Size;
            pnlDungeonList.Visible   = false;
            pnlDungeonEditor.Visible = true;
            btnGeneral_Click(null, null);
            lbxDungeonSMaps.Items.Clear();
            lbxDungeonRMaps.Items.Clear();
            lbxDungeonScripts.Items.Clear();
            //this.Size = new System.Drawing.Size(pnlDungeonGeneral.Width, pnlDungeonGeneral.Height);

            dungeon = new Logic.Editors.Dungeons.EditableDungeon();

            dungeon.Name         = parse[2];
            txtName.Text         = dungeon.Name;
            dungeon.AllowsRescue = parse[3].ToBool();
            chkRescue.Checked    = dungeon.AllowsRescue;
            int scriptCount = parse[4].ToInt();
            int n           = 5;

            for (int i = 0; i < scriptCount; i++)
            {
                dungeon.ScriptList.Add(parse[n].ToInt(), parse[n + 1]);

                n += 2;

                ListBoxTextItem lbiScript = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), dungeon.ScriptList.KeyByIndex(i) + ": " + dungeon.ScriptList.ValueByIndex(i));
                lbxDungeonScripts.Items.Add(lbiScript);
            }

            int mapCount = parse[n].ToInt();

            n++;

            for (int i = 0; i < mapCount; i++)
            {
                Logic.Editors.Dungeons.EditableStandardDungeonMap map = new Logic.Editors.Dungeons.EditableStandardDungeonMap();
                map.Difficulty   = (Enums.JobDifficulty)parse[n].ToInt();
                map.IsBadGoalMap = parse[n + 1].ToBool();
                map.MapNum       = parse[n + 2].ToInt();

                dungeon.StandardMaps.Add(map);

                string mapText;
                if (map.IsBadGoalMap)
                {
                    mapText = (i + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Map #" + map.MapNum;
                }
                else
                {
                    mapText = (i + 1) + ": [" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Map #" + map.MapNum;
                }
                ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
                lbxDungeonSMaps.Items.Add(lbiMap);

                n += 3;
            }
            mapCount = parse[n].ToInt();
            n++;
            for (int i = 0; i < mapCount; i++)
            {
                Logic.Editors.Dungeons.EditableRandomDungeonMap map = new Logic.Editors.Dungeons.EditableRandomDungeonMap();
                map.Difficulty    = (Enums.JobDifficulty)parse[n].ToInt();
                map.IsBadGoalMap  = parse[n + 1].ToBool();
                map.RDungeonIndex = parse[n + 2].ToInt();
                map.RDungeonFloor = parse[n + 3].ToInt();
                dungeon.RandomMaps.Add(map);

                n += 4;
                string mapText;
                if (map.IsBadGoalMap)
                {
                    mapText = (i + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Dun #" + (map.RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[map.RDungeonIndex].Name + ") " + (map.RDungeonFloor + 1) + "F";
                }
                else
                {
                    mapText = (i + 1) + ": [" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Dun #" + (map.RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[map.RDungeonIndex].Name + ") " + (map.RDungeonFloor + 1) + "F";
                }
                ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
                lbxDungeonRMaps.Items.Add(lbiMap);
            }

            dungeon.LegendaryId = parse[n++].ToInt();

            btnEdit.Text = "Edit";
        }
示例#25
0
        public void SingleItemVisibleTest()
        {
            {
                ListBox         containerListBox = new ListBox(new RectangleDouble(0, 0, 100, 100));
                ListBoxTextItem itemToAddToList  = new ListBoxTextItem("test Item", "test data for item");
                itemToAddToList.Name = "list item";
                containerListBox.AddChild(itemToAddToList);
                containerListBox.DoubleBuffer = true;
                containerListBox.BackBuffer.NewGraphics2D().Clear(RGBA_Bytes.White);
                containerListBox.OnDraw(containerListBox.BackBuffer.NewGraphics2D());

                ImageBuffer textImage = new ImageBuffer(80, 16, 32, new BlenderBGRA());
                textImage.NewGraphics2D().Clear(RGBA_Bytes.White);
                textImage.NewGraphics2D().DrawString("test Item", 1, 1);

                OutputImage(containerListBox.BackBuffer, "test.tga");
                OutputImage(textImage, "control.tga");

                double  maxError = 20000000;
                Vector2 bestPosition;
                double  leastSquares;
                containerListBox.BackBuffer.FindLeastSquaresMatch(textImage, out bestPosition, out leastSquares, maxError);

                Assert.IsTrue(leastSquares < maxError, "The list box need to be showing the item we added to it.");
            }

            {
                GuiWidget container = new GuiWidget(202, 302);
                container.DoubleBuffer = true;
                container.NewGraphics2D().Clear(RGBA_Bytes.White);
                FlowLayoutWidget leftToRightLayout = new FlowLayoutWidget();
                leftToRightLayout.AnchorAll();
                {
                    {
                        ListBox listBox = new ListBox(new RectangleDouble(0, 0, 200, 300));
                        //listBox.BackgroundColor = RGBA_Bytes.Red;
                        listBox.Name              = "listBox";
                        listBox.VAnchor           = UI.VAnchor.ParentTop;
                        listBox.ScrollArea.Margin = new BorderDouble(15);
                        leftToRightLayout.AddChild(listBox);

                        for (int i = 0; i < 1; i++)
                        {
                            ListBoxTextItem newItem = new ListBoxTextItem("hand" + i.ToString() + ".stl", "c:\\development\\hand" + i.ToString() + ".stl");
                            newItem.Name = "ListBoxItem" + i.ToString();
                            listBox.AddChild(newItem);
                        }
                    }
                }

                container.AddChild(leftToRightLayout);
                container.OnDraw(container.NewGraphics2D());

                ImageBuffer textImage = new ImageBuffer(80, 16, 32, new BlenderBGRA());
                textImage.NewGraphics2D().Clear(RGBA_Bytes.White);
                textImage.NewGraphics2D().DrawString("hand0.stl", 1, 1);

                OutputImage(container.BackBuffer, "control.tga");
                OutputImage(textImage, "test.tga");

                double  maxError = 1000000;
                Vector2 bestPosition;
                double  leastSquares;
                container.BackBuffer.FindLeastSquaresMatch(textImage, out bestPosition, out leastSquares, maxError);

                Assert.IsTrue(leastSquares < maxError, "The list box need to be showing the item we added to it.");
            }
        }
示例#26
0
 void LoadInventory()
 {
     SdlDotNet.Graphics.Font font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
     lstInv.Items.Clear();
     for (int i = 1; i < Players.PlayerManager.MyPlayer.Inventory.Length; i++) {
         if (Players.PlayerManager.MyPlayer.Inventory[i].Num > 0) {
             string itemName = Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.Inventory[i].Num].Name;
             if (Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.Inventory[i].Num].Type == Enums.ItemType.Currency || Items.ItemHelper.Items[Players.PlayerManager.MyPlayer.Inventory[i].Num].StackCap > 0) {
                 itemName += " (" + Players.PlayerManager.MyPlayer.Inventory[i].Value + ")";
             }
             if (!string.IsNullOrEmpty(itemName)) {
                 if (lstInv.Items.Count <= i - 1) {
                     ListBoxTextItem item = new ListBoxTextItem(font, itemName);
                     item.Tag = i;
                     lstInv.Items.Add(item);
                 } else {
                     ((ListBoxTextItem)lstInv.Items[i - 1]).Text = itemName;
                 }
             }
         }
     }
 }
示例#27
0
        public winEmotionPanel()
            : base("winEmotionPanel")
        {
            this.Windowed = true;
                this.ShowInWindowSwitcher = false;
                this.Size = new System.Drawing.Size(200, 230);
                this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
                this.AlwaysOnTop = true;
                this.TitleBar.CloseButton.Visible = true;
                this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
                this.TitleBar.Text = "Emotion Panel";

                pnlEmoteList = new Panel("pnlEmoteList");
                pnlEmoteList.Size = new System.Drawing.Size(200, 230);
                pnlEmoteList.Location = new Point(0, 0);
                pnlEmoteList.BackColor = Color.White;
                pnlEmoteList.Visible = true;

                pnlEmoteEditor = new Panel("pnlEmoteEditor");
                pnlEmoteEditor.Size = new System.Drawing.Size(230, 166);
                pnlEmoteEditor.Location = new Point(0, 0);
                pnlEmoteEditor.BackColor = Color.White;
                pnlEmoteEditor.Visible = false;

                lbxEmotionList = new ListBox("lbxEmotionList");
                lbxEmotionList.Location = new Point(10, 10);
                lbxEmotionList.Size = new Size(180, 140);
                for (int i = 0; i < 10; i++) {
                    lbiEmote = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), i + ": ---");
                    lbxEmotionList.Items.Add(lbiEmote);
                }

                btnEdit = new Button("btnEdit");
                btnEdit.Location = new Point(10, 190);
                btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
                btnEdit.Size = new System.Drawing.Size(64, 16);
                btnEdit.Visible = true;
                btnEdit.Text = "Edit";
                btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

                btnCancel = new Button("btnCancel");
                btnCancel.Location = new Point(126, 190);
                btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
                btnCancel.Size = new System.Drawing.Size(64, 16);
                btnCancel.Visible = true;
                btnCancel.Text = "Cancel";
                btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

                //btnAddNew = new Button("btnAddNew");
                //btnAddNew.Location = new Point();
                //btnAddNew.Font = Graphics.FontManager.LoadFont("tahoma", 10);
                //btnAddNew.Size = new System.Drawing.Size(64, 16);
                //btnAddNew.Visible = true;
                //btnAddNew.Text = "Add New";
                //btnAddNew.Click += new EventHandler<MouseButtonEventArgs>(btnAddNew_Click);

                btnEditorCancel = new Button("btnEditorCancel");
                btnEditorCancel.Location = new Point(120, 125);
                btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
                btnEditorCancel.Size = new System.Drawing.Size(64, 16);
                btnEditorCancel.Visible = true;
                btnEditorCancel.Text = "Cancel";
                btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

                btnEditorOK = new Button("btnEditorOK");
                btnEditorOK.Location = new Point(20, 125);
                btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
                btnEditorOK.Size = new System.Drawing.Size(64, 16);
                btnEditorOK.Visible = true;
                btnEditorOK.Text = "OK";
                btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

                lblENum = new Label("lblENum");
                lblENum.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
                lblENum.Text = "Emoticon: ";
                lblENum.AutoSize = true;
                lblENum.Location = new Point(10, 4);

                txtCommand = new TextBox("txtCommand");
                txtCommand.Size = new Size(200, 16);
                txtCommand.Location = new Point(10, 94);
                txtCommand.Font = Graphics.FontManager.LoadFont("Tahoma", 12);

                lblCommand = new Label("lblCommand");
                lblCommand.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
                lblCommand.Text = "Command:";
                lblCommand.AutoSize = true;
                lblCommand.Location = new Point(10, 80);

                picEmote = new PictureBox("picEmote");
                picEmote.Location = new Point(10, 18);
                picEmote.Size = new Size(32, 32);

                hsbENum = new HScrollBar("hsbPic");
                hsbENum.Maximum = MaxInfo.MaxEmoticons;
                hsbENum.Location = new Point(10, 54);
                hsbENum.Size = new Size(200, 12);
                hsbENum.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsbENum_ValueChanged);

                pnlEmoteList.AddWidget(lbxEmotionList);
                //pnlEmoteList.AddWidget(btnAddNew); Needed?
                pnlEmoteList.AddWidget(btnEdit);
                pnlEmoteList.AddWidget(btnCancel);

                pnlEmoteEditor.AddWidget(hsbENum);
                pnlEmoteEditor.AddWidget(lblENum);
                pnlEmoteEditor.AddWidget(picEmote);
                pnlEmoteEditor.AddWidget(lblCommand);
                pnlEmoteEditor.AddWidget(txtCommand);
                pnlEmoteEditor.AddWidget(btnEditorCancel);
                pnlEmoteEditor.AddWidget(btnEditorOK);

                this.AddWidget(pnlEmoteList);
                this.AddWidget(pnlEmoteEditor);

                RefreshEmoteList();
                this.LoadComplete();
        }
示例#28
0
        public void LoadDungeon(string[] parse)
        {
            this.Size = pnlDungeonEditor.Size;
            pnlDungeonList.Visible = false;
            pnlDungeonEditor.Visible = true;
            btnGeneral_Click(null, null);
            lbxDungeonSMaps.Items.Clear();
            lbxDungeonRMaps.Items.Clear();
            lbxDungeonScripts.Items.Clear();
            //this.Size = new System.Drawing.Size(pnlDungeonGeneral.Width, pnlDungeonGeneral.Height);

            dungeon = new Logic.Editors.Dungeons.EditableDungeon();

            dungeon.Name = parse[2];
            txtName.Text = dungeon.Name;
            dungeon.AllowsRescue = parse[3].ToBool();
            chkRescue.Checked = dungeon.AllowsRescue;
            int scriptCount = parse[4].ToInt();
            int n = 5;
            for (int i = 0; i < scriptCount; i++) {
                dungeon.ScriptList.Add(parse[n].ToInt(), parse[n + 1]);

                n += 2;

                ListBoxTextItem lbiScript = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), dungeon.ScriptList.KeyByIndex(i) + ": " + dungeon.ScriptList.ValueByIndex(i));
                lbxDungeonScripts.Items.Add(lbiScript);

            }

            int mapCount = parse[n].ToInt();
            n++;

            for (int i = 0; i < mapCount; i++) {
                Logic.Editors.Dungeons.EditableStandardDungeonMap map = new Logic.Editors.Dungeons.EditableStandardDungeonMap();
                map.Difficulty = (Enums.JobDifficulty)parse[n].ToInt();
                map.IsBadGoalMap = parse[n + 1].ToBool();
                map.MapNum = parse[n + 2].ToInt();

                dungeon.StandardMaps.Add(map);

                string mapText;
                if (map.IsBadGoalMap) {
                    mapText = (i + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Map #" + map.MapNum;
                } else {
                    mapText = (i + 1) + ": [" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Map #" + map.MapNum;
                }
                ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
                lbxDungeonSMaps.Items.Add(lbiMap);

                n += 3;
            }
            mapCount = parse[n].ToInt();
            n++;
            for (int i = 0; i < mapCount; i++)
            {
                Logic.Editors.Dungeons.EditableRandomDungeonMap map = new Logic.Editors.Dungeons.EditableRandomDungeonMap();
                map.Difficulty = (Enums.JobDifficulty)parse[n].ToInt();
                map.IsBadGoalMap = parse[n + 1].ToBool();
                map.RDungeonIndex = parse[n + 2].ToInt();
                map.RDungeonFloor = parse[n + 3].ToInt();
                dungeon.RandomMaps.Add(map);

                n += 4;
                string mapText;
                if (map.IsBadGoalMap) {
                    mapText = (i + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Dun #" + (map.RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[map.RDungeonIndex].Name + ") " + (map.RDungeonFloor + 1) + "F";
                } else {
                    mapText = (i + 1) + ": [" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Dun #" + (map.RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[map.RDungeonIndex].Name + ") " + (map.RDungeonFloor + 1) + "F";
                }
                ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
                lbxDungeonRMaps.Items.Add(lbiMap);
            }

            btnEdit.Text = "Edit";
        }
示例#29
0
 void btnAddScript_Click(object sender, MouseButtonEventArgs e)
 {
     if (dungeon.ScriptList.ContainsKey(nudScriptNum.Value)) {
         dungeon.ScriptList.RemoveAtKey(nudScriptNum.Value);
     }
     dungeon.ScriptList.Add(nudScriptNum.Value, txtScriptParam.Text);
     lbxDungeonScripts.Items.Clear();
     for (int scripts = 0; scripts < dungeon.ScriptList.Count; scripts++) {
         ListBoxTextItem lbiScript = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), dungeon.ScriptList.KeyByIndex(scripts) + ": " + dungeon.ScriptList.ValueByIndex(scripts));
         lbxDungeonScripts.Items.Add(lbiScript);
     }
 }
示例#30
0
        public winMissionPanel()
            : base("winMissionPanel")
        {
            this.Windowed             = true;
            this.ShowInWindowSwitcher = false;
            this.Size        = new System.Drawing.Size(200, 230);
            this.Location    = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Mission Panel";

            #region Panels
            pnlMissionList           = new Panel("pnlMissionList");
            pnlMissionList.Size      = new System.Drawing.Size(200, 230);
            pnlMissionList.Location  = new Point(0, 0);
            pnlMissionList.BackColor = Color.White;
            pnlMissionList.Visible   = true;

            pnlMissionEditor           = new Panel("pnlMissionEditor");
            pnlMissionEditor.Size      = new System.Drawing.Size(320, 300);
            pnlMissionEditor.Location  = new Point(0, 0);
            pnlMissionEditor.BackColor = Color.White;
            pnlMissionEditor.Visible   = false;

            pnlMissionGeneral           = new Panel("pnlMissionGeneral");
            pnlMissionGeneral.Size      = new System.Drawing.Size(320, 270);
            pnlMissionGeneral.Location  = new Point(0, 30);
            pnlMissionGeneral.BackColor = Color.White;
            pnlMissionGeneral.Visible   = true;

            pnlMissionRewards           = new Panel("pnlMissionRewards");
            pnlMissionRewards.Size      = new System.Drawing.Size(320, 270);
            pnlMissionRewards.Location  = new Point(0, 30);
            pnlMissionRewards.BackColor = Color.White;
            pnlMissionRewards.Visible   = false;

            pnlMissionClients           = new Panel("pnlMissionClients");
            pnlMissionClients.Size      = new System.Drawing.Size(320, 270);
            pnlMissionClients.Location  = new Point(0, 30);
            pnlMissionClients.BackColor = Color.White;
            pnlMissionClients.Visible   = false;

            pnlMissionEnemies           = new Panel("pnlMissionEnemies");
            pnlMissionEnemies.Size      = new System.Drawing.Size(320, 270);
            pnlMissionEnemies.Location  = new Point(0, 30);
            pnlMissionEnemies.BackColor = Color.White;
            pnlMissionEnemies.Visible   = false;
            #endregion

            #region Dungeon List
            lbxMissionList          = new ListBox("lbxMissionList");
            lbxMissionList.Location = new Point(10, 10);
            lbxMissionList.Size     = new Size(180, 140);
            for (int i = 0; i < 10; i++)
            {
                ListBoxTextItem lbiMission = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), i + ": ");
                lbxMissionList.Items.Add(lbiMission);
            }

            btnBack          = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size     = new System.Drawing.Size(64, 16);
            btnBack.Visible  = true;
            btnBack.Text     = "<--";
            btnBack.Click   += new EventHandler <MouseButtonEventArgs>(btnBack_Click);

            btnForward          = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size     = new System.Drawing.Size(64, 16);
            btnForward.Visible  = true;
            btnForward.Text     = "-->";
            btnForward.Click   += new EventHandler <MouseButtonEventArgs>(btnForward_Click);

            btnEdit          = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size     = new System.Drawing.Size(64, 16);
            btnEdit.Visible  = true;
            btnEdit.Text     = "Edit";
            btnEdit.Click   += new EventHandler <MouseButtonEventArgs>(btnEdit_Click);

            btnCancel          = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size     = new System.Drawing.Size(64, 16);
            btnCancel.Visible  = true;
            btnCancel.Text     = "Cancel";
            btnCancel.Click   += new EventHandler <MouseButtonEventArgs>(btnCancel_Click);

            #endregion

            #region Dungeon Editor Panel

            btnGeneral          = new Button("btnGeneral");
            btnGeneral.Location = new Point(5, 5);
            btnGeneral.Size     = new Size(70, 20);
            btnGeneral.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnGeneral.Text     = "General";
            btnGeneral.Click   += new EventHandler <MouseButtonEventArgs>(btnGeneral_Click);

            btnClients          = new Button("btnClients");
            btnClients.Location = new Point(80, 5);
            btnClients.Size     = new Size(70, 20);
            btnClients.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnClients.Text     = "Clients";
            btnClients.Click   += new EventHandler <MouseButtonEventArgs>(btnClients_Click);

            btnEnemies          = new Button("btnEnemies");
            btnEnemies.Location = new Point(155, 5);
            btnEnemies.Size     = new Size(70, 20);
            btnEnemies.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEnemies.Text     = "Enemies";
            btnEnemies.Click   += new EventHandler <MouseButtonEventArgs>(btnEnemies_Click);

            btnRewards          = new Button("btnRewards");
            btnRewards.Location = new Point(230, 5);
            btnRewards.Size     = new Size(70, 20);
            btnRewards.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRewards.Text     = "Rewards";
            btnRewards.Click   += new EventHandler <MouseButtonEventArgs>(btnRewards_Click);

            #endregion

            #region General


            btnEditorCancel          = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(120, 75);
            btnEditorCancel.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size     = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible  = true;
            btnEditorCancel.Text     = "Cancel";
            btnEditorCancel.Click   += new EventHandler <MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK          = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(20, 75);
            btnEditorOK.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size     = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible  = true;
            btnEditorOK.Text     = "OK";
            btnEditorOK.Click   += new EventHandler <MouseButtonEventArgs>(btnEditorOK_Click);

            #endregion

            #region Enemies

            lblNpcNum          = new Label("lblNpcNum");
            lblNpcNum.AutoSize = true;
            lblNpcNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblNpcNum.Location = new Point(10, 0);
            lblNpcNum.Text     = "Num:";

            nudNpcNum          = new NumericUpDown("nudNpcNum");
            nudNpcNum.Size     = new Size(70, 20);
            nudNpcNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            nudNpcNum.Maximum  = Int32.MaxValue;
            nudNpcNum.Minimum  = 1;
            nudNpcNum.Location = new Point(10, 14);

            btnAddEnemy          = new Button("btnAddEnemy");
            btnAddEnemy.Size     = new Size(70, 16);
            btnAddEnemy.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddEnemy.Location = new Point(5, 72);
            btnAddEnemy.Text     = "Add";
            btnAddEnemy.Click   += new EventHandler <MouseButtonEventArgs>(btnAddEnemy_Click);

            btnRemoveEnemy          = new Button("btnRemoveEnemy");
            btnRemoveEnemy.Size     = new Size(70, 16);
            btnRemoveEnemy.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveEnemy.Location = new Point(80, 72);
            btnRemoveEnemy.Text     = "Remove";
            btnRemoveEnemy.Click   += new EventHandler <MouseButtonEventArgs>(btnRemoveEnemy_Click);

            btnLoadEnemy          = new Button("btnLoadEnemy");
            btnLoadEnemy.Size     = new Size(70, 16);
            btnLoadEnemy.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadEnemy.Location = new Point(155, 72);
            btnLoadEnemy.Text     = "Load";
            //btnLoadEnemy.Click += new EventHandler<MouseButtonEventArgs>(btnLoadEnemy_Click);

            lbxMissionEnemies             = new ListBox("lbxMissionEnemies");
            lbxMissionEnemies.Location    = new Point(10, 90);
            lbxMissionEnemies.Size        = new Size(pnlMissionClients.Size.Width - 20, pnlMissionClients.Size.Height - 120);
            lbxMissionEnemies.MultiSelect = false;

            #endregion

            #region Rewards

            lblItemNum          = new Label("lblItemNum");
            lblItemNum.AutoSize = true;
            lblItemNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblItemNum.Location = new Point(10, 0);
            lblItemNum.Text     = "Num:";

            nudItemNum               = new NumericUpDown("nudItemNum");
            nudItemNum.Size          = new Size(170, 20);
            nudItemNum.Font          = Graphics.FontManager.LoadFont("tahoma", 10);
            nudItemNum.Maximum       = 2000;
            nudItemNum.Minimum       = 1;
            nudItemNum.Location      = new Point(10, 14);
            nudItemNum.ValueChanged += new EventHandler <ValueChangedEventArgs>(nudItemNum_ValueChanged);

            lblItemAmount          = new Label("lblItemAmount");
            lblItemAmount.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblItemAmount.Text     = "Amount:";
            lblItemAmount.AutoSize = true;
            lblItemAmount.Location = new Point(200, 0);

            nudItemAmount          = new NumericUpDown("nudItemAmount");
            nudItemAmount.Size     = new Size(70, 20);
            nudItemAmount.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            nudItemAmount.Location = new Point(200, 14);
            nudItemAmount.Maximum  = Int32.MaxValue;

            lblItemTag          = new Label("lblItemTag");
            lblItemTag.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblItemTag.Text     = "Tag:";
            lblItemTag.AutoSize = true;
            lblItemTag.Location = new Point(10, 34);

            txtItemTag          = new TextBox("txtItemTag");
            txtItemTag.Size     = new Size(200, 20);
            txtItemTag.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            txtItemTag.Location = new Point(10, 48);

            btnAddItem          = new Button("btnAddItem");
            btnAddItem.Size     = new Size(70, 16);
            btnAddItem.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddItem.Location = new Point(5, 72);
            btnAddItem.Text     = "Add";
            btnAddItem.Click   += new EventHandler <MouseButtonEventArgs>(btnAddItem_Click);

            btnRemoveItem          = new Button("btnRemoveItem");
            btnRemoveItem.Size     = new Size(70, 16);
            btnRemoveItem.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveItem.Location = new Point(80, 72);
            btnRemoveItem.Text     = "Remove";
            btnRemoveItem.Click   += new EventHandler <MouseButtonEventArgs>(btnRemoveItem_Click);

            btnLoadItem          = new Button("btnLoadItem");
            btnLoadItem.Size     = new Size(70, 16);
            btnLoadItem.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadItem.Location = new Point(155, 72);
            btnLoadItem.Text     = "Load";
            btnLoadItem.Click   += new EventHandler <MouseButtonEventArgs>(btnLoadItem_Click);

            lbxMissionRewards             = new ListBox("lbxMissionRewards");
            lbxMissionRewards.Location    = new Point(10, 90);
            lbxMissionRewards.Size        = new Size(pnlMissionClients.Size.Width - 20, pnlMissionClients.Size.Height - 120);
            lbxMissionRewards.MultiSelect = false;

            #endregion

            #region Clients

            lblDexNum          = new Label("lblDexNum");
            lblDexNum.AutoSize = true;
            lblDexNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblDexNum.Location = new Point(2, 0);
            lblDexNum.Text     = "Dex #";

            nudDexNum               = new NumericUpDown("nudDexNum");
            nudDexNum.Size          = new Size(70, 20);
            nudDexNum.Font          = Graphics.FontManager.LoadFont("tahoma", 10);
            nudDexNum.Maximum       = 649;
            nudDexNum.Minimum       = 1;
            nudDexNum.Location      = new Point(10, 14);
            nudDexNum.ValueChanged += new EventHandler <ValueChangedEventArgs>(nudDexNum_ValueChanged);

            lblFormNum          = new Label("lblFormNum");
            lblFormNum.AutoSize = true;
            lblFormNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblFormNum.Location = new Point(240, 0);
            lblFormNum.Text     = "Form #";

            nudFormNum          = new NumericUpDown("nudFormNum");
            nudFormNum.Size     = new Size(70, 20);
            nudFormNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            nudFormNum.Maximum  = Int32.MaxValue;
            nudFormNum.Minimum  = 0;
            nudFormNum.Location = new Point(240, 14);

            btnAddMissionClient          = new Button("btnAddMissionClient");
            btnAddMissionClient.Size     = new Size(70, 16);
            btnAddMissionClient.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddMissionClient.Location = new Point(5, 72);
            btnAddMissionClient.Text     = "Add";
            btnAddMissionClient.Click   += new EventHandler <MouseButtonEventArgs>(btnAddMissionClient_Click);

            btnRemoveMissionClient          = new Button("btnRemoveMissionClient");
            btnRemoveMissionClient.Size     = new Size(70, 16);
            btnRemoveMissionClient.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveMissionClient.Location = new Point(80, 72);
            btnRemoveMissionClient.Text     = "Remove";
            btnRemoveMissionClient.Click   += new EventHandler <MouseButtonEventArgs>(btnRemoveMissionClient_Click);

            btnLoadMissionClient          = new Button("btnLoadMissionClient");
            btnLoadMissionClient.Size     = new Size(70, 16);
            btnLoadMissionClient.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadMissionClient.Location = new Point(155, 72);
            btnLoadMissionClient.Text     = "Load";
            btnLoadMissionClient.Click   += new EventHandler <MouseButtonEventArgs>(btnLoadMissionClient_Click);

            lbxMissionClients             = new ListBox("lbxMissionClients");
            lbxMissionClients.Location    = new Point(10, 90);
            lbxMissionClients.Size        = new Size(pnlMissionEnemies.Size.Width - 20, pnlMissionEnemies.Size.Height - 120);
            lbxMissionClients.MultiSelect = false;

            #endregion

            #region Addwidget
            //Dungeon List
            pnlMissionList.AddWidget(lbxMissionList);
            pnlMissionList.AddWidget(btnBack);
            pnlMissionList.AddWidget(btnForward);
            pnlMissionList.AddWidget(btnEdit);
            pnlMissionList.AddWidget(btnCancel);
            //General
            pnlMissionGeneral.AddWidget(btnEditorCancel);
            pnlMissionGeneral.AddWidget(btnEditorOK);
            //Clients
            pnlMissionClients.AddWidget(lblDexNum);
            pnlMissionClients.AddWidget(nudDexNum);
            pnlMissionClients.AddWidget(lblFormNum);
            pnlMissionClients.AddWidget(nudFormNum);
            pnlMissionClients.AddWidget(btnAddMissionClient);
            pnlMissionClients.AddWidget(btnRemoveMissionClient);
            pnlMissionClients.AddWidget(btnLoadMissionClient);
            pnlMissionClients.AddWidget(lbxMissionClients);
            //Enemies
            pnlMissionEnemies.AddWidget(lblNpcNum);
            pnlMissionEnemies.AddWidget(nudNpcNum);
            pnlMissionEnemies.AddWidget(btnAddEnemy);
            pnlMissionEnemies.AddWidget(btnRemoveEnemy);
            //pnlMissionEnemies.AddWidget(btnLoadEnemy);
            pnlMissionEnemies.AddWidget(lbxMissionEnemies);
            //Rewards
            pnlMissionRewards.AddWidget(lblItemNum);
            pnlMissionRewards.AddWidget(nudItemNum);
            pnlMissionRewards.AddWidget(lblItemAmount);
            pnlMissionRewards.AddWidget(nudItemAmount);
            pnlMissionRewards.AddWidget(lblItemTag);
            pnlMissionRewards.AddWidget(txtItemTag);
            pnlMissionRewards.AddWidget(btnAddItem);
            pnlMissionRewards.AddWidget(btnRemoveItem);
            pnlMissionRewards.AddWidget(btnLoadItem);
            pnlMissionRewards.AddWidget(lbxMissionRewards);
            //Editor panel
            pnlMissionEditor.AddWidget(btnGeneral);
            pnlMissionEditor.AddWidget(btnClients);
            pnlMissionEditor.AddWidget(btnEnemies);
            pnlMissionEditor.AddWidget(btnRewards);
            pnlMissionEditor.AddWidget(pnlMissionGeneral);
            pnlMissionEditor.AddWidget(pnlMissionClients);
            pnlMissionEditor.AddWidget(pnlMissionEnemies);
            pnlMissionEditor.AddWidget(pnlMissionRewards);
            //This
            this.AddWidget(pnlMissionList);
            this.AddWidget(pnlMissionEditor);
            #endregion

            RefreshMissionList();
        }
示例#31
0
        void btnRemoveMissionClient_Click(object sender, MouseButtonEventArgs e)
        {
            if (lbxMissionClients.SelectedIndex > -1) {
                missionPool.Clients.RemoveAt(lbxMissionClients.SelectedIndex);
                lbxMissionClients.Items.Clear();
                for (int clients = 0; clients < missionPool.Clients.Count; clients++) {

                    ListBoxTextItem lbiClient = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), (clients + 1) + ": #" + missionPool.Clients[clients].DexNum + " " + Pokedex.PokemonHelper.Pokemon[missionPool.Clients[clients].DexNum-1].Name + " (Form: " + missionPool.Clients[clients].FormNum + ")");
                    lbxMissionClients.Items.Add(lbiClient);
                }
            }
        }
示例#32
0
 void btnRemoveSMap_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxDungeonSMaps.SelectedIndex > -1) {
         dungeon.StandardMaps.RemoveAt(lbxDungeonSMaps.SelectedIndex);
         lbxDungeonSMaps.Items.Clear();
         for (int maps = 0; maps < dungeon.StandardMaps.Count; maps++) {
             string mapText;
             if (dungeon.StandardMaps[maps].IsBadGoalMap) {
                 mapText = (maps + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(dungeon.StandardMaps[maps].Difficulty) + "] Map #" + dungeon.StandardMaps[maps].MapNum;
             } else {
                 mapText = (maps + 1) + ": [" + Missions.MissionManager.DifficultyToString(dungeon.StandardMaps[maps].Difficulty) + "] Map #" + dungeon.StandardMaps[maps].MapNum;
             }
             ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
             lbxDungeonSMaps.Items.Add(lbiMap);
         }
     }
 }
示例#33
0
        public void AddEntries()
        {
            string[] messageArray = Logic.Logs.BattleLog.Messages.ToArray();
            Color[] colorArray = Logic.Logs.BattleLog.MessageColor.ToArray();

            for (int i = 0; i < messageArray.Length; i++) {
                ListBoxTextItem item = new ListBoxTextItem(FontManager.LoadFont("PMDCP", 16), messageArray[i]);
                item.ForeColor = colorArray[i];
                lstBattleEntries.Items.Add(item);
            }
        }
示例#34
0
        public winNPCPanel()
            : base("winNPCPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "NPC Panel";

            pnlNPCList = new Panel("pnlNPCList");
            pnlNPCList.Size = new System.Drawing.Size(200, 230);
            pnlNPCList.Location = new Point(0, 0);
            pnlNPCList.BackColor = Color.White;
            pnlNPCList.Visible = true;

            pnlNPCEditor = new Panel("pnlNPCEditor");
            pnlNPCEditor.Size = new System.Drawing.Size(300, 420);
            pnlNPCEditor.Location = new Point(0, 0);
            pnlNPCEditor.BackColor = Color.White;
            pnlNPCEditor.Visible = false;

            #region NPC Selector

            lbxNPCList = new ListBox("lbxNPCList");
            lbxNPCList.Location = new Point(10, 10);
            lbxNPCList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                ListBoxTextItem lbiNPC = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Npc.NpcHelper.Npcs[(i + 1) + 10 * currentTen].Name);
                lbxNPCList.Items.Add(lbiNPC);
            }

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            #endregion

            #region NPC Editor

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "NPC Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 5);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 15);
            txtName.Location = new Point(75, 5);
            txtName.Font = Graphics.FontManager.LoadFont("Tahoma", 12);
            txtName.Text = "";

            lblAttackSay = new Label("lblAttackSay");
            lblAttackSay.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblAttackSay.Text = "Attack Say:";
            lblAttackSay.AutoSize = true;
            lblAttackSay.Location = new Point(10, 25);

            txtAttackSay = new TextBox("txtAttackSay");
            txtAttackSay.Size = new System.Drawing.Size(200, 15);
            txtAttackSay.Location = new Point(75, 25);
            txtAttackSay.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);

            lblForm = new Label("lblForm");
            lblForm.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblForm.Text = "Form:";
            lblForm.AutoSize = true;
            lblForm.Location = new Point(10, 45);

            nudForm = new NumericUpDown("nudForm");
            nudForm.Maximum = 1000;
            nudForm.Location = new Point(75, 45);
            nudForm.Size = new System.Drawing.Size(200, 15);
            nudForm.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudForm_ValueChanged);

            lblSpecies = new Label("lblSpecies");
            lblSpecies.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblSpecies.Text = "Species:";
            lblSpecies.AutoSize = true;
            lblSpecies.Location = new Point(10, 65);

            nudSpecies = new NumericUpDown("nudSpecies");
            nudSpecies.Location = new Point(75, 65);
            nudSpecies.Size = new System.Drawing.Size(200, 15);
            nudSpecies.Minimum = -1;
            nudSpecies.Maximum = 649;
            nudForm.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudSpecies_ValueChanged);

            lblRange = new Label("lblRange");
            lblRange.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblRange.Text = "Shiny:";
            lblRange.AutoSize = true;
            lblRange.Location = new Point(10, 85);

            nudShinyChance = new NumericUpDown("nudShinyChance");
            nudShinyChance.Location = new Point(75, 85);
            nudShinyChance.Size = new System.Drawing.Size(200, 15);
            nudShinyChance.Maximum = Int32.MaxValue;
            nudShinyChance.Minimum = 0;

            chkSpawnsAtDawn = new CheckBox("chkSpawnsAtDawn");
            chkSpawnsAtDawn.Size = new Size(60, 17);
            chkSpawnsAtDawn.Location = new Point(75, 105);
            chkSpawnsAtDawn.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkSpawnsAtDawn.Text = "Dawn";

            chkSpawnsAtDay = new CheckBox("chkSpawnsAtDay");
            chkSpawnsAtDay.Size = new Size(60, 17);
            chkSpawnsAtDay.Location = new Point(175, 105);
            chkSpawnsAtDay.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkSpawnsAtDay.Text = "Day";

            chkSpawnsAtDusk = new CheckBox("chkSpawnsAtDusk");
            chkSpawnsAtDusk.Size = new Size(60, 17);
            chkSpawnsAtDusk.Location = new Point(75, 125);
            chkSpawnsAtDusk.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkSpawnsAtDusk.Text = "Dusk";

            chkSpawnsAtNight = new CheckBox("chkSpawnsAtNight");
            chkSpawnsAtNight.Size = new Size(60, 17);
            chkSpawnsAtNight.Location = new Point(175, 125);
            chkSpawnsAtNight.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkSpawnsAtNight.Text = "Night";

            lblBehaviour = new Label("lblBehaviour");
            lblBehaviour.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblBehaviour.Text = "Behaviour:";
            lblBehaviour.AutoSize = true;
            lblBehaviour.Location = new Point(10, lblRange.Y + 60);

            cmbBehaviour = new ComboBox("cmbBehaviour");
            cmbBehaviour.Location = new Point(75, lblBehaviour.Y);
            cmbBehaviour.Size = new System.Drawing.Size(200, 15);
            for (int i = 0; i < 7; i++) {
                cmbBehaviour.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.NpcBehavior), i)));
            }

            lblRecruitRate = new Label("lblRecruitRate");
            lblRecruitRate.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblRecruitRate.Text = "Recruit Rate:";
            lblRecruitRate.AutoSize = true;
            lblRecruitRate.Location = new Point(10, lblBehaviour.Y + 20);

            nudRecruitRate = new NumericUpDown("nudRecruitRate");
            nudRecruitRate.Location = new Point(85, lblRecruitRate.Y);
            nudRecruitRate.Size = new System.Drawing.Size(190, 15);
            nudRecruitRate.Minimum = -1000;
            nudRecruitRate.Maximum = 1000;

            lblMove = new Label[4];
            lblMoveInfo = new Label[4];
            nudMove = new NumericUpDown[4];
            for (int i = 0; i < lblMove.Length; i++) {
                lblMove[i] = new Label("lblMove" + i);
                lblMoveInfo[i] = new Label("lblMoveInfo" + i);
                nudMove[i] = new NumericUpDown("nudMove" + i);
                nudMove[i].ValueChanged += new EventHandler<ValueChangedEventArgs>(winNPCPanel_ValueChanged);

                lblMove[i].Font = Graphics.FontManager.LoadFont("tahoma", 10);
                lblMove[i].Text = "Move " + (i + 1) + ":";
                lblMove[i].AutoSize = true;
                lblMove[i].Location = new Point(10, (lblRecruitRate.Y + 20) + (20 * i));

                nudMove[i].Location = new Point(75, (lblRecruitRate.Y + 20) + (20 * i));
                nudMove[i].Size = new Size(150, 15);
                nudMove[i].Minimum = -1;
                nudMove[i].Maximum = MaxInfo.MaxMoves;

                lblMoveInfo[i].Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
                lblMoveInfo[i].AutoSize = true;
                lblMoveInfo[i].Location = new Point(230, (lblRecruitRate.Y + 20) + (20 * i));
            }

            lblDropSelector = new Label("lblDropSelector");
            lblDropSelector.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblDropSelector.AutoSize = true;
            lblDropSelector.Text = "Drop #:";
            lblDropSelector.Location = new Point(10, lblMove[lblMove.Length - 1].Y + 20);

            nudDropSelector = new NumericUpDown("nudDropSelector");
            nudDropSelector.Location = new Point(75, lblDropSelector.Y);
            nudDropSelector.Size = new System.Drawing.Size(200, 15);
            nudDropSelector.Minimum = 1;
            nudDropSelector.Maximum = MaxInfo.MAX_NPC_DROPS;
            nudDropSelector.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudDropSelector_ValueChanged);

            lblDropItemNum = new Label("lblDropItemNum");
            lblDropItemNum.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblDropItemNum.AutoSize = true;
            lblDropItemNum.Text = "Drop Item #:";
            lblDropItemNum.Location = new Point(10, lblDropSelector.Y + 20);

            nudDropItemNum = new NumericUpDown("nudDropItemNum");
            nudDropItemNum.Location = new Point(75, lblDropItemNum.Y);
            nudDropItemNum.Size = new System.Drawing.Size(200, 15);
            nudDropItemNum.Minimum = 0;
            nudDropItemNum.Maximum = MaxInfo.MaxItems;
            nudDropItemNum.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudDropItemNum_ValueChanged);

            lblDropItemAmount = new Label("lblDropItemAmount");
            lblDropItemAmount.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblDropItemAmount.AutoSize = true;
            lblDropItemAmount.Text = "Drop Amount:";
            lblDropItemAmount.Location = new Point(10, lblDropItemNum.Y + 20);

            nudDropItemAmount = new NumericUpDown("nudDropItemAmount");
            nudDropItemAmount.Location = new Point(85, lblDropItemAmount.Y);
            nudDropItemAmount.Size = new System.Drawing.Size(190, 15);
            nudDropItemAmount.Minimum = 1;
            nudDropItemAmount.Maximum = Int32.MaxValue;
            nudDropItemAmount.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudDropItemAmount_ValueChanged);

            lblDropItemChance = new Label("lblDropItemChance");
            lblDropItemChance.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblDropItemChance.AutoSize = true;
            lblDropItemChance.Text = "Drop Chance:";
            lblDropItemChance.Location = new Point(10, lblDropItemAmount.Y + 20);

            nudDropItemChance = new NumericUpDown("nudDropItemChance");
            nudDropItemChance.Location = new Point(85, lblDropItemChance.Y);
            nudDropItemChance.Size = new System.Drawing.Size(190, 15);
            nudDropItemChance.Minimum = 1;
            nudDropItemChance.Maximum = 100;
            nudDropItemChance.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudDropItemChance_ValueChanged);

            lblDropItemTag = new Label("lblDropItemTag");
            lblDropItemTag.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblDropItemTag.AutoSize = true;
            lblDropItemTag.Text = "Item Tag:";
            lblDropItemTag.Location = new Point(10, lblDropItemChance.Y + 20);

            txtDropItemTag = new TextBox("nudDropItemTag");
            txtDropItemTag.Location = new Point(85, lblDropItemTag.Y);
            txtDropItemTag.Size = new System.Drawing.Size(190, 15);
            txtDropItemTag.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            txtDropItemTag.TextChanged += new EventHandler(txtDropItemTag_TextChanged);

            #endregion

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(20, lblDropItemTag.Y + 20);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(120, lblDropItemTag.Y + 20);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            #region NPC Selector

            pnlNPCList.AddWidget(lbxNPCList);
            pnlNPCList.AddWidget(btnBack);
            pnlNPCList.AddWidget(btnForward);
            pnlNPCList.AddWidget(btnEdit);
            pnlNPCList.AddWidget(btnCancel);

            #endregion

            #region NPC Editor

            pnlNPCEditor.AddWidget(lblName);
            pnlNPCEditor.AddWidget(txtName);
            pnlNPCEditor.AddWidget(lblAttackSay);
            pnlNPCEditor.AddWidget(txtAttackSay);
            pnlNPCEditor.AddWidget(lblForm);
            pnlNPCEditor.AddWidget(nudForm);
            pnlNPCEditor.AddWidget(lblSpecies);
            pnlNPCEditor.AddWidget(nudSpecies);
            pnlNPCEditor.AddWidget(lblRange);
            pnlNPCEditor.AddWidget(nudShinyChance);
            pnlNPCEditor.AddWidget(chkSpawnsAtDawn);
            pnlNPCEditor.AddWidget(chkSpawnsAtDay);
            pnlNPCEditor.AddWidget(chkSpawnsAtDusk);
            pnlNPCEditor.AddWidget(chkSpawnsAtNight);
            pnlNPCEditor.AddWidget(lblBehaviour);
            pnlNPCEditor.AddWidget(cmbBehaviour);
            pnlNPCEditor.AddWidget(lblRecruitRate);
            pnlNPCEditor.AddWidget(nudRecruitRate);

            for (int i = 0; i < lblMove.Length; i++) {
                pnlNPCEditor.AddWidget(lblMove[i]);
                pnlNPCEditor.AddWidget(nudMove[i]);
                pnlNPCEditor.AddWidget(lblMoveInfo[i]);
            }

            pnlNPCEditor.AddWidget(lblDropSelector);
            pnlNPCEditor.AddWidget(nudDropSelector);
            pnlNPCEditor.AddWidget(lblDropItemNum);
            pnlNPCEditor.AddWidget(nudDropItemNum);
            pnlNPCEditor.AddWidget(lblDropItemAmount);
            pnlNPCEditor.AddWidget(nudDropItemAmount);
            pnlNPCEditor.AddWidget(lblDropItemChance);
            pnlNPCEditor.AddWidget(nudDropItemChance);
            pnlNPCEditor.AddWidget(lblDropItemTag);
            pnlNPCEditor.AddWidget(txtDropItemTag);
            pnlNPCEditor.AddWidget(btnEditorCancel);
            pnlNPCEditor.AddWidget(btnEditorOK);

            #endregion

            this.AddWidget(pnlNPCList);
            this.AddWidget(pnlNPCEditor);

            RefreshNPCList();
            this.LoadComplete();
        }
示例#35
0
        public void AddOnlinePlayers(string[] parse)
        {
            lblLoading.Visible = false;
            int count = parse[1].ToInt();

            int n = 2;

            for (int i = 0; i < count; i++) {
                ListBoxTextItem item = new ListBoxTextItem(FontManager.LoadFont("PMU", 16), parse[i+n]);
                item.ForeColor = Color.WhiteSmoke;
                lstOnlinePlayers.Items.Add(item);
            }

            lblTotal.Text = count + " Players Online";
        }
示例#36
0
        public winAdminPanel()
            : base("winAdminPanel")
        {
            //this.Location = Graphics.DrawingSupport.GetCenter(this.Size);
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(354, 220);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Administration Panel";

            pnlWeather = new Panel("pnlWeather");
            pnlWeather.Size = new System.Drawing.Size(354, 220);
            pnlWeather.Location = new Point(0, 34);
            pnlWeather.BackColor = Color.White;
            pnlWeather.Visible = true;

            pnlPlayerInfo = new Panel("pnlPlayerInfo");
            pnlPlayerInfo.Size = new System.Drawing.Size(410, 500);
            pnlPlayerInfo.Location = new Point(0, 34);
            pnlPlayerInfo.BackColor = Color.White;
            pnlPlayerInfo.Visible = false;

            pnlCommands = new Panel("pnlCommands");
            pnlCommands.Size = new System.Drawing.Size(410, 348);
            pnlCommands.Location = new Point(0, 34);
            pnlCommands.BackColor = Color.White;
            pnlCommands.Visible = false;

            #region Widgets

            btnWeather = new Button("btnWeather");
            btnWeather.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnWeather.Location = new Point(27, 0);
            btnWeather.Size = new System.Drawing.Size(100, 32);
            btnWeather.Text = "Weather";
            btnWeather.Selected = true;
            btnWeather.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnWeather_Click);

            btnPlayerInfo = new Button("btnPlayerInfo");
            btnPlayerInfo.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnPlayerInfo.Location = new Point(127, 0);
            btnPlayerInfo.Size = new System.Drawing.Size(100, 32);
            btnPlayerInfo.Text = "Player Info";
            btnPlayerInfo.Selected = false;
            btnPlayerInfo.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnPlayerInfo_Click);

            btnCommands = new Button("btnCommands");
            btnCommands.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCommands.Location = new Point(227, 0);
            btnCommands.Size = new System.Drawing.Size(100, 32);
            btnCommands.Text = "Commands";
            btnCommands.Selected = false;
            btnCommands.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnCommands_Click);

            cbWeather = new ComboBox("cbWeather");
            cbWeather.Location = new Point(110, 20);
            cbWeather.Size = new System.Drawing.Size(134, 16);
            cbWeather.BackColor = Color.DarkGray;
            for (int i =0; i < 13; i++) {
                ListBoxTextItem item = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.Weather), i));
                cbWeather.Items.Add(item);
            }
            cbWeather.SelectItem(0);

            btnApplyWeather = new Button("btnApplyWeather");
            btnApplyWeather.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnApplyWeather.Location = new Point(110, 54);
            btnApplyWeather.Size = new System.Drawing.Size(134, 32);
            btnApplyWeather.Visible = true;
            btnApplyWeather.Text = "Apply";
            btnApplyWeather.Click += new EventHandler<MouseButtonEventArgs>(btnApplyWeather_Click);

            btnBanish = new Button("btnBanish");
            btnBanish.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBanish.Location = new Point(20, 20);
            btnBanish.Size = new System.Drawing.Size(134, 32);
            btnBanish.Visible = true;
            btnBanish.Text = "Ban";
            btnBanish.Click += new EventHandler<MouseButtonEventArgs>(btnBanish_Click);

            btnWarpTo = new Button("btnWarpTo");
            btnWarpTo.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnWarpTo.Location = new Point(200, 20);
            btnWarpTo.Size = new System.Drawing.Size(134, 32);
            btnWarpTo.Visible = true;
            btnWarpTo.Text = "Warp to Map";
            btnWarpTo.Click += new EventHandler<MouseButtonEventArgs>(btnWarpTo_Click);

            btnKick = new Button("btnKick");
            btnKick.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnKick.Location = new Point(20, 54);
            btnKick.Size = new System.Drawing.Size(134, 32);
            btnKick.Visible = true;
            btnKick.Text = "Kick";
            btnKick.Click += new EventHandler<MouseButtonEventArgs>(btnKick_Click);

            btnSetAccess = new Button("btnSetAccess");
            btnSetAccess.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSetAccess.Location = new Point(200, 54);
            btnSetAccess.Size = new System.Drawing.Size(134, 32);
            btnSetAccess.Visible = true;
            btnSetAccess.Text = "Set Access";
            btnSetAccess.Click += new EventHandler<MouseButtonEventArgs>(btnSetAccess_Click);

            cbAccessLevel = new ComboBox("cbAccessLevel");
            cbAccessLevel.Location = new Point(174, 274);
            cbAccessLevel.Size = new System.Drawing.Size(134, 18);
            cbAccessLevel.BackColor = Color.DarkGray;
            for (int i =0; i < 7; i++) {
                ListBoxTextItem item = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.Rank), i));
                cbAccessLevel.Items.Add(item);
            }
            cbAccessLevel.SelectItem(0);

            btnRespawn = new Button("btnRespawn");
            btnRespawn.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRespawn.Location = new Point(20, 88);
            btnRespawn.Size = new System.Drawing.Size(134, 32);
            btnRespawn.Visible = true;
            btnRespawn.Text = "Respawn";
            btnRespawn.Click += new EventHandler<MouseButtonEventArgs>(btnRespawn_Click);

            btnSetSprite = new Button("btnSetSprite");
            btnSetSprite.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSetSprite.Location = new Point(200, 88);
            btnSetSprite.Size = new System.Drawing.Size(134, 32);
            btnSetSprite.Visible = true;
            btnSetSprite.Text = "Set Species";
            btnSetSprite.Click += new EventHandler<MouseButtonEventArgs>(btnSetSprite_Click);

            btnWarpMeTo = new Button("btnWarpMeTo");
            btnWarpMeTo.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnWarpMeTo.Location = new Point(20, 122);
            btnWarpMeTo.Size = new System.Drawing.Size(134, 32);
            btnWarpMeTo.Visible = true;
            btnWarpMeTo.Text = "Warp Me to";
            btnWarpMeTo.Click += new EventHandler<MouseButtonEventArgs>(btnWarpMeTo_Click);

            btnSetPlayerSprite = new Button("btnSetPlayerSprite");
            btnSetPlayerSprite.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSetPlayerSprite.Location = new Point(200, 122);
            btnSetPlayerSprite.Size = new System.Drawing.Size(134, 32);
            btnSetPlayerSprite.Visible = true;
            btnSetPlayerSprite.Text = "Set Player Species";
            btnSetPlayerSprite.Click += new EventHandler<MouseButtonEventArgs>(btnSetPlayerSprite_Click);

            btnWarpToMe = new Button("btnWarpToMe");
            btnWarpToMe.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnWarpToMe.Location = new Point(110, 156);
            btnWarpToMe.Size = new System.Drawing.Size(134, 32);
            btnWarpToMe.Visible = true;
            btnWarpToMe.Text = "Warp to Me";
            btnWarpToMe.Click += new EventHandler<MouseButtonEventArgs>(btnWarpToMe_Click);

            lblPlayerName = new Label("lblPlayerName");
            lblPlayerName.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblPlayerName.Location = new Point(20, 210);
            lblPlayerName.Size = new System.Drawing.Size(134, 32);
            lblPlayerName.Text = "Player Name:";
            lblPlayerName.Visible = true;

            txtPlayerName = new TextBox("txtPlayerName");
            txtPlayerName.Location = new Point(174, 219);
            txtPlayerName.Size = new System.Drawing.Size(134, 18);
            txtPlayerName.Visible = true;

            lblSpriteNumber = new Label("lblSpriteNumber");
            lblSpriteNumber.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblSpriteNumber.Location = new Point(20, 242);
            lblSpriteNumber.Size = new System.Drawing.Size(134, 32);
            lblSpriteNumber.Text = "Species Number:";
            lblSpriteNumber.Visible = true;

            txtSpriteNumber = new TextBox("txtSpriteNumber");
            txtSpriteNumber.Location = new Point(174, 251);
            txtSpriteNumber.Size = new System.Drawing.Size(134, 18);
            txtSpriteNumber.Visible = true;

            lblAccessLevel = new Label("lblAccessLevel");
            lblAccessLevel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblAccessLevel.Location = new Point(20, 274);
            lblAccessLevel.Size = new System.Drawing.Size(134, 32);
            lblAccessLevel.Text = "Access Level:";
            lblAccessLevel.Visible = true;

            //boxAccessLevel = new DropBox("boxAccessLevel");
            //boxAccessLevel.Location = new Point(174, 274);
            //boxAccessLevel.visible = false;

            lblMapNumber = new Label("lblMapNumber");
            lblMapNumber.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblMapNumber.Location = new Point(20, 306);
            lblMapNumber.Size = new System.Drawing.Size(134, 32);
            lblMapNumber.Text = "Map Number:";
            lblMapNumber.Visible = true;

            txtMapNumber = new TextBox("txtMapNumber");
            txtMapNumber.Location = new Point(174, 315);
            txtMapNumber.Size = new System.Drawing.Size(134, 18);
            txtMapNumber.Visible = true;

            btnMapEditor = new Button("btnMapEditor");
            btnMapEditor.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnMapEditor.Location = new Point(20, 20);
            btnMapEditor.Size = new System.Drawing.Size(134, 32);
            btnMapEditor.Visible = true;
            btnMapEditor.Text = "Map Editor";
            btnMapEditor.Click += new EventHandler<MouseButtonEventArgs>(btnMapEditor_Click);

            btnMapReport = new Button("btnMapReport");
            btnMapReport.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnMapReport.Location = new Point(200, 20);
            btnMapReport.Size = new System.Drawing.Size(134, 32);
            btnMapReport.Visible = true;
            btnMapReport.Text = "Map Report";
            btnMapReport.Click += new EventHandler<MouseButtonEventArgs>(btnMapReport_Click);

            btnSpells = new Button("btnSpells");
            btnSpells.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSpells.Location = new Point(20, 54);
            btnSpells.Size = new System.Drawing.Size(134, 32);
            btnSpells.Visible = true;
            btnSpells.Text = "Edit Moves";
            btnSpells.Click += new EventHandler<MouseButtonEventArgs>(btnSpells_Click);

            btnItems = new Button("btnItems");
            btnItems.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnItems.Location = new Point(200, 54);
            btnItems.Size = new System.Drawing.Size(134, 32);
            btnItems.Visible = true;
            btnItems.Text = "Edit Items";
            btnItems.Click += new EventHandler<MouseButtonEventArgs>(btnItems_Click);

            btnShops = new Button("btnShops");
            btnShops.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnShops.Location = new Point(20, 88);
            btnShops.Size = new System.Drawing.Size(134, 32);
            btnShops.Visible = true;
            btnShops.Text = "Edit Shops";
            btnShops.Click += new EventHandler<MouseButtonEventArgs>(btnShops_Click);

            btnEvolutions = new Button("btnEvolutions");
            btnEvolutions.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEvolutions.Location = new Point(200, 88);
            btnEvolutions.Size = new System.Drawing.Size(134, 32);
            btnEvolutions.Visible = true;
            btnEvolutions.Text = "Edit Evolutions";
            btnEvolutions.Click += new EventHandler<MouseButtonEventArgs>(btnEvolutions_Click);

            btnStories = new Button("btnStories");
            btnStories.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnStories.Location = new Point(20, 122);
            btnStories.Size = new System.Drawing.Size(134, 32);
            btnStories.Visible = true;
            btnStories.Text = "Story Editor";
            btnStories.Click += new EventHandler<MouseButtonEventArgs>(btnStories_Click);

            btnNPC = new Button("btnNPC");
            btnNPC.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnNPC.Location = new Point(200, 122);
            btnNPC.Size = new System.Drawing.Size(134, 32);
            btnNPC.Visible = true;
            btnNPC.Text = "NPC Editor";
            btnNPC.Click += new EventHandler<MouseButtonEventArgs>(btnNPC_Click);

            //btnArrows = new Button("btnArrows");
            //btnArrows.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            //btnArrows.Location = new Point(20, 156);
            //btnArrows.Size = new System.Drawing.Size(134, 32);
            //btnArrows.Visible = true;
            //btnArrows.Text = "Edit Arrows";
            //btnArrows.Click += new EventHandler<MouseButtonEventArgs>(btnArrows_Click);

            btnEmotion = new Button("btnEmotion");
            btnEmotion.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEmotion.Location = new Point(200, 156);
            btnEmotion.Size = new System.Drawing.Size(134, 32);
            btnEmotion.Visible = true;
            btnEmotion.Text = "Edit Emotions";
            btnEmotion.Click += new EventHandler<MouseButtonEventArgs>(btnEmotion_Click);

            btnRDungeons = new Button("btnRDungeons");
            btnRDungeons.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRDungeons.Location = new Point(20, 156);
            btnRDungeons.Size = new System.Drawing.Size(134, 32);
            btnRDungeons.Visible = true;
            btnRDungeons.Text = "Edit Random Dungeons";
            btnRDungeons.Click += new EventHandler<MouseButtonEventArgs>(btnRDungeons_Click);

            btnMissions = new Button("btnMissions");
            btnMissions.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnMissions.Location = new Point(20, 190);
            btnMissions.Size = new System.Drawing.Size(134, 32);
            btnMissions.Visible = true;
            btnMissions.Text = "Edit Missions";
            btnMissions.Click += new EventHandler<MouseButtonEventArgs>(btnMissions_Click);

            btnDungeons = new Button("btnDungeons");
            btnDungeons.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnDungeons.Location = new Point(200, 190);
            btnDungeons.Size = new System.Drawing.Size(134, 32);
            btnDungeons.Visible = true;
            btnDungeons.Text = "Edit Dungeons";
            btnDungeons.Click += new EventHandler<MouseButtonEventArgs>(btnDungeons_Click);

            #region Addwidget

            pnlWeather.AddWidget(cbWeather);
            pnlWeather.AddWidget(btnApplyWeather);
            pnlPlayerInfo.AddWidget(btnBanish);
            pnlPlayerInfo.AddWidget(btnWarpTo);
            pnlPlayerInfo.AddWidget(btnKick);
            pnlPlayerInfo.AddWidget(btnSetAccess);
            pnlPlayerInfo.AddWidget(btnRespawn);
            pnlPlayerInfo.AddWidget(btnSetSprite);
            pnlPlayerInfo.AddWidget(btnWarpMeTo);
            pnlPlayerInfo.AddWidget(btnSetPlayerSprite);
            pnlPlayerInfo.AddWidget(btnWarpToMe);
            pnlPlayerInfo.AddWidget(lblPlayerName);
            pnlPlayerInfo.AddWidget(txtPlayerName);
            pnlPlayerInfo.AddWidget(lblSpriteNumber);
            pnlPlayerInfo.AddWidget(txtSpriteNumber);
            pnlPlayerInfo.AddWidget(lblAccessLevel);
            pnlPlayerInfo.AddWidget(cbAccessLevel);
            pnlPlayerInfo.AddWidget(lblMapNumber);
            pnlPlayerInfo.AddWidget(txtMapNumber);
            pnlCommands.AddWidget(btnMapEditor);
            pnlCommands.AddWidget(btnMapReport);
            pnlCommands.AddWidget(btnSpells);
            pnlCommands.AddWidget(btnItems);
            pnlCommands.AddWidget(btnShops);
            pnlCommands.AddWidget(btnEvolutions);
            pnlCommands.AddWidget(btnStories);
            pnlCommands.AddWidget(btnNPC);
            //pnlCommands.AddWidget(btnArrows);
            pnlCommands.AddWidget(btnEmotion);
            pnlCommands.AddWidget(btnRDungeons);
            pnlCommands.AddWidget(btnMissions);
            pnlCommands.AddWidget(btnDungeons);

            this.AddWidget(pnlWeather);
            this.AddWidget(btnWeather);
            this.AddWidget(pnlPlayerInfo);
            this.AddWidget(btnPlayerInfo);
            this.AddWidget(pnlCommands);
            this.AddWidget(btnCommands);

            this.LoadComplete();
            #endregion Addwidget

            #endregion Widgets
        }
示例#37
0
 public void LoadHelpTopics()
 {
     string[] dirs = System.IO.Directory.GetDirectories(IO.Paths.StartupPath + "Help");
     for (int i = 0; i < dirs.Length; i++) {
         ListBoxTextItem lbi = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), System.IO.Path.GetFileNameWithoutExtension(dirs[i]));
         lbi.ForeColor = Color.WhiteSmoke;
         lstHelpTopics.Items.Add(lbi);
     }
 }
示例#38
0
        public winMissionPanel()
            : base("winMissionPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Mission Panel";

            #region Panels
            pnlMissionList = new Panel("pnlMissionList");
            pnlMissionList.Size = new System.Drawing.Size(200, 230);
            pnlMissionList.Location = new Point(0, 0);
            pnlMissionList.BackColor = Color.White;
            pnlMissionList.Visible = true;

            pnlMissionEditor = new Panel("pnlMissionEditor");
            pnlMissionEditor.Size = new System.Drawing.Size(320, 300);
            pnlMissionEditor.Location = new Point(0, 0);
            pnlMissionEditor.BackColor = Color.White;
            pnlMissionEditor.Visible = false;

            pnlMissionGeneral = new Panel("pnlMissionGeneral");
            pnlMissionGeneral.Size = new System.Drawing.Size(320, 270);
            pnlMissionGeneral.Location = new Point(0, 30);
            pnlMissionGeneral.BackColor = Color.White;
            pnlMissionGeneral.Visible = true;

            pnlMissionRewards = new Panel("pnlMissionRewards");
            pnlMissionRewards.Size = new System.Drawing.Size(320, 270);
            pnlMissionRewards.Location = new Point(0, 30);
            pnlMissionRewards.BackColor = Color.White;
            pnlMissionRewards.Visible = false;

            pnlMissionClients = new Panel("pnlMissionClients");
            pnlMissionClients.Size = new System.Drawing.Size(320, 270);
            pnlMissionClients.Location = new Point(0, 30);
            pnlMissionClients.BackColor = Color.White;
            pnlMissionClients.Visible = false;

            pnlMissionEnemies = new Panel("pnlMissionEnemies");
            pnlMissionEnemies.Size = new System.Drawing.Size(320, 270);
            pnlMissionEnemies.Location = new Point(0, 30);
            pnlMissionEnemies.BackColor = Color.White;
            pnlMissionEnemies.Visible = false;
            #endregion

            #region Dungeon List
            lbxMissionList = new ListBox("lbxMissionList");
            lbxMissionList.Location = new Point(10, 10);
            lbxMissionList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                ListBoxTextItem lbiMission = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), i + ": ");
                lbxMissionList.Items.Add(lbiMission);
            }

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            #endregion

            #region Dungeon Editor Panel

            btnGeneral = new Button("btnGeneral");
            btnGeneral.Location = new Point(5, 5);
            btnGeneral.Size = new Size(70, 20);
            btnGeneral.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnGeneral.Text = "General";
            btnGeneral.Click += new EventHandler<MouseButtonEventArgs>(btnGeneral_Click);

            btnClients = new Button("btnClients");
            btnClients.Location = new Point(80, 5);
            btnClients.Size = new Size(70, 20);
            btnClients.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnClients.Text = "Clients";
            btnClients.Click += new EventHandler<MouseButtonEventArgs>(btnClients_Click);

            btnEnemies = new Button("btnEnemies");
            btnEnemies.Location = new Point(155, 5);
            btnEnemies.Size = new Size(70, 20);
            btnEnemies.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEnemies.Text = "Enemies";
            btnEnemies.Click += new EventHandler<MouseButtonEventArgs>(btnEnemies_Click);

            btnRewards = new Button("btnRewards");
            btnRewards.Location = new Point(230, 5);
            btnRewards.Size = new Size(70, 20);
            btnRewards.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRewards.Text = "Rewards";
            btnRewards.Click += new EventHandler<MouseButtonEventArgs>(btnRewards_Click);

            #endregion

            #region General

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(120, 75);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(20, 75);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            #endregion

            #region Enemies

            lblNpcNum = new Label("lblNpcNum");
            lblNpcNum.AutoSize = true;
            lblNpcNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblNpcNum.Location = new Point(10, 0);
            lblNpcNum.Text = "Num:";

            nudNpcNum = new NumericUpDown("nudNpcNum");
            nudNpcNum.Size = new Size(70, 20);
            nudNpcNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudNpcNum.Maximum = Int32.MaxValue;
            nudNpcNum.Minimum = 1;
            nudNpcNum.Location = new Point(10, 14);

            btnAddEnemy = new Button("btnAddEnemy");
            btnAddEnemy.Size = new Size(70, 16);
            btnAddEnemy.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddEnemy.Location = new Point(5, 72);
            btnAddEnemy.Text = "Add";
            btnAddEnemy.Click += new EventHandler<MouseButtonEventArgs>(btnAddEnemy_Click);

            btnRemoveEnemy = new Button("btnRemoveEnemy");
            btnRemoveEnemy.Size = new Size(70, 16);
            btnRemoveEnemy.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveEnemy.Location = new Point(80, 72);
            btnRemoveEnemy.Text = "Remove";
            btnRemoveEnemy.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveEnemy_Click);

            btnLoadEnemy = new Button("btnLoadEnemy");
            btnLoadEnemy.Size = new Size(70, 16);
            btnLoadEnemy.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadEnemy.Location = new Point(155, 72);
            btnLoadEnemy.Text = "Load";
            //btnLoadEnemy.Click += new EventHandler<MouseButtonEventArgs>(btnLoadEnemy_Click);

            lbxMissionEnemies = new ListBox("lbxMissionEnemies");
            lbxMissionEnemies.Location = new Point(10, 90);
            lbxMissionEnemies.Size = new Size(pnlMissionClients.Size.Width - 20, pnlMissionClients.Size.Height - 120);
            lbxMissionEnemies.MultiSelect = false;

            #endregion

            #region Rewards

            lblItemNum = new Label("lblItemNum");
            lblItemNum.AutoSize = true;
            lblItemNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblItemNum.Location = new Point(10, 0);
            lblItemNum.Text = "Num:";

            nudItemNum = new NumericUpDown("nudItemNum");
            nudItemNum.Size = new Size(170, 20);
            nudItemNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudItemNum.Maximum = 2000;
            nudItemNum.Minimum = 1;
            nudItemNum.Location = new Point(10, 14);
            nudItemNum.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudItemNum_ValueChanged);

            lblItemAmount = new Label("lblItemAmount");
            lblItemAmount.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblItemAmount.Text = "Amount:";
            lblItemAmount.AutoSize = true;
            lblItemAmount.Location = new Point(200, 0);

            nudItemAmount = new NumericUpDown("nudItemAmount");
            nudItemAmount.Size = new Size(70, 20);
            nudItemAmount.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudItemAmount.Location = new Point(200, 14);
            nudItemAmount.Maximum = Int32.MaxValue;

            lblItemTag = new Label("lblItemTag");
            lblItemTag.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblItemTag.Text = "Tag:";
            lblItemTag.AutoSize = true;
            lblItemTag.Location = new Point(10, 34);

            txtItemTag = new TextBox("txtItemTag");
            txtItemTag.Size = new Size(200, 20);
            txtItemTag.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            txtItemTag.Location = new Point(10, 48);

            btnAddItem = new Button("btnAddItem");
            btnAddItem.Size = new Size(70, 16);
            btnAddItem.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddItem.Location = new Point(5, 72);
            btnAddItem.Text = "Add";
            btnAddItem.Click += new EventHandler<MouseButtonEventArgs>(btnAddItem_Click);

            btnRemoveItem = new Button("btnRemoveItem");
            btnRemoveItem.Size = new Size(70, 16);
            btnRemoveItem.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveItem.Location = new Point(80, 72);
            btnRemoveItem.Text = "Remove";
            btnRemoveItem.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveItem_Click);

            btnLoadItem = new Button("btnLoadItem");
            btnLoadItem.Size = new Size(70, 16);
            btnLoadItem.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadItem.Location = new Point(155, 72);
            btnLoadItem.Text = "Load";
            btnLoadItem.Click += new EventHandler<MouseButtonEventArgs>(btnLoadItem_Click);

            lbxMissionRewards = new ListBox("lbxMissionRewards");
            lbxMissionRewards.Location = new Point(10, 90);
            lbxMissionRewards.Size = new Size(pnlMissionClients.Size.Width - 20, pnlMissionClients.Size.Height - 120);
            lbxMissionRewards.MultiSelect = false;

            #endregion

            #region Clients

            lblDexNum = new Label("lblDexNum");
            lblDexNum.AutoSize = true;
            lblDexNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblDexNum.Location = new Point(2, 0);
            lblDexNum.Text = "Dex #";

            nudDexNum = new NumericUpDown("nudDexNum");
            nudDexNum.Size = new Size(70, 20);
            nudDexNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudDexNum.Maximum = 649;
            nudDexNum.Minimum = 1;
            nudDexNum.Location = new Point(10, 14);
            nudDexNum.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudDexNum_ValueChanged);

            lblFormNum = new Label("lblFormNum");
            lblFormNum.AutoSize = true;
            lblFormNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblFormNum.Location = new Point(240, 0);
            lblFormNum.Text = "Form #";

            nudFormNum = new NumericUpDown("nudFormNum");
            nudFormNum.Size = new Size(70, 20);
            nudFormNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudFormNum.Maximum = Int32.MaxValue;
            nudFormNum.Minimum = 0;
            nudFormNum.Location = new Point(240, 14);

            btnAddMissionClient = new Button("btnAddMissionClient");
            btnAddMissionClient.Size = new Size(70, 16);
            btnAddMissionClient.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddMissionClient.Location = new Point(5, 72);
            btnAddMissionClient.Text = "Add";
            btnAddMissionClient.Click += new EventHandler<MouseButtonEventArgs>(btnAddMissionClient_Click);

            btnRemoveMissionClient = new Button("btnRemoveMissionClient");
            btnRemoveMissionClient.Size = new Size(70, 16);
            btnRemoveMissionClient.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveMissionClient.Location = new Point(80, 72);
            btnRemoveMissionClient.Text = "Remove";
            btnRemoveMissionClient.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveMissionClient_Click);

            btnLoadMissionClient = new Button("btnLoadMissionClient");
            btnLoadMissionClient.Size = new Size(70, 16);
            btnLoadMissionClient.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadMissionClient.Location = new Point(155, 72);
            btnLoadMissionClient.Text = "Load";
            btnLoadMissionClient.Click += new EventHandler<MouseButtonEventArgs>(btnLoadMissionClient_Click);

            lbxMissionClients = new ListBox("lbxMissionClients");
            lbxMissionClients.Location = new Point(10, 90);
            lbxMissionClients.Size = new Size(pnlMissionEnemies.Size.Width - 20, pnlMissionEnemies.Size.Height - 120);
            lbxMissionClients.MultiSelect = false;

            #endregion

            #region Addwidget
            //Dungeon List
            pnlMissionList.AddWidget(lbxMissionList);
            pnlMissionList.AddWidget(btnBack);
            pnlMissionList.AddWidget(btnForward);
            pnlMissionList.AddWidget(btnEdit);
            pnlMissionList.AddWidget(btnCancel);
            //General
            pnlMissionGeneral.AddWidget(btnEditorCancel);
            pnlMissionGeneral.AddWidget(btnEditorOK);
            //Clients
            pnlMissionClients.AddWidget(lblDexNum);
            pnlMissionClients.AddWidget(nudDexNum);
            pnlMissionClients.AddWidget(lblFormNum);
            pnlMissionClients.AddWidget(nudFormNum);
            pnlMissionClients.AddWidget(btnAddMissionClient);
            pnlMissionClients.AddWidget(btnRemoveMissionClient);
            pnlMissionClients.AddWidget(btnLoadMissionClient);
            pnlMissionClients.AddWidget(lbxMissionClients);
            //Enemies
            pnlMissionEnemies.AddWidget(lblNpcNum);
            pnlMissionEnemies.AddWidget(nudNpcNum);
            pnlMissionEnemies.AddWidget(btnAddEnemy);
            pnlMissionEnemies.AddWidget(btnRemoveEnemy);
            //pnlMissionEnemies.AddWidget(btnLoadEnemy);
            pnlMissionEnemies.AddWidget(lbxMissionEnemies);
            //Rewards
            pnlMissionRewards.AddWidget(lblItemNum);
            pnlMissionRewards.AddWidget(nudItemNum);
            pnlMissionRewards.AddWidget(lblItemAmount);
            pnlMissionRewards.AddWidget(nudItemAmount);
            pnlMissionRewards.AddWidget(lblItemTag);
            pnlMissionRewards.AddWidget(txtItemTag);
            pnlMissionRewards.AddWidget(btnAddItem);
            pnlMissionRewards.AddWidget(btnRemoveItem);
            pnlMissionRewards.AddWidget(btnLoadItem);
            pnlMissionRewards.AddWidget(lbxMissionRewards);
            //Editor panel
            pnlMissionEditor.AddWidget(btnGeneral);
            pnlMissionEditor.AddWidget(btnClients);
            pnlMissionEditor.AddWidget(btnEnemies);
            pnlMissionEditor.AddWidget(btnRewards);
            pnlMissionEditor.AddWidget(pnlMissionGeneral);
            pnlMissionEditor.AddWidget(pnlMissionClients);
            pnlMissionEditor.AddWidget(pnlMissionEnemies);
            pnlMissionEditor.AddWidget(pnlMissionRewards);
            //This
            this.AddWidget(pnlMissionList);
            this.AddWidget(pnlMissionEditor);
            #endregion

            RefreshMissionList();
        }
示例#39
0
        public winItemPanel()
            : base("winItemPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Item Panel";

            pnlItemList = new Panel("pnlItemList");
            pnlItemList.Size = new System.Drawing.Size(200, 230);
            pnlItemList.Location = new Point(0, 0);
            pnlItemList.BackColor = Color.White;
            pnlItemList.Visible = true;

            pnlItemEditor = new Panel("pnlItemEditor");
            pnlItemEditor.Size = new System.Drawing.Size(580, 380);
            pnlItemEditor.Location = new Point(0, 0);
            pnlItemEditor.BackColor = Color.White;
            pnlItemEditor.Visible = false;

            lbxItemList = new ListBox("lbxItemList");
            lbxItemList.Location = new Point(10, 10);
            lbxItemList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Items.ItemHelper.Items[(i + 1) + 10 * currentTen].Name);
                lbxItemList.Items.Add(lbiItem);
            }
            lbxItemList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            //btnAddNew = new Button("btnAddNew");
            //btnAddNew.Location = new Point();
            //btnAddNew.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            //btnAddNew.Size = new System.Drawing.Size(64, 16);
            //btnAddNew.Visible = true;
            //btnAddNew.Text = "Add New";
            //btnAddNew.Click += new EventHandler<MouseButtonEventArgs>(btnAddNew_Click);

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(100, 334);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(10, 334);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "Item Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 16);
            txtName.Location = new Point(10, 16);

            lblSprite = new Label("lblSprite");
            lblSprite.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSprite.Text = "Item Sprite:";
            lblSprite.AutoSize = true;
            lblSprite.Location = new Point(10, 36);

            pic = new Widgets.ItemsetViewer("pic");
            pic.Location = new Point(10, 48);
            pic.Size = new Size(204, 144);
            pic.ActiveItemSurface = Graphics.GraphicsManager.Items;

            lblSellPrice = new Label("lblSellPrice");
            lblSellPrice.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSellPrice.Text = "Sell Price:";
            lblSellPrice.AutoSize = true;
            lblSellPrice.Location = new Point(10, 200);

            nudSellPrice = new NumericUpDown("nudSellPrice");
            nudSellPrice.Size = new Size(200, 16);
            nudSellPrice.Location = new Point(10, 212);
            nudSellPrice.Minimum = 0;
            nudSellPrice.Maximum = Int32.MaxValue;

            nudStackCap = new NumericUpDown("nudStackCap");
            nudStackCap.Location = new Point(10, 232);
            nudStackCap.Size = new System.Drawing.Size(95, 17);
            nudStackCap.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudStackCap.Minimum = 0;
            nudStackCap.Maximum = Int32.MaxValue;

            lblStackCap = new Label("lblStackCap");
            lblStackCap.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblStackCap.Text = "Stack Cap";
            lblStackCap.AutoSize = true;
            lblStackCap.Location = new Point(110, 232);

            chkBound = new CheckBox("chkBound");
            chkBound.Location = new Point(10, 252);
            chkBound.Size = new System.Drawing.Size(95, 17);
            chkBound.BackColor = Color.Transparent;
            chkBound.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkBound.Text = "Bound";

            chkLoseable = new CheckBox("chkLoseable");
            chkLoseable.Location = new Point(10, 272);
            chkLoseable.Size = new System.Drawing.Size(95, 17);
            chkLoseable.BackColor = Color.Transparent;
            chkLoseable.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkLoseable.Text = "Loseable";

            lblDescription = new Label("lblDescription");
            lblDescription.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblDescription.Text = "Description:";
            lblDescription.AutoSize = true;
            lblDescription.Location = new Point(10, 292);

            txtDescription = new TextBox("txtDescription");
            txtDescription.Size = new Size(300, 16);
            txtDescription.Location = new Point(10, 304);

            lblType = new Label("lblType");
            lblType.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblType.Text = "Item Type:";
            lblType.AutoSize = true;
            lblType.Location = new Point(220, 4);

            optTypeNone = new RadioButton("optTypeNone");
            optTypeNone.BackColor = Color.Transparent;
            optTypeNone.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeNone.Location = new Point(220, 24);
            optTypeNone.Size = new System.Drawing.Size(95, 17);
            optTypeNone.Text = "None";
            optTypeNone.Checked = true;

            optTypeHeld = new RadioButton("optTypeHeld");
            optTypeHeld.BackColor = Color.Transparent;
            optTypeHeld.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeHeld.Location = new Point(220, 44);
            optTypeHeld.Size = new System.Drawing.Size(95, 17);
            optTypeHeld.Text = "Held Item";

            optTypeHeldByParty = new RadioButton("optTypeHeldByParty");
            optTypeHeldByParty.BackColor = Color.Transparent;
            optTypeHeldByParty.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeHeldByParty.Location = new Point(220, 64);
            optTypeHeldByParty.Size = new System.Drawing.Size(95, 17);
            optTypeHeldByParty.Text = "Party Item";

            optTypeHeldInBag = new RadioButton("optTypeHeldInBag");
            optTypeHeldInBag.BackColor = Color.Transparent;
            optTypeHeldInBag.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeHeldInBag.Location = new Point(220, 84);
            optTypeHeldInBag.Size = new System.Drawing.Size(95, 17);
            optTypeHeldInBag.Text = "Bag Item";

            optTypePotionAddHP = new RadioButton("optTypePotionAddHP");
            optTypePotionAddHP.BackColor = Color.Transparent;
            optTypePotionAddHP.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionAddHP.Location = new Point(220, 104);
            optTypePotionAddHP.Size = new System.Drawing.Size(95, 17);
            optTypePotionAddHP.Text = "HP Heal";

            optTypePotionAddPP = new RadioButton("optTypePotionAddPP");
            optTypePotionAddPP.BackColor = Color.Transparent;
            optTypePotionAddPP.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionAddPP.Location = new Point(220, 124);
            optTypePotionAddPP.Size = new System.Drawing.Size(95, 17);
            optTypePotionAddPP.Text = "PP Heal";

            optTypePotionAddBelly = new RadioButton("optTypePotionAddBelly");
            optTypePotionAddBelly.BackColor = Color.Transparent;
            optTypePotionAddBelly.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionAddBelly.Location = new Point(220, 144);
            optTypePotionAddBelly.Size = new System.Drawing.Size(95, 17);
            optTypePotionAddBelly.Text = "Belly Heal";

            optTypePotionSubHP = new RadioButton("optTypePotionSubHP");
            optTypePotionSubHP.BackColor = Color.Transparent;
            optTypePotionSubHP.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionSubHP.Location = new Point(220, 164);
            optTypePotionSubHP.Size = new System.Drawing.Size(95, 17);
            optTypePotionSubHP.Text = "HP Loss";

            optTypePotionSubPP = new RadioButton("optTypePotionSubPP");
            optTypePotionSubPP.BackColor = Color.Transparent;
            optTypePotionSubPP.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionSubPP.Location = new Point(220, 184);
            optTypePotionSubPP.Size = new System.Drawing.Size(95, 17);
            optTypePotionSubPP.Text = "PP Loss";

            optTypePotionSubBelly = new RadioButton("optTypePotionSubBelly");
            optTypePotionSubBelly.BackColor = Color.Transparent;
            optTypePotionSubBelly.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionSubBelly.Location = new Point(220, 204);
            optTypePotionSubBelly.Size = new System.Drawing.Size(95, 17);
            optTypePotionSubBelly.Text = "Belly Loss";

            optTypeKey = new RadioButton("optTypeKey");
            optTypeKey.BackColor = Color.Transparent;
            optTypeKey.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeKey.Location = new Point(220, 224);
            optTypeKey.Size = new System.Drawing.Size(95, 17);
            optTypeKey.Text = "Key";

            optTypeCurrency = new RadioButton("optTypeCurrency");
            optTypeCurrency.BackColor = Color.Transparent;
            optTypeCurrency.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeCurrency.Location = new Point(220, 244);
            optTypeCurrency.Size = new System.Drawing.Size(95, 17);
            optTypeCurrency.Text = "Currency";

            optTypeTM = new RadioButton("optTypeTM");
            optTypeTM.BackColor = Color.Transparent;
            optTypeTM.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeTM.Location = new Point(220, 264);
            optTypeTM.Size = new System.Drawing.Size(95, 17);
            optTypeTM.Text = "TM";

            optTypeScripted = new RadioButton("optTypeScripted");
            optTypeScripted.BackColor = Color.Transparent;
            optTypeScripted.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeScripted.Location = new Point(220, 284);
            optTypeScripted.Size = new System.Drawing.Size(95, 17);
            optTypeScripted.Text = "Scripted";

            lblData1 = new Label("lblData1");
            lblData1.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData1.Text = "Data1:";
            lblData1.AutoSize = true;
            lblData1.Location = new Point(340, 4);

            nudData1 = new NumericUpDown("nudData1");
            nudData1.Size = new Size(100, 16);
            nudData1.Location = new Point(340, 16);
            nudData1.Minimum = Int32.MinValue;
            nudData1.Maximum = Int32.MaxValue;

            lblData2 = new Label("lblData2");
            lblData2.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData2.Text = "Data2:";
            lblData2.AutoSize = true;
            lblData2.Location = new Point(340, 36);

            nudData2 = new NumericUpDown("nudData2");
            nudData2.Size = new Size(100, 16);
            nudData2.Location = new Point(340, 48);
            nudData2.Minimum = Int32.MinValue;
            nudData2.Maximum = Int32.MaxValue;

            lblData3 = new Label("lblData3");
            lblData3.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData3.Text = "Data3:";
            lblData3.AutoSize = true;
            lblData3.Location = new Point(340, 68);

            nudData3 = new NumericUpDown("nudData3");
            nudData3.Size = new Size(100, 16);
            nudData3.Location = new Point(340, 80);
            nudData3.Minimum = Int32.MinValue;
            nudData3.Maximum = Int32.MaxValue;

            lblRarity = new Label("lblRarity");
            lblRarity.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblRarity.Text = "Rarity: (1-10)";
            lblRarity.AutoSize = true;
            lblRarity.Location = new Point(340, 100);

            nudRarity = new NumericUpDown("nudRarity");
            nudRarity.Size = new Size(100, 16);
            nudRarity.Location = new Point(340, 112);
            nudRarity.Minimum = 1;
            nudRarity.Maximum = 10;

            lblAtkReq = new Label("lblAtkReq");
            lblAtkReq.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAtkReq.Text = "Req Data 1:";
            lblAtkReq.AutoSize = true;
            lblAtkReq.Location = new Point(340, 132);

            nudAtkReq = new NumericUpDown("nudAtkReq");
            nudAtkReq.Size = new Size(100, 16);
            nudAtkReq.Location = new Point(340, 144);
            nudAtkReq.Minimum = Int32.MinValue;
            nudAtkReq.Maximum = Int32.MaxValue;

            lblDefReq = new Label("lblDefReq");
            lblDefReq.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblDefReq.Text = "Req Data 2:";
            lblDefReq.AutoSize = true;
            lblDefReq.Location = new Point(340, 164);

            nudDefReq = new NumericUpDown("nudDefReq");
            nudDefReq.Size = new Size(100, 16);
            nudDefReq.Location = new Point(340, 176);
            nudDefReq.Minimum = Int32.MinValue;
            nudDefReq.Maximum = Int32.MaxValue;

            lblSpAtkReq = new Label("lblSpAtkReq");
            lblSpAtkReq.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSpAtkReq.Text = "Req Data 3:";
            lblSpAtkReq.AutoSize = true;
            lblSpAtkReq.Location = new Point(340, 196);

            nudSpAtkReq = new NumericUpDown("nudSpAtkReq");
            nudSpAtkReq.Size = new Size(100, 16);
            nudSpAtkReq.Location = new Point(340, 208);
            nudSpAtkReq.Minimum = Int32.MinValue;
            nudSpAtkReq.Maximum = Int32.MaxValue;

            lblSpDefReq = new Label("lblSpDefReq");
            lblSpDefReq.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSpDefReq.Text = "Req Data 4:";
            lblSpDefReq.AutoSize = true;
            lblSpDefReq.Location = new Point(340, 228);

            nudSpDefReq = new NumericUpDown("nudSpDefReq");
            nudSpDefReq.Size = new Size(100, 16);
            nudSpDefReq.Location = new Point(340, 240);
            nudSpDefReq.Minimum = Int32.MinValue;
            nudSpDefReq.Maximum = Int32.MaxValue;

            lblSpeedReq = new Label("lblSpeedReq");
            lblSpeedReq.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSpeedReq.Text = "Req Data 5:";
            lblSpeedReq.AutoSize = true;
            lblSpeedReq.Location = new Point(340, 260);

            nudSpeedReq = new NumericUpDown("nudSpeedReq");
            nudSpeedReq.Size = new Size(100, 16);
            nudSpeedReq.Location = new Point(340, 272);
            nudSpeedReq.Minimum = Int32.MinValue;
            nudSpeedReq.Maximum = Int32.MaxValue;

            lblScriptedReq = new Label("lblScriptedReq");
            lblScriptedReq.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblScriptedReq.Text = "Req Script: >= -1";
            lblScriptedReq.AutoSize = true;
            lblScriptedReq.Location = new Point(340, 292);

            nudScriptedReq = new NumericUpDown("nudScriptedReq");
            nudScriptedReq.Size = new Size(100, 16);
            nudScriptedReq.Location = new Point(340, 304);
            nudScriptedReq.Minimum = -1;
            nudScriptedReq.Maximum = Int32.MaxValue;

            lblAddHP = new Label("lblAddHP");
            lblAddHP.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddHP.Text = "Add HP:";
            lblAddHP.AutoSize = true;
            lblAddHP.Location = new Point(460, 4);

            nudAddHP = new NumericUpDown("nudAddHP");
            nudAddHP.Size = new Size(100, 16);
            nudAddHP.Location = new Point(460, 16);
            nudAddHP.Minimum = Int32.MinValue;
            nudAddHP.Maximum = Int32.MaxValue;

            lblAddPP = new Label("lblAddPP");
            lblAddPP.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddPP.Text = "Add PP:";
            lblAddPP.AutoSize = true;
            lblAddPP.Location = new Point(460, 36);

            nudAddPP = new NumericUpDown("nudAddPP");
            nudAddPP.Size = new Size(100, 16);
            nudAddPP.Location = new Point(460, 48);
            nudAddPP.Minimum = Int32.MinValue;
            nudAddPP.Maximum = Int32.MaxValue;

            lblAddEXP = new Label("lblAddEXP");
            lblAddEXP.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddEXP.Text = "Add EXP: (+-100)";
            lblAddEXP.AutoSize = true;
            lblAddEXP.Location = new Point(460, 68);

            nudAddEXP = new NumericUpDown("nudAddEXP");
            nudAddEXP.Size = new Size(100, 16);
            nudAddEXP.Location = new Point(460, 80);
            nudAddEXP.Minimum = -100;
            nudAddEXP.Maximum = 100;

            lblAddAtk = new Label("lblAddAtk");
            lblAddAtk.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddAtk.Text = "Add Atk:";
            lblAddAtk.AutoSize = true;
            lblAddAtk.Location = new Point(460, 100);

            nudAddAtk = new NumericUpDown("nudAddAtk");
            nudAddAtk.Size = new Size(100, 16);
            nudAddAtk.Location = new Point(460, 112);
            nudAddAtk.Minimum = Int32.MinValue;
            nudAddAtk.Maximum = Int32.MaxValue;

            lblAddDef = new Label("lblAddDef");
            lblAddDef.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddDef.Text = "Add Def:";
            lblAddDef.AutoSize = true;
            lblAddDef.Location = new Point(460, 132);

            nudAddDef = new NumericUpDown("nudAddDef");
            nudAddDef.Size = new Size(100, 16);
            nudAddDef.Location = new Point(460, 144);
            nudAddDef.Minimum = Int32.MinValue;
            nudAddDef.Maximum = Int32.MaxValue;

            lblAddSpAtk = new Label("lblAddSpAtk");
            lblAddSpAtk.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddSpAtk.Text = "Add SpAtk:";
            lblAddSpAtk.AutoSize = true;
            lblAddSpAtk.Location = new Point(460, 164);

            nudAddSpAtk = new NumericUpDown("nudAddSpAtk");
            nudAddSpAtk.Size = new Size(100, 16);
            nudAddSpAtk.Location = new Point(460, 176);
            nudAddSpAtk.Minimum = Int32.MinValue;
            nudAddSpAtk.Maximum = Int32.MaxValue;

            lblAddSpDef = new Label("lblAddSpDef");
            lblAddSpDef.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddSpDef.Text = "Add SpDef:";
            lblAddSpDef.AutoSize = true;
            lblAddSpDef.Location = new Point(460, 196);

            nudAddSpDef = new NumericUpDown("nudAddSpDef");
            nudAddSpDef.Size = new Size(100, 16);
            nudAddSpDef.Location = new Point(460, 208);
            nudAddSpDef.Minimum = Int32.MinValue;
            nudAddSpDef.Maximum = Int32.MaxValue;

            lblAddSpeed = new Label("lblAddSpeed");
            lblAddSpeed.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddSpeed.Text = "Add Speed:";
            lblAddSpeed.AutoSize = true;
            lblAddSpeed.Location = new Point(460, 228);

            nudAddSpeed = new NumericUpDown("nudAddSpeed");
            nudAddSpeed.Size = new Size(100, 16);
            nudAddSpeed.Location = new Point(460, 240);
            nudAddSpeed.Minimum = Int32.MinValue;
            nudAddSpeed.Maximum = Int32.MaxValue;

            lblAttackSpeed = new Label("lblAttackSpeed");
            lblAttackSpeed.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAttackSpeed.Text = "Hit Rate: (1-10000)";//confirm this
            lblAttackSpeed.AutoSize = true;
            lblAttackSpeed.Location = new Point(460, 260);

            nudAttackSpeed = new NumericUpDown("nudAttackSpeed");
            nudAttackSpeed.Size = new Size(100, 16);
            nudAttackSpeed.Location = new Point(460, 272);
            nudAttackSpeed.Minimum = 1;
            nudAttackSpeed.Maximum = 10000;

            lblRecruitBonus = new Label("lblRecruitBonus");
            lblRecruitBonus.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblRecruitBonus.Text = "Add Recruit:";
            lblRecruitBonus.AutoSize = true;
            lblRecruitBonus.Location = new Point(460, 292);

            nudRecruitBonus = new NumericUpDown("nudRecruitBonus");
            nudRecruitBonus.Size = new Size(100, 16);
            nudRecruitBonus.Location = new Point(460, 304);
            nudRecruitBonus.Minimum = Int32.MinValue;
            nudRecruitBonus.Maximum = Int32.MaxValue;

            //lbxItems = new SdlDotNet.Widgets.ListBox("lbxItems");
            //lbxItems.Location = new Point(20, 20);

            //set font properties, items, etc.

            //this.AddWidget(lbxItems);
            pnlItemList.AddWidget(lbxItemList);
            pnlItemList.AddWidget(btnBack);
            pnlItemList.AddWidget(btnForward);
            //pnlItemList.AddWidget(btnAddNew);
            pnlItemList.AddWidget(btnEdit);
            pnlItemList.AddWidget(btnCancel);

            pnlItemEditor.AddWidget(lblName);
            pnlItemEditor.AddWidget(txtName);
            pnlItemEditor.AddWidget(lblSprite);
            pnlItemEditor.AddWidget(pic);
            pnlItemEditor.AddWidget(lblSellPrice);
            pnlItemEditor.AddWidget(nudSellPrice);
            pnlItemEditor.AddWidget(nudStackCap);
            pnlItemEditor.AddWidget(lblStackCap);
            pnlItemEditor.AddWidget(chkBound);
            pnlItemEditor.AddWidget(chkLoseable);
            pnlItemEditor.AddWidget(lblDescription);
            pnlItemEditor.AddWidget(txtDescription);

            pnlItemEditor.AddWidget(lblType);
            pnlItemEditor.AddWidget(optTypeNone);
            pnlItemEditor.AddWidget(optTypeHeld);
            pnlItemEditor.AddWidget(optTypeHeldByParty);
            pnlItemEditor.AddWidget(optTypeHeldInBag);
            pnlItemEditor.AddWidget(optTypePotionAddHP);
            pnlItemEditor.AddWidget(optTypePotionAddPP);
            pnlItemEditor.AddWidget(optTypePotionAddBelly);
            pnlItemEditor.AddWidget(optTypePotionSubHP);
            pnlItemEditor.AddWidget(optTypePotionSubPP);
            pnlItemEditor.AddWidget(optTypePotionSubBelly);
            pnlItemEditor.AddWidget(optTypeKey);
            pnlItemEditor.AddWidget(optTypeCurrency);
            pnlItemEditor.AddWidget(optTypeTM);
            pnlItemEditor.AddWidget(optTypeScripted);

            pnlItemEditor.AddWidget(lblData1);
            pnlItemEditor.AddWidget(nudData1);
            pnlItemEditor.AddWidget(lblData2);
            pnlItemEditor.AddWidget(nudData2);
            pnlItemEditor.AddWidget(lblData3);
            pnlItemEditor.AddWidget(nudData3);
            pnlItemEditor.AddWidget(lblRarity);
            pnlItemEditor.AddWidget(nudRarity);
            pnlItemEditor.AddWidget(lblAtkReq);
            pnlItemEditor.AddWidget(nudAtkReq);
            pnlItemEditor.AddWidget(lblDefReq);
            pnlItemEditor.AddWidget(nudDefReq);
            pnlItemEditor.AddWidget(lblSpAtkReq);
            pnlItemEditor.AddWidget(nudSpAtkReq);
            pnlItemEditor.AddWidget(lblSpDefReq);
            pnlItemEditor.AddWidget(nudSpDefReq);
            pnlItemEditor.AddWidget(lblSpeedReq);
            pnlItemEditor.AddWidget(nudSpeedReq);
            pnlItemEditor.AddWidget(lblScriptedReq);
            pnlItemEditor.AddWidget(nudScriptedReq);

            pnlItemEditor.AddWidget(lblAddHP);
            pnlItemEditor.AddWidget(nudAddHP);
            pnlItemEditor.AddWidget(lblAddPP);
            pnlItemEditor.AddWidget(nudAddPP);
            pnlItemEditor.AddWidget(lblAddAtk);
            pnlItemEditor.AddWidget(nudAddAtk);
            pnlItemEditor.AddWidget(lblAddDef);
            pnlItemEditor.AddWidget(nudAddDef);
            pnlItemEditor.AddWidget(lblAddSpAtk);
            pnlItemEditor.AddWidget(nudAddSpAtk);
            pnlItemEditor.AddWidget(lblAddSpDef);
            pnlItemEditor.AddWidget(nudAddSpDef);
            pnlItemEditor.AddWidget(lblAddSpeed);
            pnlItemEditor.AddWidget(nudAddSpeed);
            pnlItemEditor.AddWidget(lblAddEXP);
            pnlItemEditor.AddWidget(nudAddEXP);
            pnlItemEditor.AddWidget(lblAttackSpeed);
            pnlItemEditor.AddWidget(nudAttackSpeed);
            pnlItemEditor.AddWidget(lblRecruitBonus);
            pnlItemEditor.AddWidget(nudRecruitBonus);

            pnlItemEditor.AddWidget(btnEditorCancel);
            pnlItemEditor.AddWidget(btnEditorOK);

            this.AddWidget(pnlItemList);
            this.AddWidget(pnlItemEditor);

            this.LoadComplete();
        }
示例#40
0
        public void LoadGuildFromPacket(string[] parse)
        {
            ranks = new List<Enums.GuildRank>();
            lbxMembers.Items.Clear();

            int count = parse[1].ToInt();

            for (int i = 0; i < count; i++) {
                Enums.GuildRank rank = (Enums.GuildRank)parse[2 + i * 3 + 1].ToInt();
                Color color;
                switch (rank) {
                    case Enums.GuildRank.Member:
                        color = Color.LightSkyBlue;
                        break;
                    case Enums.GuildRank.Admin:
                        color = Color.Yellow;
                        break;
                    case Enums.GuildRank.Founder:
                        color = Color.LawnGreen;
                        break;
                    default:
                        color = Color.Red;
                        break;
                }
                ListBoxTextItem lbiName = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "[" + rank + "] " + parse[2 + i * 3] + " (Last Login: "******")");
                ranks.Add(rank);
                lbiName.ForeColor = color;
                lbxMembers.Items.Add(lbiName);
            }
            Refresh();
        }
示例#41
0
        public void LoadMission(string[] parse)
        {
            this.Size = pnlMissionEditor.Size;
            pnlMissionList.Visible   = false;
            pnlMissionEditor.Visible = true;



            btnGeneral_Click(null, null);
            lbxMissionRewards.Items.Clear();
            lbxMissionEnemies.Items.Clear();
            lbxMissionClients.Items.Clear();
            //this.Size = new System.Drawing.Size(pnlDungeonGeneral.Width, pnlDungeonGeneral.Height);


            missionPool = new Logic.Editors.Missions.EditableMissionPool();


            int clientCount = parse[2].ToInt();
            int n           = 3;

            for (int i = 0; i < clientCount; i++)
            {
                Logic.Editors.Missions.EditableMissionClient missionClient = new Logic.Editors.Missions.EditableMissionClient();
                missionClient.DexNum  = parse[n].ToInt();
                missionClient.FormNum = parse[n + 1].ToInt();
                missionPool.Clients.Add(missionClient);

                n += 2;

                ListBoxTextItem lbiClient = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": #" + missionClient.DexNum + " " + Pokedex.PokemonHelper.Pokemon[missionClient.DexNum - 1].Name + " (Form: " + missionClient.FormNum + ")");
                lbxMissionClients.Items.Add(lbiClient);
            }

            int enemyCount = parse[n].ToInt();

            n++;

            for (int i = 0; i < enemyCount; i++)
            {
                missionPool.Enemies.Add(parse[n].ToInt());

                ListBoxTextItem lbiEnemy = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": NPC #" + missionPool.Enemies[i] + ", " + Npc.NpcHelper.Npcs[missionPool.Enemies[i]].Name);
                lbxMissionEnemies.Items.Add(lbiEnemy);

                n++;
            }

            int rewardCount = parse[n].ToInt();

            n++;

            for (int i = 0; i < rewardCount; i++)
            {
                Logic.Editors.Missions.EditableMissionReward missionReward = new Logic.Editors.Missions.EditableMissionReward();
                missionReward.ItemNum    = parse[n].ToInt();
                missionReward.ItemAmount = parse[n + 1].ToInt();
                missionReward.ItemTag    = parse[n + 2];
                missionPool.Rewards.Add(missionReward);

                n += 3;

                ListBoxTextItem lbiReward = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Items.ItemHelper.Items[missionReward.ItemNum].Name + " x" + missionReward.ItemAmount + " (Tag: " + missionReward.ItemTag + ")");
                lbxMissionRewards.Items.Add(lbiReward);
            }

            btnEdit.Text = "Edit";
        }
示例#42
0
        public void UpdateMember(int index, Enums.GuildRank rank)
        {
            Color color;
            switch (rank) {
                case Enums.GuildRank.Member:
                    color = Color.LightSkyBlue;
                    break;
                case Enums.GuildRank.Admin:
                    color = Color.Yellow;
                    break;
                case Enums.GuildRank.Founder:
                    color = Color.LawnGreen;
                    break;
                default:
                    color = Color.Red;
                    break;
            }
            string name = ((ListBoxTextItem)lbxMembers.Items[index]).Text.Split(']')[1];
            ListBoxTextItem lbiName = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "[" + rank + "] " + name);
            ranks[index] = rank;
            ((ListBoxTextItem)lbxMembers.Items[index]).ForeColor = color;
            ((ListBoxTextItem)lbxMembers.Items[index]).Text = "[" + rank + "] " + name;

            Refresh();
        }
示例#43
0
        void btnAddRMap_Click(object sender, MouseButtonEventArgs e)
        {
            for (int i = nudRDungeonFloor.Value; i <= nudRDungeonFloorEnd.Value; i++)
            {
                int index = DungeonFloorIndex(nudRDungeonIndex.Value - 1, i - 1);
                if (index > -1)
                {
                    dungeon.RandomMaps.RemoveAt(index);
                }
            }

            lbxDungeonRMaps.Items.Clear();
            for (int maps = 0; maps < dungeon.RandomMaps.Count; maps++)
            {
                string mapText;
                if (dungeon.RandomMaps[maps].IsBadGoalMap)
                {
                    mapText = (maps + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(dungeon.RandomMaps[maps].Difficulty) + "] Dun #" + (dungeon.RandomMaps[maps].RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[dungeon.RandomMaps[maps].RDungeonIndex].Name + ") " + (dungeon.RandomMaps[maps].RDungeonFloor + 1) + "F";
                }
                else
                {
                    mapText = (maps + 1) + ": [" + Missions.MissionManager.DifficultyToString(dungeon.RandomMaps[maps].Difficulty) + "] Dun #" + (dungeon.RandomMaps[maps].RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[dungeon.RandomMaps[maps].RDungeonIndex].Name + ") " + (dungeon.RandomMaps[maps].RDungeonFloor + 1) + "F";
                }
                ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
                lbxDungeonRMaps.Items.Add(lbiMap);
            }

            for (int i = nudRDungeonFloor.Value; i <= nudRDungeonFloorEnd.Value; i++)
            {

                Logic.Editors.Dungeons.EditableRandomDungeonMap map = new Logic.Editors.Dungeons.EditableRandomDungeonMap();
                map.RDungeonIndex = nudRDungeonIndex.Value - 1;
                map.RDungeonFloor = i - 1;
                map.Difficulty = (Enums.JobDifficulty)nudRMapDifficulty.Value;
                map.IsBadGoalMap = chkRMapBad.Checked;

                dungeon.RandomMaps.Add(map);

                string mapText;
                if (map.IsBadGoalMap)
                {
                    mapText = (lbxDungeonRMaps.Items.Count + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Dun #" + (map.RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[map.RDungeonIndex].Name + ") " + (map.RDungeonFloor + 1) + "F";
                }
                else
                {
                    mapText = (lbxDungeonRMaps.Items.Count + 1) + ": [" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Dun #" + (map.RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[map.RDungeonIndex].Name + ") " + (map.RDungeonFloor + 1) + "F";
                }
                ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
                lbxDungeonRMaps.Items.Add(lbiMap);
            }
        }
示例#44
0
        public winShopPanel()
            : base("winShopPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Shop Panel";

            pnlShopList = new Panel("pnlShopList");
            pnlShopList.Size = new System.Drawing.Size(200, 230);
            pnlShopList.Location = new Point(0, 0);
            pnlShopList.BackColor = Color.White;
            pnlShopList.Visible = true;

            pnlShopEditor = new Panel("pnlShopEditor");
            pnlShopEditor.Size = new System.Drawing.Size(440, 380);
            pnlShopEditor.Location = new Point(0, 0);
            pnlShopEditor.BackColor = Color.White;
            pnlShopEditor.Visible = false;

            lbxShopList = new ListBox("lbxShopList");
            lbxShopList.Location = new Point(10, 10);
            lbxShopList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Shops.ShopHelper.Shops[(i + 1) + 10 * currentTen].Name);
                lbxShopList.Items.Add(lbiItem);
            }
            lbxShopList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(340, 334);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(250, 334);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "Shop Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(420, 16);
            txtName.Location = new Point(10, 16);
            //txtName.Text = "Loading...";

            lblJoinSay = new Label("lblJoinSay");
            lblJoinSay.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblJoinSay.Text = "Join Say:";
            lblJoinSay.AutoSize = true;
            lblJoinSay.Location = new Point(10, 36);

            txtJoinSay = new TextBox("txtJoinSay");
            txtJoinSay.Size = new Size(420, 16);
            txtJoinSay.Location = new Point(10, 48);

            lblLeaveSay = new Label("lblLeaveSay");
            lblLeaveSay.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblLeaveSay.Text = "Leave Say:";
            lblLeaveSay.AutoSize = true;
            lblLeaveSay.Location = new Point(10, 68);

            txtLeaveSay = new TextBox("txtLeaveSay");
            txtLeaveSay.Size = new Size(420, 16);
            txtLeaveSay.Location = new Point(10, 80);

            lbxShopItems = new ListBox("lbxShopItems");
            lbxShopItems.Location = new Point(10, 100);
            lbxShopItems.Size = new Size(220, 240);
            lbxShopItems.ItemSelected += new EventHandler(lbxShopItems_ItemSelected);

            for (int i = 0; i < MaxInfo.MAX_TRADES; i++) {
                lbiShopItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": ---");

                lbxShopItems.Items.Add(lbiShopItem);
            }
            //ListBoxTextItem lbiShopItem;

            lblGiveItem = new Label("lblGiveItem");
            lblGiveItem.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblGiveItem.Text = "Item Paid [---]:";
            lblGiveItem.AutoSize = true;
            lblGiveItem.Location = new Point(240, 100);

            nudGiveItem = new NumericUpDown("nudGiveItem");
            nudGiveItem.Size = new Size(100, 16);
            nudGiveItem.Location = new Point(240, 112);
            nudGiveItem.Maximum = MaxInfo.MaxItems;
            nudGiveItem.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudGiveItem_ValueChanged);

            lblGiveAmount = new Label("lblGiveAmount");
            lblGiveAmount.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblGiveAmount.Text = "Amount Paid: (integer)";
            lblGiveAmount.AutoSize = true;
            lblGiveAmount.Location = new Point(240, 132);

            nudGiveAmount = new NumericUpDown("nudGiveAmount");
            nudGiveAmount.Size = new Size(100, 16);
            nudGiveAmount.Maximum = 2147483647;
            nudGiveAmount.Location = new Point(240, 144);

            lblGetItem = new Label("lblGetItem");
            lblGetItem.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblGetItem.Text = "Item Bought [---]:";
            lblGetItem.AutoSize = true;
            lblGetItem.Location = new Point(240, 164);

            nudGetItem = new NumericUpDown("nudGetItem");
            nudGetItem.Size = new Size(100, 16);
            nudGetItem.Location = new Point(240, 176);
            nudGetItem.Maximum = MaxInfo.MaxItems;
            nudGetItem.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudGetItem_ValueChanged);

            btnShiftUp = new Button("btnShiftUp");
            btnShiftUp.Location = new Point(240, 206);
            btnShiftUp.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnShiftUp.Size = new System.Drawing.Size(64, 16);
            btnShiftUp.Visible = true;
            btnShiftUp.Text = "Shift Up";
            btnShiftUp.Click += new EventHandler<MouseButtonEventArgs>(btnShiftUp_Click);

            btnChange = new Button("btnChange");
            btnChange.Location = new Point(240, 226);
            btnChange.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnChange.Size = new System.Drawing.Size(64, 16);
            btnChange.Visible = true;
            btnChange.Text = "Change";
            btnChange.Click += new EventHandler<MouseButtonEventArgs>(btnChange_Click);

            btnShiftDown = new Button("btnShiftDown");
            btnShiftDown.Location = new Point(240, 246);
            btnShiftDown.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnShiftDown.Size = new System.Drawing.Size(64, 16);
            btnShiftDown.Visible = true;
            btnShiftDown.Text = "Shift Down";
            btnShiftDown.Click += new EventHandler<MouseButtonEventArgs>(btnShiftDown_Click);

            pnlShopList.AddWidget(lbxShopList);
            pnlShopList.AddWidget(btnBack);
            pnlShopList.AddWidget(btnForward);
            pnlShopList.AddWidget(btnEdit);
            pnlShopList.AddWidget(btnCancel);

            pnlShopEditor.AddWidget(lblName);
            pnlShopEditor.AddWidget(txtName);
            pnlShopEditor.AddWidget(lblJoinSay);
            pnlShopEditor.AddWidget(txtJoinSay);
            pnlShopEditor.AddWidget(lblLeaveSay);
            pnlShopEditor.AddWidget(txtLeaveSay);
            pnlShopEditor.AddWidget(lbxShopItems);
            //pnlShopEditor.AddWidget(lbiShopItem);
            pnlShopEditor.AddWidget(lblGiveItem);
            pnlShopEditor.AddWidget(nudGiveItem);
            pnlShopEditor.AddWidget(lblGiveAmount);
            pnlShopEditor.AddWidget(nudGiveAmount);
            pnlShopEditor.AddWidget(lblGetItem);
            pnlShopEditor.AddWidget(nudGetItem);
            pnlShopEditor.AddWidget(btnChange);
            pnlShopEditor.AddWidget(btnShiftUp);
            pnlShopEditor.AddWidget(btnShiftDown);

            pnlShopEditor.AddWidget(btnEditorCancel);
            pnlShopEditor.AddWidget(btnEditorOK);

            this.AddWidget(pnlShopList);
            this.AddWidget(pnlShopEditor);
        }
示例#45
0
        public winDungeonPanel()
            : base("winDungeonPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Dungeon Panel";

            #region Panels
            pnlDungeonList = new Panel("pnlDungeonList");
            pnlDungeonList.Size = new System.Drawing.Size(200, 230);
            pnlDungeonList.Location = new Point(0, 0);
            pnlDungeonList.BackColor = Color.White;
            pnlDungeonList.Visible = true;

            pnlDungeonEditor = new Panel("pnlDungeonEditor");
            pnlDungeonEditor.Size = new System.Drawing.Size(320, 300);
            pnlDungeonEditor.Location = new Point(0, 0);
            pnlDungeonEditor.BackColor = Color.White;
            pnlDungeonEditor.Visible = false;

            pnlDungeonGeneral = new Panel("pnlDungeonGeneral");
            pnlDungeonGeneral.Size = new System.Drawing.Size(320, 270);
            pnlDungeonGeneral.Location = new Point(0, 30);
            pnlDungeonGeneral.BackColor = Color.White;
            pnlDungeonGeneral.Visible = true;

            pnlDungeonScripts = new Panel("pnlDungeonScripts");
            pnlDungeonScripts.Size = new System.Drawing.Size(320, 270);
            pnlDungeonScripts.Location = new Point(0, 30);
            pnlDungeonScripts.BackColor = Color.White;
            pnlDungeonScripts.Visible = false;

            pnlDungeonStandardMaps = new Panel("pnlDungeonStandardMaps");
            pnlDungeonStandardMaps.Size = new System.Drawing.Size(320, 270);
            pnlDungeonStandardMaps.Location = new Point(0, 30);
            pnlDungeonStandardMaps.BackColor = Color.White;
            pnlDungeonStandardMaps.Visible = false;

            pnlDungeonRandomMaps = new Panel("pnlDungeonRandomMaps");
            pnlDungeonRandomMaps.Size = new System.Drawing.Size(320, 270);
            pnlDungeonRandomMaps.Location = new Point(0, 30);
            pnlDungeonRandomMaps.BackColor = Color.White;
            pnlDungeonRandomMaps.Visible = false;
            #endregion

            #region Dungeon List
            lbxDungeonList = new ListBox("lbxDungeonList");
            lbxDungeonList.Location = new Point(10, 10);
            lbxDungeonList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                ListBoxTextItem lbiDungeon = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), i + ": ");
                lbxDungeonList.Items.Add(lbiDungeon);
            }

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            btnAddNew = new Button("btnAddNew");
            btnAddNew.Location = new Point(76, 190);
            btnAddNew.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddNew.Size = new System.Drawing.Size(48, 16);
            btnAddNew.Visible = true;
            btnAddNew.Text = "New";
            btnAddNew.Click += new EventHandler<MouseButtonEventArgs>(btnAddNew_Click);
            #endregion

            #region Dungeon Editor Panel

            btnGeneral = new Button("btnGeneral");
            btnGeneral.Location = new Point(5, 5);
            btnGeneral.Size = new Size(70, 20);
            btnGeneral.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnGeneral.Text = "General";
            btnGeneral.Click += new EventHandler<MouseButtonEventArgs>(btnGeneral_Click);

            btnStandardMaps = new Button("btnStandardMaps");
            btnStandardMaps.Location = new Point(80, 5);
            btnStandardMaps.Size = new Size(70, 20);
            btnStandardMaps.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnStandardMaps.Text = "Standard Maps";
            btnStandardMaps.Click += new EventHandler<MouseButtonEventArgs>(btnStandardMaps_Click);

            btnRandomMaps = new Button("btnRandomMaps");
            btnRandomMaps.Location = new Point(155, 5);
            btnRandomMaps.Size = new Size(70, 20);
            btnRandomMaps.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRandomMaps.Text = "Random Maps";
            btnRandomMaps.Click += new EventHandler<MouseButtonEventArgs>(btnRandomMaps_Click);

            btnScripts = new Button("btnScripts");
            btnScripts.Location = new Point(230, 5);
            btnScripts.Size = new Size(70, 20);
            btnScripts.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnScripts.Text = "Scripts";
            btnScripts.Click += new EventHandler<MouseButtonEventArgs>(btnScripts_Click);

            #endregion

            #region General

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblName.Text = "Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 16);
            txtName.Location = new Point(10, 24);
            txtName.Font = Graphics.FontManager.LoadFont("tahoma", 12);

            chkRescue = new CheckBox("chkRescue");
            chkRescue.Font = Graphics.FontManager.LoadFont("tahoma", 12);
            chkRescue.Size = new Size(140, 14);
            chkRescue.Location = new Point(10, 48);
            chkRescue.Text = "Allow Rescue";

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(120, 75);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(20, 75);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            #endregion

            #region Scripts

            lblScriptNum = new Label("lblScriptNum");
            lblScriptNum.AutoSize = true;
            lblScriptNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblScriptNum.Location = new Point(10, 0);
            lblScriptNum.Text = "Num:";

            nudScriptNum = new NumericUpDown("nudScriptNum");
            nudScriptNum.Size = new Size(70, 20);
            nudScriptNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudScriptNum.Maximum = Int32.MaxValue;
            nudScriptNum.Minimum = Int32.MinValue;
            nudScriptNum.Location = new Point(10, 14);

            lblScriptParam = new Label("lblScriptParam");
            lblScriptParam.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblScriptParam.Text = "Parameter String:";
            lblScriptParam.AutoSize = true;
            lblScriptParam.Location = new Point(10, 34);

            txtScriptParam = new TextBox("txtScriptParam");
            txtScriptParam.Size = new Size(200, 16);
            txtScriptParam.Location = new Point(10, 46);
            txtScriptParam.Font = Graphics.FontManager.LoadFont("tahoma", 12);

            btnAddScript = new Button("btnAddScript");
            btnAddScript.Size = new Size(70, 16);
            btnAddScript.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddScript.Location = new Point(5, 72);
            btnAddScript.Text = "Add";
            btnAddScript.Click += new EventHandler<MouseButtonEventArgs>(btnAddScript_Click);

            btnRemoveScript = new Button("btnRemoveScript");
            btnRemoveScript.Size = new Size(70, 16);
            btnRemoveScript.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveScript.Location = new Point(80, 72);
            btnRemoveScript.Text = "Remove";
            btnRemoveScript.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveScript_Click);

            btnLoadScript = new Button("btnLoadScript");
            btnLoadScript.Size = new Size(70, 16);
            btnLoadScript.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadScript.Location = new Point(155, 72);
            btnLoadScript.Text = "Load";
            btnLoadScript.Click += new EventHandler<MouseButtonEventArgs>(btnLoadScript_Click);

            lbxDungeonScripts = new ListBox("lbxDungeonScripts");
            lbxDungeonScripts.Location = new Point(10, 90);
            lbxDungeonScripts.Size = new Size(pnlDungeonStandardMaps.Size.Width - 20, pnlDungeonStandardMaps.Size.Height - 120);
            lbxDungeonScripts.MultiSelect = false;

            #endregion

            #region Standard Maps

            lblMapNum = new Label("lblMapNum");
            lblMapNum.AutoSize = true;
            lblMapNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblMapNum.Location = new Point(10, 0);
            lblMapNum.Text = "Num:";

            nudMapNum = new NumericUpDown("nudMapNum");
            nudMapNum.Size = new Size(70, 20);
            nudMapNum.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudMapNum.Maximum = 2000;
            nudMapNum.Minimum = 1;
            nudMapNum.Location = new Point(10, 14);

            lblSMapDifficulty = new Label("lblSMapDifficulty");
            lblSMapDifficulty.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblSMapDifficulty.Text = "Difficulty:";
            lblSMapDifficulty.AutoSize = true;
            lblSMapDifficulty.Location = new Point(10, 34);

            nudSMapDifficulty = new NumericUpDown("nudSMapDifficulty");
            nudSMapDifficulty.Size = new Size(50, 20);
            nudSMapDifficulty.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudSMapDifficulty.Location = new Point(10, 48);
            nudSMapDifficulty.Minimum = 1;
            nudSMapDifficulty.Maximum = 16;

            chkSMapBad = new CheckBox("chkSMap");
            chkSMapBad.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkSMapBad.Size = new Size(120, 14);
            chkSMapBad.Location = new Point(100, 40);
            chkSMapBad.Text = "Boss Goal Map";

            btnAddSMap = new Button("btnAddSMap");
            btnAddSMap.Size = new Size(70, 16);
            btnAddSMap.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddSMap.Location = new Point(5, 72);
            btnAddSMap.Text = "Add";
            btnAddSMap.Click += new EventHandler<MouseButtonEventArgs>(btnAddSMap_Click);

            btnRemoveSMap = new Button("btnRemoveSMap");
            btnRemoveSMap.Size = new Size(70, 16);
            btnRemoveSMap.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveSMap.Location = new Point(80, 72);
            btnRemoveSMap.Text = "Remove";
            btnRemoveSMap.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveSMap_Click);

            btnLoadSMap = new Button("btnLoadSMap");
            btnLoadSMap.Size = new Size(70, 16);
            btnLoadSMap.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadSMap.Location = new Point(155, 72);
            btnLoadSMap.Text = "Load";
            btnLoadSMap.Click += new EventHandler<MouseButtonEventArgs>(btnLoadSMap_Click);

            lbxDungeonSMaps = new ListBox("lbxDungeonSMaps");
            lbxDungeonSMaps.Location = new Point(10, 90);
            lbxDungeonSMaps.Size = new Size(pnlDungeonStandardMaps.Size.Width - 20, pnlDungeonStandardMaps.Size.Height - 120);
            lbxDungeonSMaps.MultiSelect = false;

            #endregion

            #region Random Maps

            lblRDungeonIndex = new Label("lblRDungeonIndex");
            lblRDungeonIndex.AutoSize = true;
            lblRDungeonIndex.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblRDungeonIndex.Location = new Point(2, 0);
            lblRDungeonIndex.Text = "Dungeon #:";

            nudRDungeonIndex = new NumericUpDown("nudRDungeonIndex");
            nudRDungeonIndex.Size = new Size(70, 20);
            nudRDungeonIndex.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudRDungeonIndex.Maximum = MaxInfo.MaxRDungeons;
            nudRDungeonIndex.Minimum = 1;
            nudRDungeonIndex.Location = new Point(10, 14);
            nudRDungeonIndex.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudRDungeonIndex_ValueChanged);

            lblRDungeonFloor = new Label("lblRDungeonFloor");
            lblRDungeonFloor.AutoSize = true;
            lblRDungeonFloor.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblRDungeonFloor.Location = new Point(240, 0);
            lblRDungeonFloor.Text = "From Floor:";

            nudRDungeonFloor = new NumericUpDown("nudRDungeonFloor");
            nudRDungeonFloor.Size = new Size(70, 20);
            nudRDungeonFloor.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudRDungeonFloor.Maximum = Int32.MaxValue;
            nudRDungeonFloor.Minimum = 1;
            nudRDungeonFloor.Location = new Point(240, 14);
            nudRDungeonFloor.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudRDungeonFloor_ValueChanged);

            lblRDungeonFloorEnd = new Label("lblRDungeonFloorEnd");
            lblRDungeonFloorEnd.AutoSize = true;
            lblRDungeonFloorEnd.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblRDungeonFloorEnd.Location = new Point(240, 34);
            lblRDungeonFloorEnd.Text = "To Floor:";

            nudRDungeonFloorEnd = new NumericUpDown("nudRDungeonFloorEnd");
            nudRDungeonFloorEnd.Size = new Size(70, 20);
            nudRDungeonFloorEnd.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudRDungeonFloorEnd.Maximum = Int32.MaxValue;
            nudRDungeonFloorEnd.Minimum = 1;
            nudRDungeonFloorEnd.Location = new Point(240, 48);
            nudRDungeonFloorEnd.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudRDungeonFloorEnd_ValueChanged);

            lblRMapDifficulty = new Label("lblRMapDifficulty");
            lblRMapDifficulty.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblRMapDifficulty.Text = "Difficulty:";
            lblRMapDifficulty.AutoSize = true;
            lblRMapDifficulty.Location = new Point(10, 34);

            nudRMapDifficulty = new NumericUpDown("nudRMapDifficulty");
            nudRMapDifficulty.Size = new Size(50, 20);
            nudRMapDifficulty.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            nudRMapDifficulty.Location = new Point(10, 48);
            nudRMapDifficulty.Minimum = 1;
            nudRMapDifficulty.Maximum = 16;

            chkRMapBad = new CheckBox("chkRMap");
            chkRMapBad.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkRMapBad.Size = new Size(120, 14);
            chkRMapBad.Location = new Point(100, 50);
            chkRMapBad.Text = "Boss Goal Map";

            btnAddRMap = new Button("btnAddRMap");
            btnAddRMap.Size = new Size(70, 16);
            btnAddRMap.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddRMap.Location = new Point(5, 72);
            btnAddRMap.Text = "Add";
            btnAddRMap.Click += new EventHandler<MouseButtonEventArgs>(btnAddRMap_Click);

            btnRemoveRMap = new Button("btnRemoveRMap");
            btnRemoveRMap.Size = new Size(70, 16);
            btnRemoveRMap.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveRMap.Location = new Point(80, 72);
            btnRemoveRMap.Text = "Remove";
            btnRemoveRMap.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveRMap_Click);

            btnLoadRMap = new Button("btnLoadRMap");
            btnLoadRMap.Size = new Size(70, 16);
            btnLoadRMap.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadRMap.Location = new Point(155, 72);
            btnLoadRMap.Text = "Load";
            btnLoadRMap.Click += new EventHandler<MouseButtonEventArgs>(btnLoadRMap_Click);

            lbxDungeonRMaps = new ListBox("lbxDungeonRMaps");
            lbxDungeonRMaps.Location = new Point(10, 90);
            lbxDungeonRMaps.Size = new Size(pnlDungeonRandomMaps.Size.Width - 20, pnlDungeonRandomMaps.Size.Height - 120);
            lbxDungeonRMaps.MultiSelect = false;

            #endregion

            #region Addwidget
            //Dungeon List
            pnlDungeonList.AddWidget(lbxDungeonList);
            pnlDungeonList.AddWidget(btnBack);
            pnlDungeonList.AddWidget(btnForward);
            pnlDungeonList.AddWidget(btnAddNew);
            pnlDungeonList.AddWidget(btnEdit);
            pnlDungeonList.AddWidget(btnCancel);
            //General
            pnlDungeonGeneral.AddWidget(lblName);
            pnlDungeonGeneral.AddWidget(txtName);
            pnlDungeonGeneral.AddWidget(chkRescue);
            pnlDungeonGeneral.AddWidget(btnEditorCancel);
            pnlDungeonGeneral.AddWidget(btnEditorOK);
            //Scripts
            pnlDungeonScripts.AddWidget(lblScriptNum);
            pnlDungeonScripts.AddWidget(nudScriptNum);
            pnlDungeonScripts.AddWidget(lblScriptParam);
            pnlDungeonScripts.AddWidget(txtScriptParam);
            pnlDungeonScripts.AddWidget(btnAddScript);
            pnlDungeonScripts.AddWidget(btnRemoveScript);
            pnlDungeonScripts.AddWidget(btnLoadScript);
            pnlDungeonScripts.AddWidget(lbxDungeonScripts);
            //Standard Maps
            pnlDungeonStandardMaps.AddWidget(lblMapNum);
            pnlDungeonStandardMaps.AddWidget(nudMapNum);
            pnlDungeonStandardMaps.AddWidget(lblSMapDifficulty);
            pnlDungeonStandardMaps.AddWidget(nudSMapDifficulty);
            pnlDungeonStandardMaps.AddWidget(chkSMapBad);
            pnlDungeonStandardMaps.AddWidget(btnAddSMap);
            pnlDungeonStandardMaps.AddWidget(btnRemoveSMap);
            pnlDungeonStandardMaps.AddWidget(btnLoadSMap);
            pnlDungeonStandardMaps.AddWidget(lbxDungeonSMaps);
            //RDungeon Maps
            pnlDungeonRandomMaps.AddWidget(lblRDungeonIndex);
            pnlDungeonRandomMaps.AddWidget(nudRDungeonIndex);
            pnlDungeonRandomMaps.AddWidget(lblRDungeonFloor);
            pnlDungeonRandomMaps.AddWidget(nudRDungeonFloor);
            pnlDungeonRandomMaps.AddWidget(lblRDungeonFloorEnd);
            pnlDungeonRandomMaps.AddWidget(nudRDungeonFloorEnd);
            pnlDungeonRandomMaps.AddWidget(lblRMapDifficulty);
            pnlDungeonRandomMaps.AddWidget(nudRMapDifficulty);
            pnlDungeonRandomMaps.AddWidget(chkRMapBad);
            pnlDungeonRandomMaps.AddWidget(btnAddRMap);
            pnlDungeonRandomMaps.AddWidget(btnRemoveRMap);
            pnlDungeonRandomMaps.AddWidget(btnLoadRMap);
            pnlDungeonRandomMaps.AddWidget(lbxDungeonRMaps);
            //Editor panel
            pnlDungeonEditor.AddWidget(btnGeneral);
            pnlDungeonEditor.AddWidget(btnStandardMaps);
            pnlDungeonEditor.AddWidget(btnRandomMaps);
            pnlDungeonEditor.AddWidget(btnScripts);
            pnlDungeonEditor.AddWidget(pnlDungeonGeneral);
            pnlDungeonEditor.AddWidget(pnlDungeonStandardMaps);
            pnlDungeonEditor.AddWidget(pnlDungeonRandomMaps);
            pnlDungeonEditor.AddWidget(pnlDungeonScripts);
            //This
            this.AddWidget(pnlDungeonList);
            this.AddWidget(pnlDungeonEditor);
            #endregion

            RefreshDungeonList();
        }
示例#46
0
        public void LoadAdventureLogFromPacket(string[] parse)
        {
            int n;

            //General
            lblPlayerName.Text        = "Name: " + Players.PlayerManager.MyPlayer.Name;
            lblRank.Text              = "Rank: " + Missions.MissionManager.RankToString(Players.PlayerManager.MyPlayer.ExplorerRank) + " Rank (" + Players.PlayerManager.MyPlayer.MissionExp + " Pts.)";
            lblPlayTime.Text          = "Play Time: " + (parse[1].ToInt() / 60).ToString().PadLeft(2, '0') + " : " + (parse[1].ToInt() % 60).ToString().PadLeft(2, '0');
            lblDungeonsCompleted.Text = "Dungeon Victories: " + parse[2];
            lblMissionsCompleted.Text = "Missions Completed: " + parse[3];
            //lblRescuesCompleted.Text = "Successful Rescues: " + parse[4];

            n = 5;
            //Dungeons
            for (int i = 0; i < parse[n].ToInt(); i++)
            {
                ListBoxTextItem item = new ListBoxTextItem(FontManager.LoadFont("PMDCP", 16), parse[n + i * 2 + 1]);
                if (parse[n + i * 2 + 2].ToInt() > 0)
                {
                    item.ForeColor = Color.Cyan;
                }
                else
                {
                    item.ForeColor = Color.Red;
                }
                lbxDungeonList.Items.Add(item);
            }

            n += lbxDungeonList.Items.Count * 2;

            for (int i = 1; i <= MaxInfo.TotalPokemon; i++)
            {
                ListBoxTextItem item;

                if (parse[n + 1].ToInt() <= 0)
                {
                    item           = new ListBoxTextItem(FontManager.LoadFont("PMDCP", 16), "#" + i + ": -----");
                    item.ForeColor = Color.Gray;
                }
                else
                {
                    item = new ListBoxTextItem(FontManager.LoadFont("PMDCP", 16), "#" + i + ": " + Pokedex.PokemonHelper.Pokemon[i - 1].Name);
                    if (parse[n + 1].ToInt() == 1)
                    {
                        item.ForeColor = Color.Red;
                    }
                    else if (parse[n + 1].ToInt() == 2)
                    {
                        item.ForeColor = Color.Cyan;
                    }
                    else
                    {
                        item.ForeColor = Color.Black;
                    }
                }

                lbxPokedex.Items.Add(item);
                n++;
            }

            SwitchToPage(0);
            loaded = true;
        }
示例#47
0
        public winArrowPanel()
            : base("winArrowPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Arrow Panel";

            pnlArrowList = new Panel("pnlArrowList");
            pnlArrowList.Size = new System.Drawing.Size(200, 230);
            pnlArrowList.Location = new Point(0, 0);
            pnlArrowList.BackColor = Color.White;
            pnlArrowList.Visible = true;

            pnlArrowEditor = new Panel("pnlArrowEditor");
            pnlArrowEditor.Size = new System.Drawing.Size(230, 261);
            pnlArrowEditor.Location = new Point(0, 0);
            pnlArrowEditor.BackColor = Color.White;
            pnlArrowEditor.Visible = false;

            lbxArrowList = new ListBox("lbxArrowList");
            lbxArrowList.Location = new Point(10, 10);
            lbxArrowList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                lbiArrow = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Arrows.ArrowHelper.Arrows[(i + 1) + 10 * currentTen].Name);
                lbxArrowList.Items.Add(lbiArrow);
            }

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            //btnAddNew = new Button("btnAddNew");
            //btnAddNew.Location = new Point();
            //btnAddNew.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            //btnAddNew.Size = new System.Drawing.Size(64, 16);
            //btnAddNew.Visible = true;
            //btnAddNew.Text = "Add New";
            //btnAddNew.Click += new EventHandler<MouseButtonEventArgs>(btnAddNew_Click);

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(120, 215);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(20, 215);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "Arrow Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 16);
            txtName.Location = new Point(10, 16);
            txtName.Font = Graphics.FontManager.LoadFont("Tahoma", 12);

            lblSprite = new Label("lblSprite");
            lblSprite.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSprite.Text = "Arrow Sprite:";
            lblSprite.AutoSize = true;
            lblSprite.Location = new Point(10, 36);

            pic = new PictureBox("pic");
            pic.Location = new Point(10, 48);
            pic.Size = new Size(32, 32);

            hsbPic = new HScrollBar("hsbPic");
            hsbPic.Maximum = MaxInfo.MAX_ARROWS;
            hsbPic.Location = new Point(10, 90);
            hsbPic.Size = new Size(200, 12);
            hsbPic.ValueChanged +=new EventHandler<ValueChangedEventArgs>(hsbPic_ValueChanged);

            lblRange = new Label("lblRange");
            lblRange.AutoSize = true;
            lblRange.Font = Graphics.FontManager.LoadFont("PMDCP", 18);
            lblRange.Location = new Point(10, 115);
            lblRange.Text = "Range: -1";

            hsbRange = new HScrollBar("hsbRange");
            hsbRange.Maximum = 50;
            hsbRange.Location = new Point(10, 140);
            hsbRange.Size = new Size(200, 12);
            hsbRange.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsbRange_ValueChanged);

            lblAmount = new Label("lblAmount");
            lblAmount.AutoSize = true;
            lblAmount.Font = Graphics.FontManager.LoadFont("PMDCP", 18);
            lblAmount.Location = new Point(10, 165);
            lblAmount.Text = "Amount: -1";

            hsbAmount = new HScrollBar("hsbAmount");
            hsbAmount.Maximum = 15;
            hsbAmount.Location = new Point(10, 190);
            hsbAmount.Size = new Size(200, 12);
            hsbAmount.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsbAmount_ValueChanged);

            pnlArrowList.AddWidget(lbxArrowList);
            pnlArrowList.AddWidget(btnBack);
            pnlArrowList.AddWidget(btnForward);
            //pnlArrowList.AddWidget(btnAddNew);
            pnlArrowList.AddWidget(btnEdit);
            pnlArrowList.AddWidget(btnCancel);

            pnlArrowEditor.AddWidget(lblName);
            pnlArrowEditor.AddWidget(txtName);
            pnlArrowEditor.AddWidget(lblSprite);
            pnlArrowEditor.AddWidget(pic);
            pnlArrowEditor.AddWidget(hsbPic);
            pnlArrowEditor.AddWidget(lblRange);
            pnlArrowEditor.AddWidget(hsbRange);
            pnlArrowEditor.AddWidget(lblAmount);
            pnlArrowEditor.AddWidget(hsbAmount);
            pnlArrowEditor.AddWidget(btnEditorCancel);
            pnlArrowEditor.AddWidget(btnEditorOK);

            this.AddWidget(pnlArrowList);
            this.AddWidget(pnlArrowEditor);

            RefreshArrowList();
            this.LoadComplete();
        }
示例#48
0
 void btnRemoveScript_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxDungeonScripts.SelectedIndex > -1) {
         dungeon.ScriptList.RemoveAt(lbxDungeonScripts.SelectedIndex);
         lbxDungeonScripts.Items.Clear();
         for (int scripts = 0; scripts < dungeon.ScriptList.Count; scripts++) {
             ListBoxTextItem lbiScript = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), dungeon.ScriptList.KeyByIndex(scripts) + ": " + dungeon.ScriptList.ValueByIndex(scripts));
             lbxDungeonScripts.Items.Add(lbiScript);
         }
     }
 }
示例#49
0
        public winStoryPanel()
            : base("winStoryPanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Story Editor";

            #region List
            pnlStoryList = new Panel("pnlStoryList");
            pnlStoryList.Size = new System.Drawing.Size(200, 230);
            pnlStoryList.Location = new Point(0, 0);
            pnlStoryList.BackColor = Color.White;
            pnlStoryList.Visible = true;

            lbxStoryList = new ListBox("lbxStoryList");
            lbxStoryList.Location = new Point(10, 10);
            lbxStoryList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                ListBoxTextItem lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": ");
                lbxStoryList.Items.Add(lbiItem);
            }
            lbxStoryList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);
            #endregion

            #region General
            pnlEditorGeneral = new Panel("pnlEditorGeneral");
            pnlEditorGeneral.Size = new System.Drawing.Size(300, 400);
            pnlEditorGeneral.Location = new Point(0, 0);
            pnlEditorGeneral.BackColor = Color.White;
            pnlEditorGeneral.Visible = false;

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(10, 334);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(100, 334);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            btnSegments = new Button("btnSegments");
            btnSegments.Location = new Point(215, 4);
            btnSegments.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSegments.Size = new System.Drawing.Size(64, 16);
            btnSegments.Text = "Segments";
            btnSegments.Click += new EventHandler<MouseButtonEventArgs>(btnSegments_Click);

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "Story Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 16);
            txtName.Location = new Point(10, 16);

            lblStoryStart = new Label("lblStoryStart");
            lblStoryStart.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblStoryStart.Text = "Only start if chapter is locked (0=disabled)";
            lblStoryStart.AutoSize = true;
            lblStoryStart.Location = new Point(10, 35);

            nudStoryStart = new NumericUpDown("nudStoryStart");
            nudStoryStart.Size = new System.Drawing.Size(100, 16);
            nudStoryStart.Location = new Point(10, 47);
            nudStoryStart.Maximum = MaxInfo.MaxStories;

            lblExitAndContinue = new Label("lblExitAndContinue");
            lblExitAndContinue.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            lblExitAndContinue.Text = "Checkpoint Segments";
            lblExitAndContinue.AutoSize = true;
            lblExitAndContinue.Location = new Point(10, 65);

            lbxExitAndContinue = new ListBox("lbxExitAndContinue");
            lbxExitAndContinue.Location = new Point(10, 77);
            lbxExitAndContinue.Size = new System.Drawing.Size(100, 100);
            lbxExitAndContinue.MultiSelect = false;

            btnAddExitAndContinue = new Button("btnAddExitAndContinue");
            btnAddExitAndContinue.Size = new System.Drawing.Size(64, 16);
            btnAddExitAndContinue.Location = new Point(110, 77);
            btnAddExitAndContinue.Text = "Add";
            btnAddExitAndContinue.Click += new EventHandler<MouseButtonEventArgs>(btnAddExitAndContinue_Click);

            nudExitAndContinueCheckpoint = new NumericUpDown("nudExitAndContinueCheckpoint");
            nudExitAndContinueCheckpoint.Location = new Point(110, 95);
            nudExitAndContinueCheckpoint.Maximum = 0;
            nudExitAndContinueCheckpoint.Size = new System.Drawing.Size(64, 14);

            btnRemoveExitAndContinue = new Button("btnRemoveExitAndContinue");
            btnRemoveExitAndContinue.Location = new Point(110, 110);
            btnRemoveExitAndContinue.Size = new System.Drawing.Size(64, 16);
            btnRemoveExitAndContinue.Text = "Remove";
            btnRemoveExitAndContinue.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveExitAndContinue_Click);

            #endregion

            #region Segments

            pnlEditorSegments = new Panel("pnlEditorSegments");
            pnlEditorSegments.Size = new System.Drawing.Size(300, 400);
            pnlEditorSegments.Location = new Point(0, 0);
            pnlEditorSegments.BackColor = Color.White;
            pnlEditorSegments.Visible = false;

            btnGeneral = new Button("btnGeneral");
            btnGeneral.Location = new Point(5, 5);
            btnGeneral.Size = new System.Drawing.Size(65, 15);
            btnGeneral.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnGeneral.Text = "General";
            btnGeneral.Click += new EventHandler<MouseButtonEventArgs>(btnGeneral_Click);

            //lblMaxSegments = new Label("lblMaxSegments");
            //lblMaxSegments.Location = new Point(75, 5);
            //lblMaxSegments.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            //lblMaxSegments.AutoSize = true;
            //lblMaxSegments.Text = "Max Segments:";

            //nudMaxSegments = new NumericUpDown("nudMaxSegments");
            //nudMaxSegments.Location = new Point(lblMaxSegments.X + lblMaxSegments.Width + 5, 5);
            //nudMaxSegments.Size = new System.Drawing.Size(64, 14);
            //nudMaxSegments.Minimum = 1;

            //btnSaveMaxSegments = new Button("btnSaveMaxSegments");
            //btnSaveMaxSegments.Location = new Point(nudMaxSegments.X + nudMaxSegments.Width + 5, 25);
            //btnSaveMaxSegments.Size = new System.Drawing.Size(64, 16);
            //btnSaveMaxSegments.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            //btnSaveMaxSegments.Text = "Save";
            //btnSaveMaxSegments.Click += new EventHandler<MouseButtonEventArgs>(btnSaveMaxSegments_Click);

            //lblActiveSegment = new Label("lblActiveSegment");
            //lblActiveSegment.Location = new Point(75, 5);
            //lblActiveSegment.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            //lblActiveSegment.AutoSize = true;
            //lblActiveSegment.Text = "Segment:";

            //nudActiveSegment = new NumericUpDown("nudActiveSegment");
            //nudActiveSegment.Location = new Point(lblActiveSegment.X + lblActiveSegment.Width + 5, 25);
            //nudActiveSegment.Size = new System.Drawing.Size(64, 14);
            //nudActiveSegment.Minimum = 1;
            //nudActiveSegment.Maximum = 1;

            btnAddSegment = new Button("btnAddSegment");
            btnAddSegment.Size = new System.Drawing.Size(64, 16);
            btnAddSegment.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddSegment.Location = new Point(5, 210);
            btnAddSegment.Text = "Add";
            btnAddSegment.Click += new EventHandler<MouseButtonEventArgs>(btnAddSegment_Click);

            btnRemoveSegment = new Button("btnRemoveSegment");
            btnRemoveSegment.Size = new System.Drawing.Size(64, 16);
            btnRemoveSegment.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveSegment.Location = new Point(btnAddSegment.X + btnAddSegment.Width + 5, 210);
            btnRemoveSegment.Text = "Remove";
            btnRemoveSegment.Click += new EventHandler<MouseButtonEventArgs>(btnRemoveSegment_Click);

            btnLoadSegment = new Button("btnLoadSegment");
            btnLoadSegment.Size = new System.Drawing.Size(64, 16);
            btnLoadSegment.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadSegment.Location = new Point(btnRemoveSegment.X + btnRemoveSegment.Width + 5, 210);
            btnLoadSegment.Text = "Load";
            btnLoadSegment.Click += new EventHandler<MouseButtonEventArgs>(btnLoadSegment_Click);

            btnSaveSegment = new Button("btnSaveSegment");
            btnSaveSegment.Size = new System.Drawing.Size(64, 16);
            btnSaveSegment.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            btnSaveSegment.Location = new Point(btnLoadSegment.X + btnLoadSegment.Width + 5, btnLoadSegment.Y);
            btnSaveSegment.Text = "Save";
            btnSaveSegment.Click += new EventHandler<MouseButtonEventArgs>(btnSaveSegment_Click);

            lblActions = new Label("lblActions");
            lblActions.Location = new Point(75, 5);
            lblActions.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 10);
            lblActions.AutoSize = true;
            lblActions.Text = "Action:";

            cmbSegmentTypes = new ComboBox("cmbSegmentTypes");
            cmbSegmentTypes.Location = new Point(lblActions.X + lblActions.Width + 5, 5);
            cmbSegmentTypes.Size = new System.Drawing.Size(150, 16);
            string[] storySegmentActions = Enum.GetNames(typeof(Enums.StoryAction));
            for (int i = 0; i < storySegmentActions.Length; i++) {
                cmbSegmentTypes.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), storySegmentActions[i]));
            }
            cmbSegmentTypes.ItemSelected += new EventHandler(cmbSegmentTypes_ItemSelected);
            cmbSegmentTypes.SelectItem(0);

            lbxSegments = new ListBox("lbxSegments");
            lbxSegments.Location = new Point(10, 230);
            lbxSegments.Size = new System.Drawing.Size(280, 140);
            lbxSegments.MultiSelect = false;

            #endregion

            #region List
            pnlStoryList.AddWidget(lbxStoryList);
            pnlStoryList.AddWidget(btnBack);
            pnlStoryList.AddWidget(btnForward);
            pnlStoryList.AddWidget(btnEdit);
            pnlStoryList.AddWidget(btnCancel);
            #endregion

            #region General
            pnlEditorGeneral.AddWidget(btnSegments);
            pnlEditorGeneral.AddWidget(lblName);
            pnlEditorGeneral.AddWidget(txtName);
            pnlEditorGeneral.AddWidget(lblStoryStart);
            pnlEditorGeneral.AddWidget(nudStoryStart);
            pnlEditorGeneral.AddWidget(lblExitAndContinue);
            pnlEditorGeneral.AddWidget(lbxExitAndContinue);
            pnlEditorGeneral.AddWidget(btnAddExitAndContinue);
            pnlEditorGeneral.AddWidget(nudExitAndContinueCheckpoint);
            pnlEditorGeneral.AddWidget(btnRemoveExitAndContinue);

            pnlEditorGeneral.AddWidget(btnEditorCancel);
            pnlEditorGeneral.AddWidget(btnEditorOK);
            #endregion

            #region Segments
            pnlEditorSegments.AddWidget(btnGeneral);
            //pnlEditorSegments.AddWidget(lblMaxSegments);
            //pnlEditorSegments.AddWidget(nudMaxSegments);
            //pnlEditorSegments.AddWidget(btnSaveMaxSegments);
            //pnlEditorSegments.AddWidget(lblActiveSegment);
            //pnlEditorSegments.AddWidget(nudActiveSegment);
            pnlEditorSegments.AddWidget(btnAddSegment);
            pnlEditorSegments.AddWidget(btnRemoveSegment);
            pnlEditorSegments.AddWidget(btnLoadSegment);
            pnlEditorSegments.AddWidget(btnSaveSegment);
            pnlEditorSegments.AddWidget(lblActions);
            pnlEditorSegments.AddWidget(cmbSegmentTypes);
            pnlEditorSegments.AddWidget(lbxSegments);
            #endregion

            this.AddWidget(pnlStoryList);
            this.AddWidget(pnlEditorGeneral);
            this.AddWidget(pnlEditorSegments);

            RefreshStoryList();
        }
示例#50
0
 void btnRemoveRMap_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxDungeonRMaps.SelectedIndex > -1) {
         dungeon.RandomMaps.RemoveAt(lbxDungeonRMaps.SelectedIndex);
         lbxDungeonRMaps.Items.Clear();
         for (int maps = 0; maps < dungeon.RandomMaps.Count; maps++) {
             string mapText;
             if (dungeon.RandomMaps[maps].IsBadGoalMap) {
                 mapText = (maps + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(dungeon.RandomMaps[maps].Difficulty) + "] Dun #" + (dungeon.RandomMaps[maps].RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[dungeon.RandomMaps[maps].RDungeonIndex].Name + ") " + (dungeon.RandomMaps[maps].RDungeonFloor + 1) + "F";
             }
             else {
                 mapText = (maps + 1) + ": [" + Missions.MissionManager.DifficultyToString(dungeon.RandomMaps[maps].Difficulty) + "] Dun #" + (dungeon.RandomMaps[maps].RDungeonIndex + 1) + " (" + RDungeons.RDungeonHelper.RDungeons[dungeon.RandomMaps[maps].RDungeonIndex].Name + ") " + (dungeon.RandomMaps[maps].RDungeonFloor + 1) + "F";
             }
             ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
             lbxDungeonRMaps.Items.Add(lbiMap);
         }
     }
 }
示例#51
0
        public winDungeonPanel()
            : base("winDungeonPanel")
        {
            this.Windowed             = true;
            this.ShowInWindowSwitcher = false;
            this.Size        = new System.Drawing.Size(200, 230);
            this.Location    = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Dungeon Panel";

            #region Panels
            pnlDungeonList           = new Panel("pnlDungeonList");
            pnlDungeonList.Size      = new System.Drawing.Size(200, 230);
            pnlDungeonList.Location  = new Point(0, 0);
            pnlDungeonList.BackColor = Color.White;
            pnlDungeonList.Visible   = true;

            pnlDungeonEditor           = new Panel("pnlDungeonEditor");
            pnlDungeonEditor.Size      = new System.Drawing.Size(320, 300);
            pnlDungeonEditor.Location  = new Point(0, 0);
            pnlDungeonEditor.BackColor = Color.White;
            pnlDungeonEditor.Visible   = false;

            pnlDungeonGeneral           = new Panel("pnlDungeonGeneral");
            pnlDungeonGeneral.Size      = new System.Drawing.Size(320, 270);
            pnlDungeonGeneral.Location  = new Point(0, 30);
            pnlDungeonGeneral.BackColor = Color.White;
            pnlDungeonGeneral.Visible   = true;

            pnlDungeonScripts           = new Panel("pnlDungeonScripts");
            pnlDungeonScripts.Size      = new System.Drawing.Size(320, 270);
            pnlDungeonScripts.Location  = new Point(0, 30);
            pnlDungeonScripts.BackColor = Color.White;
            pnlDungeonScripts.Visible   = false;

            pnlDungeonStandardMaps           = new Panel("pnlDungeonStandardMaps");
            pnlDungeonStandardMaps.Size      = new System.Drawing.Size(320, 270);
            pnlDungeonStandardMaps.Location  = new Point(0, 30);
            pnlDungeonStandardMaps.BackColor = Color.White;
            pnlDungeonStandardMaps.Visible   = false;

            pnlDungeonRandomMaps           = new Panel("pnlDungeonRandomMaps");
            pnlDungeonRandomMaps.Size      = new System.Drawing.Size(320, 270);
            pnlDungeonRandomMaps.Location  = new Point(0, 30);
            pnlDungeonRandomMaps.BackColor = Color.White;
            pnlDungeonRandomMaps.Visible   = false;
            #endregion

            #region Dungeon List
            lbxDungeonList          = new ListBox("lbxDungeonList");
            lbxDungeonList.Location = new Point(10, 10);
            lbxDungeonList.Size     = new Size(180, 140);
            for (int i = 0; i < 10; i++)
            {
                ListBoxTextItem lbiDungeon = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), i + ": ");
                lbxDungeonList.Items.Add(lbiDungeon);
            }

            btnBack          = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size     = new System.Drawing.Size(64, 16);
            btnBack.Visible  = true;
            btnBack.Text     = "<--";
            btnBack.Click   += new EventHandler <MouseButtonEventArgs>(btnBack_Click);

            btnForward          = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size     = new System.Drawing.Size(64, 16);
            btnForward.Visible  = true;
            btnForward.Text     = "-->";
            btnForward.Click   += new EventHandler <MouseButtonEventArgs>(btnForward_Click);

            btnEdit          = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size     = new System.Drawing.Size(64, 16);
            btnEdit.Visible  = true;
            btnEdit.Text     = "Edit";
            btnEdit.Click   += new EventHandler <MouseButtonEventArgs>(btnEdit_Click);

            btnCancel          = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size     = new System.Drawing.Size(64, 16);
            btnCancel.Visible  = true;
            btnCancel.Text     = "Cancel";
            btnCancel.Click   += new EventHandler <MouseButtonEventArgs>(btnCancel_Click);

            btnAddNew          = new Button("btnAddNew");
            btnAddNew.Location = new Point(76, 190);
            btnAddNew.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddNew.Size     = new System.Drawing.Size(48, 16);
            btnAddNew.Visible  = true;
            btnAddNew.Text     = "New";
            btnAddNew.Click   += new EventHandler <MouseButtonEventArgs>(btnAddNew_Click);
            #endregion

            #region Dungeon Editor Panel

            btnGeneral          = new Button("btnGeneral");
            btnGeneral.Location = new Point(5, 5);
            btnGeneral.Size     = new Size(70, 20);
            btnGeneral.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnGeneral.Text     = "General";
            btnGeneral.Click   += new EventHandler <MouseButtonEventArgs>(btnGeneral_Click);

            btnStandardMaps          = new Button("btnStandardMaps");
            btnStandardMaps.Location = new Point(80, 5);
            btnStandardMaps.Size     = new Size(70, 20);
            btnStandardMaps.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnStandardMaps.Text     = "Standard Maps";
            btnStandardMaps.Click   += new EventHandler <MouseButtonEventArgs>(btnStandardMaps_Click);

            btnRandomMaps          = new Button("btnRandomMaps");
            btnRandomMaps.Location = new Point(155, 5);
            btnRandomMaps.Size     = new Size(70, 20);
            btnRandomMaps.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRandomMaps.Text     = "Random Maps";
            btnRandomMaps.Click   += new EventHandler <MouseButtonEventArgs>(btnRandomMaps_Click);

            btnScripts          = new Button("btnScripts");
            btnScripts.Location = new Point(230, 5);
            btnScripts.Size     = new Size(70, 20);
            btnScripts.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnScripts.Text     = "Scripts";
            btnScripts.Click   += new EventHandler <MouseButtonEventArgs>(btnScripts_Click);

            #endregion

            #region General

            lblName          = new Label("lblName");
            lblName.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblName.Text     = "Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName          = new TextBox("txtName");
            txtName.Size     = new Size(200, 16);
            txtName.Location = new Point(10, 24);
            txtName.Font     = Graphics.FontManager.LoadFont("tahoma", 12);

            chkRescue          = new CheckBox("chkRescue");
            chkRescue.Font     = Graphics.FontManager.LoadFont("tahoma", 12);
            chkRescue.Size     = new Size(140, 14);
            chkRescue.Location = new Point(10, 48);
            chkRescue.Text     = "Allow Rescue";

            btnEditorCancel          = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(120, 75);
            btnEditorCancel.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size     = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible  = true;
            btnEditorCancel.Text     = "Cancel";
            btnEditorCancel.Click   += new EventHandler <MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK          = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(20, 75);
            btnEditorOK.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size     = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible  = true;
            btnEditorOK.Text     = "OK";
            btnEditorOK.Click   += new EventHandler <MouseButtonEventArgs>(btnEditorOK_Click);

            #endregion

            #region Scripts

            lblScriptNum          = new Label("lblScriptNum");
            lblScriptNum.AutoSize = true;
            lblScriptNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblScriptNum.Location = new Point(10, 0);
            lblScriptNum.Text     = "Num:";

            nudScriptNum          = new NumericUpDown("nudScriptNum");
            nudScriptNum.Size     = new Size(70, 20);
            nudScriptNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            nudScriptNum.Maximum  = Int32.MaxValue;
            nudScriptNum.Minimum  = Int32.MinValue;
            nudScriptNum.Location = new Point(10, 14);

            lblScriptParam          = new Label("lblScriptParam");
            lblScriptParam.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblScriptParam.Text     = "Parameter String:";
            lblScriptParam.AutoSize = true;
            lblScriptParam.Location = new Point(10, 34);

            txtScriptParam          = new TextBox("txtScriptParam");
            txtScriptParam.Size     = new Size(200, 16);
            txtScriptParam.Location = new Point(10, 46);
            txtScriptParam.Font     = Graphics.FontManager.LoadFont("tahoma", 12);

            btnAddScript          = new Button("btnAddScript");
            btnAddScript.Size     = new Size(70, 16);
            btnAddScript.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddScript.Location = new Point(5, 72);
            btnAddScript.Text     = "Add";
            btnAddScript.Click   += new EventHandler <MouseButtonEventArgs>(btnAddScript_Click);

            btnRemoveScript          = new Button("btnRemoveScript");
            btnRemoveScript.Size     = new Size(70, 16);
            btnRemoveScript.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveScript.Location = new Point(80, 72);
            btnRemoveScript.Text     = "Remove";
            btnRemoveScript.Click   += new EventHandler <MouseButtonEventArgs>(btnRemoveScript_Click);

            btnLoadScript          = new Button("btnLoadScript");
            btnLoadScript.Size     = new Size(70, 16);
            btnLoadScript.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadScript.Location = new Point(155, 72);
            btnLoadScript.Text     = "Load";
            btnLoadScript.Click   += new EventHandler <MouseButtonEventArgs>(btnLoadScript_Click);

            lbxDungeonScripts             = new ListBox("lbxDungeonScripts");
            lbxDungeonScripts.Location    = new Point(10, 90);
            lbxDungeonScripts.Size        = new Size(pnlDungeonStandardMaps.Size.Width - 20, pnlDungeonStandardMaps.Size.Height - 120);
            lbxDungeonScripts.MultiSelect = false;

            #endregion

            #region Standard Maps

            lblMapNum          = new Label("lblMapNum");
            lblMapNum.AutoSize = true;
            lblMapNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblMapNum.Location = new Point(10, 0);
            lblMapNum.Text     = "Num:";

            nudMapNum          = new NumericUpDown("nudMapNum");
            nudMapNum.Size     = new Size(70, 20);
            nudMapNum.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            nudMapNum.Maximum  = 2000;
            nudMapNum.Minimum  = 1;
            nudMapNum.Location = new Point(10, 14);

            lblSMapDifficulty          = new Label("lblSMapDifficulty");
            lblSMapDifficulty.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblSMapDifficulty.Text     = "Difficulty:";
            lblSMapDifficulty.AutoSize = true;
            lblSMapDifficulty.Location = new Point(10, 34);

            nudSMapDifficulty          = new NumericUpDown("nudSMapDifficulty");
            nudSMapDifficulty.Size     = new Size(50, 20);
            nudSMapDifficulty.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            nudSMapDifficulty.Location = new Point(10, 48);
            nudSMapDifficulty.Minimum  = 1;
            nudSMapDifficulty.Maximum  = 16;

            chkSMapBad          = new CheckBox("chkSMap");
            chkSMapBad.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            chkSMapBad.Size     = new Size(120, 14);
            chkSMapBad.Location = new Point(100, 40);
            chkSMapBad.Text     = "Boss Goal Map";

            btnAddSMap          = new Button("btnAddSMap");
            btnAddSMap.Size     = new Size(70, 16);
            btnAddSMap.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddSMap.Location = new Point(5, 72);
            btnAddSMap.Text     = "Add";
            btnAddSMap.Click   += new EventHandler <MouseButtonEventArgs>(btnAddSMap_Click);

            btnRemoveSMap          = new Button("btnRemoveSMap");
            btnRemoveSMap.Size     = new Size(70, 16);
            btnRemoveSMap.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveSMap.Location = new Point(80, 72);
            btnRemoveSMap.Text     = "Remove";
            btnRemoveSMap.Click   += new EventHandler <MouseButtonEventArgs>(btnRemoveSMap_Click);

            btnLoadSMap          = new Button("btnLoadSMap");
            btnLoadSMap.Size     = new Size(70, 16);
            btnLoadSMap.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadSMap.Location = new Point(155, 72);
            btnLoadSMap.Text     = "Load";
            btnLoadSMap.Click   += new EventHandler <MouseButtonEventArgs>(btnLoadSMap_Click);

            lbxDungeonSMaps             = new ListBox("lbxDungeonSMaps");
            lbxDungeonSMaps.Location    = new Point(10, 90);
            lbxDungeonSMaps.Size        = new Size(pnlDungeonStandardMaps.Size.Width - 20, pnlDungeonStandardMaps.Size.Height - 120);
            lbxDungeonSMaps.MultiSelect = false;

            #endregion

            #region Random Maps

            lblRDungeonIndex          = new Label("lblRDungeonIndex");
            lblRDungeonIndex.AutoSize = true;
            lblRDungeonIndex.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblRDungeonIndex.Location = new Point(2, 0);
            lblRDungeonIndex.Text     = "Dungeon #:";

            nudRDungeonIndex               = new NumericUpDown("nudRDungeonIndex");
            nudRDungeonIndex.Size          = new Size(70, 20);
            nudRDungeonIndex.Font          = Graphics.FontManager.LoadFont("tahoma", 10);
            nudRDungeonIndex.Maximum       = MaxInfo.MaxRDungeons;
            nudRDungeonIndex.Minimum       = 1;
            nudRDungeonIndex.Location      = new Point(10, 14);
            nudRDungeonIndex.ValueChanged += new EventHandler <ValueChangedEventArgs>(nudRDungeonIndex_ValueChanged);

            lblRDungeonFloor          = new Label("lblRDungeonFloor");
            lblRDungeonFloor.AutoSize = true;
            lblRDungeonFloor.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblRDungeonFloor.Location = new Point(240, 0);
            lblRDungeonFloor.Text     = "From Floor:";

            nudRDungeonFloor               = new NumericUpDown("nudRDungeonFloor");
            nudRDungeonFloor.Size          = new Size(70, 20);
            nudRDungeonFloor.Font          = Graphics.FontManager.LoadFont("tahoma", 10);
            nudRDungeonFloor.Maximum       = Int32.MaxValue;
            nudRDungeonFloor.Minimum       = 1;
            nudRDungeonFloor.Location      = new Point(240, 14);
            nudRDungeonFloor.ValueChanged += new EventHandler <ValueChangedEventArgs>(nudRDungeonFloor_ValueChanged);

            lblRDungeonFloorEnd          = new Label("lblRDungeonFloorEnd");
            lblRDungeonFloorEnd.AutoSize = true;
            lblRDungeonFloorEnd.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblRDungeonFloorEnd.Location = new Point(240, 34);
            lblRDungeonFloorEnd.Text     = "To Floor:";

            nudRDungeonFloorEnd               = new NumericUpDown("nudRDungeonFloorEnd");
            nudRDungeonFloorEnd.Size          = new Size(70, 20);
            nudRDungeonFloorEnd.Font          = Graphics.FontManager.LoadFont("tahoma", 10);
            nudRDungeonFloorEnd.Maximum       = Int32.MaxValue;
            nudRDungeonFloorEnd.Minimum       = 1;
            nudRDungeonFloorEnd.Location      = new Point(240, 48);
            nudRDungeonFloorEnd.ValueChanged += new EventHandler <ValueChangedEventArgs>(nudRDungeonFloorEnd_ValueChanged);

            lblRMapDifficulty          = new Label("lblRMapDifficulty");
            lblRMapDifficulty.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblRMapDifficulty.Text     = "Difficulty:";
            lblRMapDifficulty.AutoSize = true;
            lblRMapDifficulty.Location = new Point(10, 34);

            nudRMapDifficulty          = new NumericUpDown("nudRMapDifficulty");
            nudRMapDifficulty.Size     = new Size(50, 20);
            nudRMapDifficulty.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            nudRMapDifficulty.Location = new Point(10, 48);
            nudRMapDifficulty.Minimum  = 1;
            nudRMapDifficulty.Maximum  = 16;

            chkRMapBad          = new CheckBox("chkRMap");
            chkRMapBad.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            chkRMapBad.Size     = new Size(120, 14);
            chkRMapBad.Location = new Point(100, 50);
            chkRMapBad.Text     = "Boss Goal Map";

            btnAddRMap          = new Button("btnAddRMap");
            btnAddRMap.Size     = new Size(70, 16);
            btnAddRMap.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAddRMap.Location = new Point(5, 72);
            btnAddRMap.Text     = "Add";
            btnAddRMap.Click   += new EventHandler <MouseButtonEventArgs>(btnAddRMap_Click);

            btnRemoveRMap          = new Button("btnRemoveRMap");
            btnRemoveRMap.Size     = new Size(70, 16);
            btnRemoveRMap.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRemoveRMap.Location = new Point(80, 72);
            btnRemoveRMap.Text     = "Remove";
            btnRemoveRMap.Click   += new EventHandler <MouseButtonEventArgs>(btnRemoveRMap_Click);

            btnLoadRMap          = new Button("btnLoadRMap");
            btnLoadRMap.Size     = new Size(70, 16);
            btnLoadRMap.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnLoadRMap.Location = new Point(155, 72);
            btnLoadRMap.Text     = "Load";
            btnLoadRMap.Click   += new EventHandler <MouseButtonEventArgs>(btnLoadRMap_Click);

            lbxDungeonRMaps             = new ListBox("lbxDungeonRMaps");
            lbxDungeonRMaps.Location    = new Point(10, 90);
            lbxDungeonRMaps.Size        = new Size(pnlDungeonRandomMaps.Size.Width - 20, pnlDungeonRandomMaps.Size.Height - 120);
            lbxDungeonRMaps.MultiSelect = false;

            #endregion

            #region Addwidget
            //Dungeon List
            pnlDungeonList.AddWidget(lbxDungeonList);
            pnlDungeonList.AddWidget(btnBack);
            pnlDungeonList.AddWidget(btnForward);
            pnlDungeonList.AddWidget(btnAddNew);
            pnlDungeonList.AddWidget(btnEdit);
            pnlDungeonList.AddWidget(btnCancel);
            //General
            pnlDungeonGeneral.AddWidget(lblName);
            pnlDungeonGeneral.AddWidget(txtName);
            pnlDungeonGeneral.AddWidget(chkRescue);
            pnlDungeonGeneral.AddWidget(btnEditorCancel);
            pnlDungeonGeneral.AddWidget(btnEditorOK);
            //Scripts
            pnlDungeonScripts.AddWidget(lblScriptNum);
            pnlDungeonScripts.AddWidget(nudScriptNum);
            pnlDungeonScripts.AddWidget(lblScriptParam);
            pnlDungeonScripts.AddWidget(txtScriptParam);
            pnlDungeonScripts.AddWidget(btnAddScript);
            pnlDungeonScripts.AddWidget(btnRemoveScript);
            pnlDungeonScripts.AddWidget(btnLoadScript);
            pnlDungeonScripts.AddWidget(lbxDungeonScripts);
            //Standard Maps
            pnlDungeonStandardMaps.AddWidget(lblMapNum);
            pnlDungeonStandardMaps.AddWidget(nudMapNum);
            pnlDungeonStandardMaps.AddWidget(lblSMapDifficulty);
            pnlDungeonStandardMaps.AddWidget(nudSMapDifficulty);
            pnlDungeonStandardMaps.AddWidget(chkSMapBad);
            pnlDungeonStandardMaps.AddWidget(btnAddSMap);
            pnlDungeonStandardMaps.AddWidget(btnRemoveSMap);
            pnlDungeonStandardMaps.AddWidget(btnLoadSMap);
            pnlDungeonStandardMaps.AddWidget(lbxDungeonSMaps);
            //RDungeon Maps
            pnlDungeonRandomMaps.AddWidget(lblRDungeonIndex);
            pnlDungeonRandomMaps.AddWidget(nudRDungeonIndex);
            pnlDungeonRandomMaps.AddWidget(lblRDungeonFloor);
            pnlDungeonRandomMaps.AddWidget(nudRDungeonFloor);
            pnlDungeonRandomMaps.AddWidget(lblRDungeonFloorEnd);
            pnlDungeonRandomMaps.AddWidget(nudRDungeonFloorEnd);
            pnlDungeonRandomMaps.AddWidget(lblRMapDifficulty);
            pnlDungeonRandomMaps.AddWidget(nudRMapDifficulty);
            pnlDungeonRandomMaps.AddWidget(chkRMapBad);
            pnlDungeonRandomMaps.AddWidget(btnAddRMap);
            pnlDungeonRandomMaps.AddWidget(btnRemoveRMap);
            pnlDungeonRandomMaps.AddWidget(btnLoadRMap);
            pnlDungeonRandomMaps.AddWidget(lbxDungeonRMaps);
            //Editor panel
            pnlDungeonEditor.AddWidget(btnGeneral);
            pnlDungeonEditor.AddWidget(btnStandardMaps);
            pnlDungeonEditor.AddWidget(btnRandomMaps);
            pnlDungeonEditor.AddWidget(btnScripts);
            pnlDungeonEditor.AddWidget(pnlDungeonGeneral);
            pnlDungeonEditor.AddWidget(pnlDungeonStandardMaps);
            pnlDungeonEditor.AddWidget(pnlDungeonRandomMaps);
            pnlDungeonEditor.AddWidget(pnlDungeonScripts);
            //This
            this.AddWidget(pnlDungeonList);
            this.AddWidget(pnlDungeonEditor);
            #endregion

            RefreshDungeonList();
        }
示例#52
0
        public winItemPanel()
            : base("winItemPanel")
        {
            this.Windowed             = true;
            this.ShowInWindowSwitcher = false;
            this.Size        = new System.Drawing.Size(200, 230);
            this.Location    = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Item Panel";

            pnlItemList           = new Panel("pnlItemList");
            pnlItemList.Size      = new System.Drawing.Size(200, 230);
            pnlItemList.Location  = new Point(0, 0);
            pnlItemList.BackColor = Color.White;
            pnlItemList.Visible   = true;

            pnlItemEditor           = new Panel("pnlItemEditor");
            pnlItemEditor.Size      = new System.Drawing.Size(580, 380);
            pnlItemEditor.Location  = new Point(0, 0);
            pnlItemEditor.BackColor = Color.White;
            pnlItemEditor.Visible   = false;


            lbxItemList          = new ListBox("lbxItemList");
            lbxItemList.Location = new Point(10, 10);
            lbxItemList.Size     = new Size(180, 140);
            for (int i = 0; i < 10; i++)
            {
                lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Items.ItemHelper.Items[(i + 1) + 10 * currentTen].Name);
                lbxItemList.Items.Add(lbiItem);
            }
            lbxItemList.SelectItem(0);

            btnBack          = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size     = new System.Drawing.Size(64, 16);
            btnBack.Visible  = true;
            btnBack.Text     = "<--";
            btnBack.Click   += new EventHandler <MouseButtonEventArgs>(btnBack_Click);

            btnForward          = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size     = new System.Drawing.Size(64, 16);
            btnForward.Visible  = true;
            btnForward.Text     = "-->";
            btnForward.Click   += new EventHandler <MouseButtonEventArgs>(btnForward_Click);


            btnEdit          = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size     = new System.Drawing.Size(64, 16);
            btnEdit.Visible  = true;
            btnEdit.Text     = "Edit";
            btnEdit.Click   += new EventHandler <MouseButtonEventArgs>(btnEdit_Click);

            btnCancel          = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size     = new System.Drawing.Size(64, 16);
            btnCancel.Visible  = true;
            btnCancel.Text     = "Cancel";
            btnCancel.Click   += new EventHandler <MouseButtonEventArgs>(btnCancel_Click);

            //btnAddNew = new Button("btnAddNew");
            //btnAddNew.Location = new Point();
            //btnAddNew.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            //btnAddNew.Size = new System.Drawing.Size(64, 16);
            //btnAddNew.Visible = true;
            //btnAddNew.Text = "Add New";
            //btnAddNew.Click += new EventHandler<MouseButtonEventArgs>(btnAddNew_Click);


            btnEditorCancel          = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(100, 334);
            btnEditorCancel.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size     = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible  = true;
            btnEditorCancel.Text     = "Cancel";
            btnEditorCancel.Click   += new EventHandler <MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK          = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(10, 334);
            btnEditorOK.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size     = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible  = true;
            btnEditorOK.Text     = "OK";
            btnEditorOK.Click   += new EventHandler <MouseButtonEventArgs>(btnEditorOK_Click);

            lblName          = new Label("lblName");
            lblName.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text     = "Item Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName          = new TextBox("txtName");
            txtName.Size     = new Size(200, 16);
            txtName.Location = new Point(10, 16);

            lblSprite          = new Label("lblSprite");
            lblSprite.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSprite.Text     = "Item Sprite:";
            lblSprite.AutoSize = true;
            lblSprite.Location = new Point(10, 36);

            pic                   = new Widgets.ItemsetViewer("pic");
            pic.Location          = new Point(10, 48);
            pic.Size              = new Size(204, 144);
            pic.ActiveItemSurface = Graphics.GraphicsManager.Items;

            lblSellPrice          = new Label("lblSellPrice");
            lblSellPrice.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSellPrice.Text     = "Sell Price:";
            lblSellPrice.AutoSize = true;
            lblSellPrice.Location = new Point(10, 200);

            nudSellPrice          = new NumericUpDown("nudSellPrice");
            nudSellPrice.Size     = new Size(200, 16);
            nudSellPrice.Location = new Point(10, 212);
            nudSellPrice.Minimum  = 0;
            nudSellPrice.Maximum  = Int32.MaxValue;

            nudStackCap          = new NumericUpDown("nudStackCap");
            nudStackCap.Location = new Point(10, 232);
            nudStackCap.Size     = new System.Drawing.Size(95, 17);
            nudStackCap.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            nudStackCap.Minimum  = 0;
            nudStackCap.Maximum  = Int32.MaxValue;

            lblStackCap          = new Label("lblStackCap");
            lblStackCap.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblStackCap.Text     = "Stack Cap";
            lblStackCap.AutoSize = true;
            lblStackCap.Location = new Point(110, 232);

            chkBound           = new CheckBox("chkBound");
            chkBound.Location  = new Point(10, 252);
            chkBound.Size      = new System.Drawing.Size(95, 17);
            chkBound.BackColor = Color.Transparent;
            chkBound.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            chkBound.Text      = "Bound";

            chkLoseable           = new CheckBox("chkLoseable");
            chkLoseable.Location  = new Point(10, 272);
            chkLoseable.Size      = new System.Drawing.Size(95, 17);
            chkLoseable.BackColor = Color.Transparent;
            chkLoseable.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            chkLoseable.Text      = "Loseable";

            lblDescription          = new Label("lblDescription");
            lblDescription.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblDescription.Text     = "Description:";
            lblDescription.AutoSize = true;
            lblDescription.Location = new Point(10, 292);

            txtDescription          = new TextBox("txtDescription");
            txtDescription.Size     = new Size(300, 16);
            txtDescription.Location = new Point(10, 304);


            lblType          = new Label("lblType");
            lblType.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblType.Text     = "Item Type:";
            lblType.AutoSize = true;
            lblType.Location = new Point(220, 4);

            optTypeNone           = new RadioButton("optTypeNone");
            optTypeNone.BackColor = Color.Transparent;
            optTypeNone.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeNone.Location  = new Point(220, 24);
            optTypeNone.Size      = new System.Drawing.Size(95, 17);
            optTypeNone.Text      = "None";
            optTypeNone.Checked   = true;

            optTypeHeld           = new RadioButton("optTypeHeld");
            optTypeHeld.BackColor = Color.Transparent;
            optTypeHeld.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeHeld.Location  = new Point(220, 44);
            optTypeHeld.Size      = new System.Drawing.Size(95, 17);
            optTypeHeld.Text      = "Held Item";

            optTypeHeldByParty           = new RadioButton("optTypeHeldByParty");
            optTypeHeldByParty.BackColor = Color.Transparent;
            optTypeHeldByParty.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeHeldByParty.Location  = new Point(220, 64);
            optTypeHeldByParty.Size      = new System.Drawing.Size(95, 17);
            optTypeHeldByParty.Text      = "Party Item";

            optTypeHeldInBag           = new RadioButton("optTypeHeldInBag");
            optTypeHeldInBag.BackColor = Color.Transparent;
            optTypeHeldInBag.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeHeldInBag.Location  = new Point(220, 84);
            optTypeHeldInBag.Size      = new System.Drawing.Size(95, 17);
            optTypeHeldInBag.Text      = "Bag Item";

            optTypePotionAddHP           = new RadioButton("optTypePotionAddHP");
            optTypePotionAddHP.BackColor = Color.Transparent;
            optTypePotionAddHP.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionAddHP.Location  = new Point(220, 104);
            optTypePotionAddHP.Size      = new System.Drawing.Size(95, 17);
            optTypePotionAddHP.Text      = "HP Heal";

            optTypePotionAddPP           = new RadioButton("optTypePotionAddPP");
            optTypePotionAddPP.BackColor = Color.Transparent;
            optTypePotionAddPP.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionAddPP.Location  = new Point(220, 124);
            optTypePotionAddPP.Size      = new System.Drawing.Size(95, 17);
            optTypePotionAddPP.Text      = "PP Heal";

            optTypePotionAddBelly           = new RadioButton("optTypePotionAddBelly");
            optTypePotionAddBelly.BackColor = Color.Transparent;
            optTypePotionAddBelly.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionAddBelly.Location  = new Point(220, 144);
            optTypePotionAddBelly.Size      = new System.Drawing.Size(95, 17);
            optTypePotionAddBelly.Text      = "Belly Heal";

            optTypePotionSubHP           = new RadioButton("optTypePotionSubHP");
            optTypePotionSubHP.BackColor = Color.Transparent;
            optTypePotionSubHP.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionSubHP.Location  = new Point(220, 164);
            optTypePotionSubHP.Size      = new System.Drawing.Size(95, 17);
            optTypePotionSubHP.Text      = "HP Loss";

            optTypePotionSubPP           = new RadioButton("optTypePotionSubPP");
            optTypePotionSubPP.BackColor = Color.Transparent;
            optTypePotionSubPP.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionSubPP.Location  = new Point(220, 184);
            optTypePotionSubPP.Size      = new System.Drawing.Size(95, 17);
            optTypePotionSubPP.Text      = "PP Loss";

            optTypePotionSubBelly           = new RadioButton("optTypePotionSubBelly");
            optTypePotionSubBelly.BackColor = Color.Transparent;
            optTypePotionSubBelly.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypePotionSubBelly.Location  = new Point(220, 204);
            optTypePotionSubBelly.Size      = new System.Drawing.Size(95, 17);
            optTypePotionSubBelly.Text      = "Belly Loss";

            optTypeKey           = new RadioButton("optTypeKey");
            optTypeKey.BackColor = Color.Transparent;
            optTypeKey.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeKey.Location  = new Point(220, 224);
            optTypeKey.Size      = new System.Drawing.Size(95, 17);
            optTypeKey.Text      = "Key";

            optTypeCurrency           = new RadioButton("optTypeCurrency");
            optTypeCurrency.BackColor = Color.Transparent;
            optTypeCurrency.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeCurrency.Location  = new Point(220, 244);
            optTypeCurrency.Size      = new System.Drawing.Size(95, 17);
            optTypeCurrency.Text      = "Currency";

            optTypeTM           = new RadioButton("optTypeTM");
            optTypeTM.BackColor = Color.Transparent;
            optTypeTM.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeTM.Location  = new Point(220, 264);
            optTypeTM.Size      = new System.Drawing.Size(95, 17);
            optTypeTM.Text      = "TM";

            optTypeScripted           = new RadioButton("optTypeScripted");
            optTypeScripted.BackColor = Color.Transparent;
            optTypeScripted.Font      = Graphics.FontManager.LoadFont("tahoma", 10);
            optTypeScripted.Location  = new Point(220, 284);
            optTypeScripted.Size      = new System.Drawing.Size(95, 17);
            optTypeScripted.Text      = "Scripted";


            lblData1          = new Label("lblData1");
            lblData1.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData1.Text     = "Data1:";
            lblData1.AutoSize = true;
            lblData1.Location = new Point(340, 4);


            nudData1          = new NumericUpDown("nudData1");
            nudData1.Size     = new Size(100, 16);
            nudData1.Location = new Point(340, 16);
            nudData1.Minimum  = Int32.MinValue;
            nudData1.Maximum  = Int32.MaxValue;

            lblData2          = new Label("lblData2");
            lblData2.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData2.Text     = "Data2:";
            lblData2.AutoSize = true;
            lblData2.Location = new Point(340, 36);

            nudData2          = new NumericUpDown("nudData2");
            nudData2.Size     = new Size(100, 16);
            nudData2.Location = new Point(340, 48);
            nudData2.Minimum  = Int32.MinValue;
            nudData2.Maximum  = Int32.MaxValue;

            lblData3          = new Label("lblData3");
            lblData3.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData3.Text     = "Data3:";
            lblData3.AutoSize = true;
            lblData3.Location = new Point(340, 68);

            nudData3          = new NumericUpDown("nudData3");
            nudData3.Size     = new Size(100, 16);
            nudData3.Location = new Point(340, 80);
            nudData3.Minimum  = Int32.MinValue;
            nudData3.Maximum  = Int32.MaxValue;

            lblRarity          = new Label("lblRarity");
            lblRarity.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblRarity.Text     = "Rarity: (1-10)";
            lblRarity.AutoSize = true;
            lblRarity.Location = new Point(340, 100);

            nudRarity          = new NumericUpDown("nudRarity");
            nudRarity.Size     = new Size(100, 16);
            nudRarity.Location = new Point(340, 112);
            nudRarity.Minimum  = 1;
            nudRarity.Maximum  = 10;

            lblAtkReq          = new Label("lblAtkReq");
            lblAtkReq.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAtkReq.Text     = "Req Data 1:";
            lblAtkReq.AutoSize = true;
            lblAtkReq.Location = new Point(340, 132);

            nudAtkReq          = new NumericUpDown("nudAtkReq");
            nudAtkReq.Size     = new Size(100, 16);
            nudAtkReq.Location = new Point(340, 144);
            nudAtkReq.Minimum  = Int32.MinValue;
            nudAtkReq.Maximum  = Int32.MaxValue;

            lblDefReq          = new Label("lblDefReq");
            lblDefReq.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblDefReq.Text     = "Req Data 2:";
            lblDefReq.AutoSize = true;
            lblDefReq.Location = new Point(340, 164);

            nudDefReq          = new NumericUpDown("nudDefReq");
            nudDefReq.Size     = new Size(100, 16);
            nudDefReq.Location = new Point(340, 176);
            nudDefReq.Minimum  = Int32.MinValue;
            nudDefReq.Maximum  = Int32.MaxValue;

            lblSpAtkReq          = new Label("lblSpAtkReq");
            lblSpAtkReq.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSpAtkReq.Text     = "Req Data 3:";
            lblSpAtkReq.AutoSize = true;
            lblSpAtkReq.Location = new Point(340, 196);

            nudSpAtkReq          = new NumericUpDown("nudSpAtkReq");
            nudSpAtkReq.Size     = new Size(100, 16);
            nudSpAtkReq.Location = new Point(340, 208);
            nudSpAtkReq.Minimum  = Int32.MinValue;
            nudSpAtkReq.Maximum  = Int32.MaxValue;

            lblSpDefReq          = new Label("lblSpDefReq");
            lblSpDefReq.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSpDefReq.Text     = "Req Data 4:";
            lblSpDefReq.AutoSize = true;
            lblSpDefReq.Location = new Point(340, 228);

            nudSpDefReq          = new NumericUpDown("nudSpDefReq");
            nudSpDefReq.Size     = new Size(100, 16);
            nudSpDefReq.Location = new Point(340, 240);
            nudSpDefReq.Minimum  = Int32.MinValue;
            nudSpDefReq.Maximum  = Int32.MaxValue;

            lblSpeedReq          = new Label("lblSpeedReq");
            lblSpeedReq.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSpeedReq.Text     = "Req Data 5:";
            lblSpeedReq.AutoSize = true;
            lblSpeedReq.Location = new Point(340, 260);

            nudSpeedReq          = new NumericUpDown("nudSpeedReq");
            nudSpeedReq.Size     = new Size(100, 16);
            nudSpeedReq.Location = new Point(340, 272);
            nudSpeedReq.Minimum  = Int32.MinValue;
            nudSpeedReq.Maximum  = Int32.MaxValue;

            lblScriptedReq          = new Label("lblScriptedReq");
            lblScriptedReq.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblScriptedReq.Text     = "Req Script: >= -1";
            lblScriptedReq.AutoSize = true;
            lblScriptedReq.Location = new Point(340, 292);

            nudScriptedReq          = new NumericUpDown("nudScriptedReq");
            nudScriptedReq.Size     = new Size(100, 16);
            nudScriptedReq.Location = new Point(340, 304);
            nudScriptedReq.Minimum  = -1;
            nudScriptedReq.Maximum  = Int32.MaxValue;

            lblAddHP          = new Label("lblAddHP");
            lblAddHP.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddHP.Text     = "Add HP:";
            lblAddHP.AutoSize = true;
            lblAddHP.Location = new Point(460, 4);

            nudAddHP          = new NumericUpDown("nudAddHP");
            nudAddHP.Size     = new Size(100, 16);
            nudAddHP.Location = new Point(460, 16);
            nudAddHP.Minimum  = Int32.MinValue;
            nudAddHP.Maximum  = Int32.MaxValue;

            lblAddPP          = new Label("lblAddPP");
            lblAddPP.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddPP.Text     = "Add PP:";
            lblAddPP.AutoSize = true;
            lblAddPP.Location = new Point(460, 36);

            nudAddPP          = new NumericUpDown("nudAddPP");
            nudAddPP.Size     = new Size(100, 16);
            nudAddPP.Location = new Point(460, 48);
            nudAddPP.Minimum  = Int32.MinValue;
            nudAddPP.Maximum  = Int32.MaxValue;

            lblAddEXP          = new Label("lblAddEXP");
            lblAddEXP.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddEXP.Text     = "Add EXP: (+-100)";
            lblAddEXP.AutoSize = true;
            lblAddEXP.Location = new Point(460, 68);

            nudAddEXP          = new NumericUpDown("nudAddEXP");
            nudAddEXP.Size     = new Size(100, 16);
            nudAddEXP.Location = new Point(460, 80);
            nudAddEXP.Minimum  = -100;
            nudAddEXP.Maximum  = 100;

            lblAddAtk          = new Label("lblAddAtk");
            lblAddAtk.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddAtk.Text     = "Add Atk:";
            lblAddAtk.AutoSize = true;
            lblAddAtk.Location = new Point(460, 100);

            nudAddAtk          = new NumericUpDown("nudAddAtk");
            nudAddAtk.Size     = new Size(100, 16);
            nudAddAtk.Location = new Point(460, 112);
            nudAddAtk.Minimum  = Int32.MinValue;
            nudAddAtk.Maximum  = Int32.MaxValue;

            lblAddDef          = new Label("lblAddDef");
            lblAddDef.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddDef.Text     = "Add Def:";
            lblAddDef.AutoSize = true;
            lblAddDef.Location = new Point(460, 132);

            nudAddDef          = new NumericUpDown("nudAddDef");
            nudAddDef.Size     = new Size(100, 16);
            nudAddDef.Location = new Point(460, 144);
            nudAddDef.Minimum  = Int32.MinValue;
            nudAddDef.Maximum  = Int32.MaxValue;

            lblAddSpAtk          = new Label("lblAddSpAtk");
            lblAddSpAtk.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddSpAtk.Text     = "Add SpAtk:";
            lblAddSpAtk.AutoSize = true;
            lblAddSpAtk.Location = new Point(460, 164);

            nudAddSpAtk          = new NumericUpDown("nudAddSpAtk");
            nudAddSpAtk.Size     = new Size(100, 16);
            nudAddSpAtk.Location = new Point(460, 176);
            nudAddSpAtk.Minimum  = Int32.MinValue;
            nudAddSpAtk.Maximum  = Int32.MaxValue;

            lblAddSpDef          = new Label("lblAddSpDef");
            lblAddSpDef.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddSpDef.Text     = "Add SpDef:";
            lblAddSpDef.AutoSize = true;
            lblAddSpDef.Location = new Point(460, 196);

            nudAddSpDef          = new NumericUpDown("nudAddSpDef");
            nudAddSpDef.Size     = new Size(100, 16);
            nudAddSpDef.Location = new Point(460, 208);
            nudAddSpDef.Minimum  = Int32.MinValue;
            nudAddSpDef.Maximum  = Int32.MaxValue;

            lblAddSpeed          = new Label("lblAddSpeed");
            lblAddSpeed.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAddSpeed.Text     = "Add Speed:";
            lblAddSpeed.AutoSize = true;
            lblAddSpeed.Location = new Point(460, 228);

            nudAddSpeed          = new NumericUpDown("nudAddSpeed");
            nudAddSpeed.Size     = new Size(100, 16);
            nudAddSpeed.Location = new Point(460, 240);
            nudAddSpeed.Minimum  = Int32.MinValue;
            nudAddSpeed.Maximum  = Int32.MaxValue;

            lblAttackSpeed          = new Label("lblAttackSpeed");
            lblAttackSpeed.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAttackSpeed.Text     = "Hit Rate: (1-10000)";//confirm this
            lblAttackSpeed.AutoSize = true;
            lblAttackSpeed.Location = new Point(460, 260);

            nudAttackSpeed          = new NumericUpDown("nudAttackSpeed");
            nudAttackSpeed.Size     = new Size(100, 16);
            nudAttackSpeed.Location = new Point(460, 272);
            nudAttackSpeed.Minimum  = 1;
            nudAttackSpeed.Maximum  = 10000;

            lblRecruitBonus          = new Label("lblRecruitBonus");
            lblRecruitBonus.Font     = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblRecruitBonus.Text     = "Add Recruit:";
            lblRecruitBonus.AutoSize = true;
            lblRecruitBonus.Location = new Point(460, 292);

            nudRecruitBonus          = new NumericUpDown("nudRecruitBonus");
            nudRecruitBonus.Size     = new Size(100, 16);
            nudRecruitBonus.Location = new Point(460, 304);
            nudRecruitBonus.Minimum  = Int32.MinValue;
            nudRecruitBonus.Maximum  = Int32.MaxValue;


            //lbxItems = new SdlDotNet.Widgets.ListBox("lbxItems");
            //lbxItems.Location = new Point(20, 20);

            //set font properties, items, etc.


            //this.AddWidget(lbxItems);
            pnlItemList.AddWidget(lbxItemList);
            pnlItemList.AddWidget(btnBack);
            pnlItemList.AddWidget(btnForward);
            //pnlItemList.AddWidget(btnAddNew);
            pnlItemList.AddWidget(btnEdit);
            pnlItemList.AddWidget(btnCancel);

            pnlItemEditor.AddWidget(lblName);
            pnlItemEditor.AddWidget(txtName);
            pnlItemEditor.AddWidget(lblSprite);
            pnlItemEditor.AddWidget(pic);
            pnlItemEditor.AddWidget(lblSellPrice);
            pnlItemEditor.AddWidget(nudSellPrice);
            pnlItemEditor.AddWidget(nudStackCap);
            pnlItemEditor.AddWidget(lblStackCap);
            pnlItemEditor.AddWidget(chkBound);
            pnlItemEditor.AddWidget(chkLoseable);
            pnlItemEditor.AddWidget(lblDescription);
            pnlItemEditor.AddWidget(txtDescription);

            pnlItemEditor.AddWidget(lblType);
            pnlItemEditor.AddWidget(optTypeNone);
            pnlItemEditor.AddWidget(optTypeHeld);
            pnlItemEditor.AddWidget(optTypeHeldByParty);
            pnlItemEditor.AddWidget(optTypeHeldInBag);
            pnlItemEditor.AddWidget(optTypePotionAddHP);
            pnlItemEditor.AddWidget(optTypePotionAddPP);
            pnlItemEditor.AddWidget(optTypePotionAddBelly);
            pnlItemEditor.AddWidget(optTypePotionSubHP);
            pnlItemEditor.AddWidget(optTypePotionSubPP);
            pnlItemEditor.AddWidget(optTypePotionSubBelly);
            pnlItemEditor.AddWidget(optTypeKey);
            pnlItemEditor.AddWidget(optTypeCurrency);
            pnlItemEditor.AddWidget(optTypeTM);
            pnlItemEditor.AddWidget(optTypeScripted);

            pnlItemEditor.AddWidget(lblData1);
            pnlItemEditor.AddWidget(nudData1);
            pnlItemEditor.AddWidget(lblData2);
            pnlItemEditor.AddWidget(nudData2);
            pnlItemEditor.AddWidget(lblData3);
            pnlItemEditor.AddWidget(nudData3);
            pnlItemEditor.AddWidget(lblRarity);
            pnlItemEditor.AddWidget(nudRarity);
            pnlItemEditor.AddWidget(lblAtkReq);
            pnlItemEditor.AddWidget(nudAtkReq);
            pnlItemEditor.AddWidget(lblDefReq);
            pnlItemEditor.AddWidget(nudDefReq);
            pnlItemEditor.AddWidget(lblSpAtkReq);
            pnlItemEditor.AddWidget(nudSpAtkReq);
            pnlItemEditor.AddWidget(lblSpDefReq);
            pnlItemEditor.AddWidget(nudSpDefReq);
            pnlItemEditor.AddWidget(lblSpeedReq);
            pnlItemEditor.AddWidget(nudSpeedReq);
            pnlItemEditor.AddWidget(lblScriptedReq);
            pnlItemEditor.AddWidget(nudScriptedReq);

            pnlItemEditor.AddWidget(lblAddHP);
            pnlItemEditor.AddWidget(nudAddHP);
            pnlItemEditor.AddWidget(lblAddPP);
            pnlItemEditor.AddWidget(nudAddPP);
            pnlItemEditor.AddWidget(lblAddAtk);
            pnlItemEditor.AddWidget(nudAddAtk);
            pnlItemEditor.AddWidget(lblAddDef);
            pnlItemEditor.AddWidget(nudAddDef);
            pnlItemEditor.AddWidget(lblAddSpAtk);
            pnlItemEditor.AddWidget(nudAddSpAtk);
            pnlItemEditor.AddWidget(lblAddSpDef);
            pnlItemEditor.AddWidget(nudAddSpDef);
            pnlItemEditor.AddWidget(lblAddSpeed);
            pnlItemEditor.AddWidget(nudAddSpeed);
            pnlItemEditor.AddWidget(lblAddEXP);
            pnlItemEditor.AddWidget(nudAddEXP);
            pnlItemEditor.AddWidget(lblAttackSpeed);
            pnlItemEditor.AddWidget(nudAttackSpeed);
            pnlItemEditor.AddWidget(lblRecruitBonus);
            pnlItemEditor.AddWidget(nudRecruitBonus);

            pnlItemEditor.AddWidget(btnEditorCancel);
            pnlItemEditor.AddWidget(btnEditorOK);


            this.AddWidget(pnlItemList);
            this.AddWidget(pnlItemEditor);

            this.LoadComplete();
        }
示例#53
0
        public winMovePanel()
            : base("winMovePanel")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.Size = new System.Drawing.Size(200, 230);
            this.Location = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Move Panel";

            pnlMoveList = new Panel("pnlMoveList");
            pnlMoveList.Size = new System.Drawing.Size(200, 230);
            pnlMoveList.Location = new Point(0, 0);
            pnlMoveList.BackColor = Color.White;
            pnlMoveList.Visible = true;

            pnlMoveEditor = new Panel("pnlMoveEditor");
            pnlMoveEditor.Size = new System.Drawing.Size(580, 380);
            pnlMoveEditor.Location = new Point(0, 0);
            pnlMoveEditor.BackColor = Color.White;
            pnlMoveEditor.Visible = false;

            pnlAttackerAnim = new Panel("pnlAttackerAnim");
            pnlAttackerAnim.Size = new System.Drawing.Size(234, 140);
            pnlAttackerAnim.Location = new Point(346, 60);
            pnlAttackerAnim.BackColor = Color.White;
            pnlAttackerAnim.Visible = true;

            pnlTravelingAnim = new Panel("pnlTravelingAnim");
            pnlTravelingAnim.Size = new System.Drawing.Size(234, 140);
            pnlTravelingAnim.Location = new Point(346, 60);
            pnlTravelingAnim.BackColor = Color.White;
            pnlTravelingAnim.Visible = false;

            pnlDefenderAnim = new Panel("pnlDefenderAnim");
            pnlDefenderAnim.Size = new System.Drawing.Size(234, 140);
            pnlDefenderAnim.Location = new Point(346, 60);
            pnlDefenderAnim.BackColor = Color.White;
            pnlDefenderAnim.Visible = false;

            lbxMoveList = new ListBox("lbxMoveList");
            lbxMoveList.Location = new Point(10, 10);
            lbxMoveList.Size = new Size(180, 140);
            for (int i = 0; i < 10; i++) {
                lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (i + 1) + ": " + Moves.MoveHelper.Moves[(i + 1) + 10 * currentTen].Name);
                lbxMoveList.Items.Add(lbiItem);
            }
            lbxMoveList.SelectItem(0);

            btnBack = new Button("btnBack");
            btnBack.Location = new Point(10, 160);
            btnBack.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBack.Size = new System.Drawing.Size(64, 16);
            btnBack.Visible = true;
            btnBack.Text = "<--";
            btnBack.Click += new EventHandler<MouseButtonEventArgs>(btnBack_Click);

            btnForward = new Button("btnForward");
            btnForward.Location = new Point(126, 160);
            btnForward.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnForward.Size = new System.Drawing.Size(64, 16);
            btnForward.Visible = true;
            btnForward.Text = "-->";
            btnForward.Click += new EventHandler<MouseButtonEventArgs>(btnForward_Click);

            btnEdit = new Button("btnEdit");
            btnEdit.Location = new Point(10, 190);
            btnEdit.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEdit.Size = new System.Drawing.Size(64, 16);
            btnEdit.Visible = true;
            btnEdit.Text = "Edit";
            btnEdit.Click += new EventHandler<MouseButtonEventArgs>(btnEdit_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Location = new Point(126, 190);
            btnCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCancel.Size = new System.Drawing.Size(64, 16);
            btnCancel.Visible = true;
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            btnEditorCancel = new Button("btnEditorCancel");
            btnEditorCancel.Location = new Point(10, 334);
            btnEditorCancel.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorCancel.Size = new System.Drawing.Size(64, 16);
            btnEditorCancel.Visible = true;
            btnEditorCancel.Text = "Cancel";
            btnEditorCancel.Click += new EventHandler<MouseButtonEventArgs>(btnEditorCancel_Click);

            btnEditorOK = new Button("btnEditorOK");
            btnEditorOK.Location = new Point(100, 334);
            btnEditorOK.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEditorOK.Size = new System.Drawing.Size(64, 16);
            btnEditorOK.Visible = true;
            btnEditorOK.Text = "OK";
            btnEditorOK.Click += new EventHandler<MouseButtonEventArgs>(btnEditorOK_Click);

            lblName = new Label("lblName");
            lblName.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblName.Text = "Move Name:";
            lblName.AutoSize = true;
            lblName.Location = new Point(10, 4);

            txtName = new TextBox("txtName");
            txtName.Size = new Size(200, 16);
            txtName.Location = new Point(10, 16);
            //txtName.Text = "Loading...";

            lblMaxPP = new Label("lblMaxPP");
            lblMaxPP.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblMaxPP.Text = "MaxPP: >=1";
            lblMaxPP.AutoSize = true;
            lblMaxPP.Location = new Point(10, 36);

            nudMaxPP = new NumericUpDown("nudMaxPP");
            nudMaxPP.Size = new Size(200, 16);
            nudMaxPP.Location = new Point(10, 48);
            nudMaxPP.Minimum = 1;
            nudMaxPP.Maximum = Int32.MaxValue;

            lblEffectType = new Label("lblEffectType");
            lblEffectType.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblEffectType.Text = "Effect Type:";
            lblEffectType.AutoSize = true;
            lblEffectType.Location = new Point(10, 68);

            cbEffectType = new ComboBox("cbEffectType");
            cbEffectType.Location = new Point(10, 88);
            cbEffectType.Size = new Size(200, 16);
            for (int i = 0; i < 7; i++) {
                //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), );
                cbEffectType.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveType), i)));
            }

            lblElement = new Label("lblElement");
            lblElement.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblElement.Text = "Element:";
            lblElement.AutoSize = true;
            lblElement.Location = new Point(10, 100);

            cbElement = new ComboBox("cbElement");
            cbElement.Location = new Point(10, 118);
            cbElement.Size = new Size(200, 16);
            for (int i = 0; i < 19; i++) {
                //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), );
                cbElement.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.PokemonType), i)));
            }

            lblMoveCategory = new Label("lblMoveCategory");
            lblMoveCategory.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblMoveCategory.Text = "Category:";
            lblMoveCategory.AutoSize = true;
            lblMoveCategory.Location = new Point(10, 132);

            cbMoveCategory = new ComboBox("cbMoveCategory");
            cbMoveCategory.Location = new Point(10, 144);
            cbMoveCategory.Size = new Size(200, 16);
            for (int i = 0; i < 3; i++) {
                //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), );
                cbMoveCategory.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveCategory), i)));
            }

            lblTargetType = new Label("lblTargetType");
            lblTargetType.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblTargetType.Text = "Targets:";
            lblTargetType.AutoSize = true;
            lblTargetType.Location = new Point(10, 164);

            cbTargetType = new ComboBox("cbTargetType");
            cbTargetType.Location = new Point(10, 176);
            cbTargetType.Size = new Size(200, 16);
            for (int i = 0; i < 8; i++) {
                //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), );
                cbTargetType.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveTarget), i)));
            }

            lblRangeType = new Label("lblRangeType");
            lblRangeType.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblRangeType.Text = "RangeType:";
            lblRangeType.AutoSize = true;
            lblRangeType.Location = new Point(10, 196);

            cbRangeType = new ComboBox("cbRangeType");
            cbRangeType.Location = new Point(10, 208);
            cbRangeType.Size = new Size(200, 16);
            for (int i = 0; i < 10; i++) {
                //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "j");
                cbRangeType.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveRange), i)));
            }

            lblRange = new Label("lblRange");
            lblRange.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblRange.Text = "Range: >=0";
            lblRange.AutoSize = true;
            lblRange.Location = new Point(10, 228);

            nudRange = new NumericUpDown("nudRange");
            nudRange.Size = new Size(200, 16);
            nudRange.Location = new Point(10, 240);
            nudRange.Minimum = 0;
            nudRange.Maximum = Int32.MaxValue;

            lblKeyItem = new Label("lblKeyItem");
            lblKeyItem.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblKeyItem.Text = "KeyItem:";
            lblKeyItem.AutoSize = true;
            lblKeyItem.Location = new Point(10, 260);

            nudKeyItem = new NumericUpDown("nudKeyItem");
            nudKeyItem.Size = new Size(100, 16);
            nudKeyItem.Location = new Point(10, 272);
            nudKeyItem.Minimum = 0;
            nudKeyItem.Maximum = MaxInfo.MaxItems;

            lblData1 = new Label("lblData1");
            lblData1.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData1.Text = "Data1:";
            lblData1.AutoSize = true;
            lblData1.Location = new Point(220, 4);

            nudData1 = new NumericUpDown("nudData1");
            nudData1.Size = new Size(100, 16);
            nudData1.Location = new Point(220, 16);
            nudData1.Minimum = Int32.MinValue;
            nudData1.Maximum = Int32.MaxValue;

            lblData2 = new Label("lblData2");
            lblData2.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData2.Text = "Data2:";
            lblData2.AutoSize = true;
            lblData2.Location = new Point(220, 36);

            nudData2 = new NumericUpDown("nudData2");
            nudData2.Size = new Size(100, 16);
            nudData2.Location = new Point(220, 48);
            nudData2.Minimum = Int32.MinValue;
            nudData2.Maximum = Int32.MaxValue;

            lblData3 = new Label("lblData3");
            lblData3.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblData3.Text = "Data3:";
            lblData3.AutoSize = true;
            lblData3.Location = new Point(220, 68);

            nudData3 = new NumericUpDown("nudData3");
            nudData3.Size = new Size(100, 16);
            nudData3.Location = new Point(220, 80);
            nudData3.Minimum = Int32.MinValue;
            nudData3.Maximum = Int32.MaxValue;

            lblAccuracy = new Label("lblAccuracy");
            lblAccuracy.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAccuracy.Text = "Accuracy: >=-1";
            lblAccuracy.AutoSize = true;
            lblAccuracy.Location = new Point(220, 100);

            nudAccuracy = new NumericUpDown("nudAccuracy");
            nudAccuracy.Size = new Size(100, 16);
            nudAccuracy.Location = new Point(220, 112);
            nudAccuracy.Minimum = -1;
            nudAccuracy.Maximum = Int32.MaxValue;

            lblHitTime = new Label("lblHitTime");
            lblHitTime.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblHitTime.Text = "HitTime: >= 1";
            lblHitTime.AutoSize = true;
            lblHitTime.Location = new Point(220, 132);

            nudHitTime = new NumericUpDown("nudHitTime");
            nudHitTime.Size = new Size(100, 16);
            nudHitTime.Location = new Point(220, 144);
            nudHitTime.Minimum = 1;
            nudHitTime.Maximum = Int32.MaxValue;

            lblExtraEffectData1 = new Label("lblExtraEffectData1");
            lblExtraEffectData1.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblExtraEffectData1.Text = "Effect1:";
            lblExtraEffectData1.AutoSize = true;
            lblExtraEffectData1.Location = new Point(220, 164);

            nudExtraEffectData1 = new NumericUpDown("nudExtraEffectData1");
            nudExtraEffectData1.Size = new Size(100, 16);
            nudExtraEffectData1.Location = new Point(220, 176);
            nudExtraEffectData1.Minimum = Int32.MinValue;
            nudExtraEffectData1.Maximum = Int32.MaxValue;

            lblExtraEffectData2 = new Label("lblExtraEffectData2");
            lblExtraEffectData2.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblExtraEffectData2.Text = "Effect2:";
            lblExtraEffectData2.AutoSize = true;
            lblExtraEffectData2.Location = new Point(220, 196);

            nudExtraEffectData2 = new NumericUpDown("nudExtraEffectData2");
            nudExtraEffectData2.Size = new Size(100, 16);
            nudExtraEffectData2.Location = new Point(220, 208);
            nudExtraEffectData2.Minimum = Int32.MinValue;
            nudExtraEffectData2.Maximum = Int32.MaxValue;

            lblExtraEffectData3 = new Label("lblExtraEffectData3");
            lblExtraEffectData3.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblExtraEffectData3.Text = "Effect3:";
            lblExtraEffectData3.AutoSize = true;
            lblExtraEffectData3.Location = new Point(220, 228);

            nudExtraEffectData3 = new NumericUpDown("nudExtraEffectData3");
            nudExtraEffectData3.Size = new Size(100, 16);
            nudExtraEffectData3.Location = new Point(220, 240);
            nudExtraEffectData3.Minimum = Int32.MinValue;
            nudExtraEffectData3.Maximum = Int32.MaxValue;

            chkPerPlayer = new CheckBox("chkPerPlayer");
            chkPerPlayer.Location = new Point(220, 260);
            chkPerPlayer.Size = new System.Drawing.Size(95, 17);
            chkPerPlayer.BackColor = Color.Transparent;
            chkPerPlayer.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkPerPlayer.Text = "PerPlayer";

            chkHitFreeze = new CheckBox("chkHitFreeze");
            chkHitFreeze.Location = new Point(220, 280);
            chkHitFreeze.Size = new System.Drawing.Size(95, 17);
            chkHitFreeze.BackColor = Color.Transparent;
            chkHitFreeze.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            chkHitFreeze.Text = "HitFreeze";

            lblSound = new Label("lblSound");
            lblSound.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblSound.Text = "Sound:";
            lblSound.AutoSize = true;
            lblSound.Location = new Point(340, 4);

            nudSound = new NumericUpDown("nudSound");
            nudSound.Size = new Size(100, 16);
            nudSound.Location = new Point(340, 16);
            nudSound.Minimum = 0;
            nudSound.Maximum = Int32.MaxValue;
            nudSound.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudSound_ValueChanged);

            btnAttackerAnim = new Button("btnAttackerAnim");
            btnAttackerAnim.Location = new Point(340, 36);
            btnAttackerAnim.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnAttackerAnim.Size = new System.Drawing.Size(64, 16);
            btnAttackerAnim.Text = "Attacker";
            btnAttackerAnim.Click += new EventHandler<MouseButtonEventArgs>(btnAttackerAnim_Click);

            btnTravelingAnim = new Button("btnTravelingAnim");
            btnTravelingAnim.Location = new Point(420, 36);
            btnTravelingAnim.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnTravelingAnim.Size = new System.Drawing.Size(64, 16);
            btnTravelingAnim.Text = "Traveling";
            btnTravelingAnim.Click += new EventHandler<MouseButtonEventArgs>(btnTravelingAnim_Click);

            btnDefenderAnim = new Button("btnDefenderAnim");
            btnDefenderAnim.Location = new Point(500, 36);
            btnDefenderAnim.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            btnDefenderAnim.Size = new System.Drawing.Size(64, 16);
            btnDefenderAnim.Text = "Defender";
            btnDefenderAnim.Click += new EventHandler<MouseButtonEventArgs>(btnDefenderAnim_Click);

            lblAttackerAnimIndex = new Label("lblAttackerAnimIndex");
            lblAttackerAnimIndex.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAttackerAnimIndex.Text = "Animation:";
            lblAttackerAnimIndex.AutoSize = true;
            lblAttackerAnimIndex.Location = new Point(0, 10);

            nudAttackerAnimIndex = new NumericUpDown("nudAttackerAnimIndex");
            nudAttackerAnimIndex.Size = new Size(100, 16);
            nudAttackerAnimIndex.Location = new Point(0, 22);
            nudAttackerAnimIndex.Minimum = Int32.MinValue;
            nudAttackerAnimIndex.Maximum = Int32.MaxValue;
            nudAttackerAnimIndex.ValueChanged += new EventHandler<ValueChangedEventArgs>(nudAttackerAnimIndex_ValueChanged);

            lblAttackerAnimTime = new Label("lblAttackerAnimTime");
            lblAttackerAnimTime.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAttackerAnimTime.Text = "FrameTime: (1-1000)";
            lblAttackerAnimTime.AutoSize = true;
            lblAttackerAnimTime.Location = new Point(0, 42);

            nudAttackerAnimTime = new NumericUpDown("nudAttackerAnimTime");
            nudAttackerAnimTime.Size = new Size(100, 16);
            nudAttackerAnimTime.Location = new Point(0, 54);
            nudAttackerAnimTime.Minimum = 1;
            nudAttackerAnimTime.Maximum = 1000;

            lblAttackerAnimCycle = new Label("lblAttackerAnimCycle");
            lblAttackerAnimCycle.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblAttackerAnimCycle.Text = "Cycles: (1-10)";
            lblAttackerAnimCycle.AutoSize = true;
            lblAttackerAnimCycle.Location = new Point(0, 74);

            nudAttackerAnimCycle = new NumericUpDown("nudAttackerAnimCycle");
            nudAttackerAnimCycle.Size = new Size(100, 16);
            nudAttackerAnimCycle.Location = new Point(0, 86);
            nudAttackerAnimCycle.Minimum = 1;
            nudAttackerAnimCycle.Maximum = 10;

            lblTravelingAnimType = new Label("lblTravelingAnimType");
            lblTravelingAnimType.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblTravelingAnimType.Text = "Anim Type:";
            lblTravelingAnimType.AutoSize = true;
            lblTravelingAnimType.Location = new Point(0, 10);

            cbTravelingAnimType = new ComboBox("cbTravelingAnimType");
            cbTravelingAnimType.Location = new Point(0, 22);
            cbTravelingAnimType.Size = new Size(200, 16);
            for (int i = 0; i < 8; i++) {
                //lbiItem = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "j");
                cbTravelingAnimType.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.MoveAnimationType), i)));
            }

            lblTravelingAnimIndex = new Label("lblTravelingAnimIndex");
            lblTravelingAnimIndex.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblTravelingAnimIndex.Text = "Animation:";
            lblTravelingAnimIndex.AutoSize = true;
            lblTravelingAnimIndex.Location = new Point(0, 42);

            nudTravelingAnimIndex = new NumericUpDown("nudTravelingAnimIndex");
            nudTravelingAnimIndex.Size = new Size(100, 16);
            nudTravelingAnimIndex.Location = new Point(0, 54);
            nudTravelingAnimIndex.Minimum = Int32.MinValue;
            nudTravelingAnimIndex.Maximum = Int32.MaxValue;
            nudTravelingAnimIndex.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudTravelingAnimIndex_ValueChanged);

            lblTravelingAnimTime = new Label("lblTravelingAnimTime");
            lblTravelingAnimTime.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblTravelingAnimTime.Text = "FrameTime: (1-1000)";
            lblTravelingAnimTime.AutoSize = true;
            lblTravelingAnimTime.Location = new Point(0, 74);

            nudTravelingAnimTime = new NumericUpDown("nudTravelingAnimTime");
            nudTravelingAnimTime.Size = new Size(100, 16);
            nudTravelingAnimTime.Location = new Point(0, 86);
            nudTravelingAnimTime.Minimum = 1;
            nudTravelingAnimTime.Maximum = 1000;

            lblTravelingAnimCycle = new Label("lblTravelingAnimCycle");
            lblTravelingAnimCycle.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblTravelingAnimCycle.Text = "Cycles: (1-10)";
            lblTravelingAnimCycle.AutoSize = true;
            lblTravelingAnimCycle.Location = new Point(0, 106);

            nudTravelingAnimCycle = new NumericUpDown("nudTravelingAnimCycle");
            nudTravelingAnimCycle.Size = new Size(100, 16);
            nudTravelingAnimCycle.Location = new Point(0, 118);
            nudTravelingAnimCycle.Minimum = 1;
            nudTravelingAnimCycle.Maximum = 10;

            lblDefenderAnimIndex = new Label("lblDefenderAnimIndex");
            lblDefenderAnimIndex.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblDefenderAnimIndex.Text = "Animation:";
            lblDefenderAnimIndex.AutoSize = true;
            lblDefenderAnimIndex.Location = new Point(0, 10);

            nudDefenderAnimIndex = new NumericUpDown("nudDefenderAnimIndex");
            nudDefenderAnimIndex.Size = new Size(100, 16);
            nudDefenderAnimIndex.Location = new Point(0, 22);
            nudDefenderAnimIndex.Minimum = Int32.MinValue;
            nudDefenderAnimIndex.Maximum = Int32.MaxValue;
            nudDefenderAnimIndex.ValueChanged +=new EventHandler<ValueChangedEventArgs>(nudDefenderAnimIndex_ValueChanged);

            lblDefenderAnimTime = new Label("lblDefenderAnimTime");
            lblDefenderAnimTime.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblDefenderAnimTime.Text = "FrameTime: (1-1000)";
            lblDefenderAnimTime.AutoSize = true;
            lblDefenderAnimTime.Location = new Point(0, 42);

            nudDefenderAnimTime = new NumericUpDown("nudDefenderAnimTime");
            nudDefenderAnimTime.Size = new Size(100, 16);
            nudDefenderAnimTime.Location = new Point(0, 54);
            nudDefenderAnimTime.Minimum = 1;
            nudDefenderAnimTime.Maximum = 1000;

            lblDefenderAnimCycle = new Label("lblDefenderAnimCycle");
            lblDefenderAnimCycle.Font = Graphics.FontManager.LoadFont("Tahoma", 10);
            lblDefenderAnimCycle.Text = "Cycles: (1-10)";
            lblDefenderAnimCycle.AutoSize = true;
            lblDefenderAnimCycle.Location = new Point(0, 74);

            nudDefenderAnimCycle = new NumericUpDown("nudDefenderAnimCycle");
            nudDefenderAnimCycle.Size = new Size(100, 16);
            nudDefenderAnimCycle.Location = new Point(0, 86);
            nudDefenderAnimCycle.Minimum = 1;
            nudDefenderAnimCycle.Maximum = 10;

            btnPreview = new Button("btnPreview");
            btnPreview.Location = new Point(220, 300);
            btnPreview.Font = Graphics.FontManager.LoadFont("tahoma", 20);
            btnPreview.Size = new System.Drawing.Size(96, 32);
            btnPreview.Visible = true;
            btnPreview.Text = "Preview";
            btnPreview.Click += new EventHandler<MouseButtonEventArgs>(btnPreview_Click);

            picPreview = new PictureBox("picPreview");
            picPreview.Size = new Size(196, 128);
            picPreview.BackColor = Color.Transparent;
            picPreview.Location = new Point(340, 200);
            picPreview.Image = new SdlDotNet.Graphics.Surface(196, 128);

            tmrPreview = new Timer("tmrPreview");
            tmrPreview.Elapsed += new EventHandler(tmrPreview_Elapsed);

            //moveAnim = new Graphics.Renderers.Moves.FixedMoveAnimation(0, 0);

            //this.AddWidget(lbxItems);
            pnlMoveList.AddWidget(lbxMoveList);
            pnlMoveList.AddWidget(btnBack);
            pnlMoveList.AddWidget(btnForward);
            pnlMoveList.AddWidget(btnEdit);
            pnlMoveList.AddWidget(btnCancel);

            pnlMoveEditor.AddWidget(lblName);
            pnlMoveEditor.AddWidget(txtName);
            pnlMoveEditor.AddWidget(lblMaxPP);
            pnlMoveEditor.AddWidget(nudMaxPP);
            pnlMoveEditor.AddWidget(lblEffectType);
            pnlMoveEditor.AddWidget(cbEffectType);
            pnlMoveEditor.AddWidget(lblElement);
            pnlMoveEditor.AddWidget(cbElement);
            pnlMoveEditor.AddWidget(lblMoveCategory);
            pnlMoveEditor.AddWidget(cbMoveCategory);
            pnlMoveEditor.AddWidget(lblTargetType);
            pnlMoveEditor.AddWidget(cbTargetType);
            pnlMoveEditor.AddWidget(lblRangeType);
            pnlMoveEditor.AddWidget(cbRangeType);
            pnlMoveEditor.AddWidget(lblRange);
            pnlMoveEditor.AddWidget(nudRange);
            pnlMoveEditor.AddWidget(lblKeyItem);
            pnlMoveEditor.AddWidget(nudKeyItem);

            pnlMoveEditor.AddWidget(lblData1);
            pnlMoveEditor.AddWidget(nudData1);
            pnlMoveEditor.AddWidget(lblData2);
            pnlMoveEditor.AddWidget(nudData2);
            pnlMoveEditor.AddWidget(lblData3);
            pnlMoveEditor.AddWidget(nudData3);
            pnlMoveEditor.AddWidget(lblAccuracy);
            pnlMoveEditor.AddWidget(nudAccuracy);
            pnlMoveEditor.AddWidget(lblHitTime);
            pnlMoveEditor.AddWidget(nudHitTime);
            pnlMoveEditor.AddWidget(lblExtraEffectData1);
            pnlMoveEditor.AddWidget(nudExtraEffectData1);
            pnlMoveEditor.AddWidget(lblExtraEffectData2);
            pnlMoveEditor.AddWidget(nudExtraEffectData2);
            pnlMoveEditor.AddWidget(lblExtraEffectData3);
            pnlMoveEditor.AddWidget(nudExtraEffectData3);
            pnlMoveEditor.AddWidget(chkPerPlayer);
            pnlMoveEditor.AddWidget(chkHitFreeze);

            pnlMoveEditor.AddWidget(lblSound);
            pnlMoveEditor.AddWidget(nudSound);

            pnlMoveEditor.AddWidget(btnAttackerAnim);
            pnlMoveEditor.AddWidget(btnTravelingAnim);
            pnlMoveEditor.AddWidget(btnDefenderAnim);

            pnlAttackerAnim.AddWidget(lblAttackerAnimIndex);
            pnlAttackerAnim.AddWidget(nudAttackerAnimIndex);
            pnlAttackerAnim.AddWidget(lblAttackerAnimTime);
            pnlAttackerAnim.AddWidget(nudAttackerAnimTime);
            pnlAttackerAnim.AddWidget(lblAttackerAnimCycle);
            pnlAttackerAnim.AddWidget(nudAttackerAnimCycle);

            pnlTravelingAnim.AddWidget(lblTravelingAnimType);
            pnlTravelingAnim.AddWidget(cbTravelingAnimType);
            pnlTravelingAnim.AddWidget(lblTravelingAnimIndex);
            pnlTravelingAnim.AddWidget(nudTravelingAnimIndex);
            pnlTravelingAnim.AddWidget(lblTravelingAnimTime);
            pnlTravelingAnim.AddWidget(nudTravelingAnimTime);
            pnlTravelingAnim.AddWidget(lblTravelingAnimCycle);
            pnlTravelingAnim.AddWidget(nudTravelingAnimCycle);

            pnlDefenderAnim.AddWidget(lblDefenderAnimIndex);
            pnlDefenderAnim.AddWidget(nudDefenderAnimIndex);
            pnlDefenderAnim.AddWidget(lblDefenderAnimTime);
            pnlDefenderAnim.AddWidget(nudDefenderAnimTime);
            pnlDefenderAnim.AddWidget(lblDefenderAnimCycle);
            pnlDefenderAnim.AddWidget(nudDefenderAnimCycle);

            pnlMoveEditor.AddWidget(pnlAttackerAnim);
            pnlMoveEditor.AddWidget(pnlTravelingAnim);
            pnlMoveEditor.AddWidget(pnlDefenderAnim);

            pnlMoveEditor.AddWidget(btnPreview);
            pnlMoveEditor.AddWidget(picPreview);
            pnlMoveEditor.AddWidget(tmrPreview);

            pnlMoveEditor.AddWidget(btnEditorCancel);
            pnlMoveEditor.AddWidget(btnEditorOK);

            this.AddWidget(pnlMoveList);
            this.AddWidget(pnlMoveEditor);

            //this.LoadComplete();
        }
示例#54
0
        void btnAddSMap_Click(object sender, MouseButtonEventArgs e)
        {
            if (MapIndex(nudMapNum.Value) > -1)
            {
                dungeon.StandardMaps.RemoveAt(MapIndex(nudMapNum.Value));
                lbxDungeonSMaps.Items.Clear();
                for (int maps = 0; maps < dungeon.StandardMaps.Count; maps++)
                {
                    string mapText2;
                    if (dungeon.StandardMaps[maps].IsBadGoalMap)
                    {
                        mapText2 = (maps + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(dungeon.StandardMaps[maps].Difficulty) + "] Map #" + dungeon.StandardMaps[maps].MapNum;
                    }
                    else
                    {
                        mapText2 = (maps + 1) + ": [" + Missions.MissionManager.DifficultyToString(dungeon.StandardMaps[maps].Difficulty) + "] Map #" + dungeon.StandardMaps[maps].MapNum;
                    }
                    ListBoxTextItem lbiMap2 = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText2);
                    lbxDungeonSMaps.Items.Add(lbiMap2);
                }
            }

            Logic.Editors.Dungeons.EditableStandardDungeonMap map = new Logic.Editors.Dungeons.EditableStandardDungeonMap();
            map.MapNum = nudMapNum.Value;
            map.Difficulty = (Enums.JobDifficulty)nudSMapDifficulty.Value;
            map.IsBadGoalMap = chkSMapBad.Checked;

            dungeon.StandardMaps.Add(map);

            string mapText;
            if (map.IsBadGoalMap) {
                mapText = (lbxDungeonSMaps.Items.Count + 1) + ": (Boss)[" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Map #" + map.MapNum;
            } else {
                mapText = (lbxDungeonSMaps.Items.Count + 1) + ": [" + Missions.MissionManager.DifficultyToString(map.Difficulty) + "] Map #" + map.MapNum;
            }
            ListBoxTextItem lbiMap = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), mapText);
            lbxDungeonSMaps.Items.Add(lbiMap);
        }
示例#55
0
        public void SingleItemVisibleTest()
        {
            {
                ListBox containerListBox = new ListBox(new RectangleDouble(0, 0, 100, 100));
                ListBoxTextItem itemToAddToList = new ListBoxTextItem("test Item", "test data for item");
                itemToAddToList.Name = "list item";
                containerListBox.AddChild(itemToAddToList);
                containerListBox.DoubleBuffer = true;
                containerListBox.BackBuffer.NewGraphics2D().Clear(RGBA_Bytes.White);
                containerListBox.OnDraw(containerListBox.BackBuffer.NewGraphics2D());

                ImageBuffer textImage = new ImageBuffer(80, 16, 32, new BlenderBGRA());
                textImage.NewGraphics2D().Clear(RGBA_Bytes.White);
                textImage.NewGraphics2D().DrawString("test Item", 1, 1);

                OutputImage(containerListBox.BackBuffer, "test.tga");
                OutputImage(textImage, "control.tga");

                double maxError = 20000000;
                Vector2 bestPosition;
                double leastSquares;
                containerListBox.BackBuffer.FindLeastSquaresMatch(textImage, out bestPosition, out leastSquares, maxError);

                Assert.IsTrue(leastSquares < maxError, "The list box need to be showing the item we added to it.");
            }

            {
                GuiWidget container = new GuiWidget(202, 302);
                container.DoubleBuffer = true;
                container.NewGraphics2D().Clear(RGBA_Bytes.White);
                FlowLayoutWidget leftToRightLayout = new FlowLayoutWidget();
                leftToRightLayout.AnchorAll();
                {
                    {
                        ListBox listBox = new ListBox(new RectangleDouble(0, 0, 200, 300));
                        //listBox.BackgroundColor = RGBA_Bytes.Red;
                        listBox.Name = "listBox";
                        listBox.VAnchor = UI.VAnchor.ParentTop;
                        listBox.ScrollArea.Margin = new BorderDouble(15);
                        leftToRightLayout.AddChild(listBox);

                        for (int i = 0; i < 1; i++)
                        {
                            ListBoxTextItem newItem = new ListBoxTextItem("hand" + i.ToString() + ".stl", "c:\\development\\hand" + i.ToString() + ".stl");
                            newItem.Name = "ListBoxItem" + i.ToString();
                            listBox.AddChild(newItem);
                        }
                    }
                }

                container.AddChild(leftToRightLayout);
                container.OnDraw(container.NewGraphics2D());

                ImageBuffer textImage = new ImageBuffer(80, 16, 32, new BlenderBGRA());
                textImage.NewGraphics2D().Clear(RGBA_Bytes.White);
                textImage.NewGraphics2D().DrawString("hand0.stl", 1, 1);

                OutputImage(container.BackBuffer, "control.tga");
                OutputImage(textImage, "test.tga");

                double maxError = 1000000;
                Vector2 bestPosition;
                double leastSquares;
                container.BackBuffer.FindLeastSquaresMatch(textImage, out bestPosition, out leastSquares, maxError);

                Assert.IsTrue(leastSquares < maxError, "The list box need to be showing the item we added to it.");
            }
        }
示例#56
0
        public void LoadAdventureLogFromPacket(string[] parse)
        {
            int n;

            //General
            lblPlayerName.Text = "Name: " + Players.PlayerManager.MyPlayer.Name;
            lblRank.Text = "Rank: " + Missions.MissionManager.RankToString(Players.PlayerManager.MyPlayer.ExplorerRank) + " Rank (" + Players.PlayerManager.MyPlayer.MissionExp + " Pts.)";
            lblPlayTime.Text = "Play Time: " + (parse[1].ToInt() / 60).ToString().PadLeft(2, '0') + " : " + (parse[1].ToInt() % 60).ToString().PadLeft(2, '0');
            lblDungeonsCompleted.Text = "Dungeon Victories: " + parse[2];
            lblMissionsCompleted.Text = "Missions Completed: " + parse[3];
            //lblRescuesCompleted.Text = "Successful Rescues: " + parse[4];

            n = 5;
            //Dungeons
            for (int i = 0; i < parse[n].ToInt(); i++)
            {
                ListBoxTextItem item = new ListBoxTextItem(FontManager.LoadFont("PMU", 16), parse[n + i*2 + 1]);
                if (parse[n + i*2 + 2].ToInt() > 0)
                {
                    item.ForeColor = Color.Cyan;
                }
                else
                {
                    item.ForeColor = Color.Red;
                }
                lbxDungeonList.Items.Add(item);

            }

            n += lbxDungeonList.Items.Count * 2;

            for (int i = 1; i <= MaxInfo.TotalPokemon; i++)
            {
                ListBoxTextItem item;

                if (parse[n + 1].ToInt() <= 0)
                {
                    item = new ListBoxTextItem(FontManager.LoadFont("PMU", 16), "#" + i + ": -----");
                    item.ForeColor = Color.Gray;
                }
                else
                {
                    item = new ListBoxTextItem(FontManager.LoadFont("PMU", 16), "#" + i + ": " + Pokedex.PokemonHelper.Pokemon[i-1].Name);
                    if (parse[n + 1].ToInt() == 1)
                    {
                        item.ForeColor = Color.Red;
                    }
                    else if (parse[n + 1].ToInt() == 2)
                    {
                        item.ForeColor = Color.Cyan;
                    }
                    else
                    {
                        item.ForeColor = Color.Black;
                    }
                }

                lbxPokedex.Items.Add(item);
                n++;
            }

            SwitchToPage(0);
            loaded = true;
        }
示例#57
0
        public winAdminPanel()
            : base("winAdminPanel")
        {
            //this.Location = Graphics.DrawingSupport.GetCenter(this.Size);
            this.Windowed             = true;
            this.ShowInWindowSwitcher = false;
            this.Size        = new System.Drawing.Size(354, 220);
            this.Location    = new System.Drawing.Point(210, WindowSwitcher.GameWindow.ActiveTeam.Y + WindowSwitcher.GameWindow.ActiveTeam.Height + 0);
            this.AlwaysOnTop = true;
            this.TitleBar.CloseButton.Visible = true;
            this.TitleBar.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            this.TitleBar.Text = "Administration Panel";

            pnlWeather           = new Panel("pnlWeather");
            pnlWeather.Size      = new System.Drawing.Size(354, 220);
            pnlWeather.Location  = new Point(0, 34);
            pnlWeather.BackColor = Color.White;
            pnlWeather.Visible   = true;

            pnlPlayerInfo           = new Panel("pnlPlayerInfo");
            pnlPlayerInfo.Size      = new System.Drawing.Size(410, 500);
            pnlPlayerInfo.Location  = new Point(0, 34);
            pnlPlayerInfo.BackColor = Color.White;
            pnlPlayerInfo.Visible   = false;

            pnlCommands           = new Panel("pnlCommands");
            pnlCommands.Size      = new System.Drawing.Size(410, 348);
            pnlCommands.Location  = new Point(0, 34);
            pnlCommands.BackColor = Color.White;
            pnlCommands.Visible   = false;

            #region Widgets

            btnWeather          = new Button("btnWeather");
            btnWeather.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnWeather.Location = new Point(27, 0);
            btnWeather.Size     = new System.Drawing.Size(100, 32);
            btnWeather.Text     = "Weather";
            btnWeather.Selected = true;
            btnWeather.Click   += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnWeather_Click);

            btnPlayerInfo          = new Button("btnPlayerInfo");
            btnPlayerInfo.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnPlayerInfo.Location = new Point(127, 0);
            btnPlayerInfo.Size     = new System.Drawing.Size(100, 32);
            btnPlayerInfo.Text     = "Player Info";
            btnPlayerInfo.Selected = false;
            btnPlayerInfo.Click   += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnPlayerInfo_Click);

            btnCommands          = new Button("btnCommands");
            btnCommands.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnCommands.Location = new Point(227, 0);
            btnCommands.Size     = new System.Drawing.Size(100, 32);
            btnCommands.Text     = "Commands";
            btnCommands.Selected = false;
            btnCommands.Click   += new EventHandler <SdlDotNet.Widgets.MouseButtonEventArgs>(btnCommands_Click);



            cbWeather           = new ComboBox("cbWeather");
            cbWeather.Location  = new Point(110, 20);
            cbWeather.Size      = new System.Drawing.Size(134, 16);
            cbWeather.BackColor = Color.DarkGray;
            for (int i = 0; i < 13; i++)
            {
                ListBoxTextItem item = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.Weather), i));
                cbWeather.Items.Add(item);
            }
            cbWeather.SelectItem(0);

            btnApplyWeather          = new Button("btnApplyWeather");
            btnApplyWeather.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnApplyWeather.Location = new Point(110, 54);
            btnApplyWeather.Size     = new System.Drawing.Size(134, 32);
            btnApplyWeather.Visible  = true;
            btnApplyWeather.Text     = "Apply";
            btnApplyWeather.Click   += new EventHandler <MouseButtonEventArgs>(btnApplyWeather_Click);



            btnBanish          = new Button("btnBanish");
            btnBanish.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnBanish.Location = new Point(20, 20);
            btnBanish.Size     = new System.Drawing.Size(134, 32);
            btnBanish.Visible  = true;
            btnBanish.Text     = "Ban";
            btnBanish.Click   += new EventHandler <MouseButtonEventArgs>(btnBanish_Click);

            btnWarpTo          = new Button("btnWarpTo");
            btnWarpTo.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnWarpTo.Location = new Point(200, 20);
            btnWarpTo.Size     = new System.Drawing.Size(134, 32);
            btnWarpTo.Visible  = true;
            btnWarpTo.Text     = "Warp to Map";
            btnWarpTo.Click   += new EventHandler <MouseButtonEventArgs>(btnWarpTo_Click);

            btnKick          = new Button("btnKick");
            btnKick.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnKick.Location = new Point(20, 54);
            btnKick.Size     = new System.Drawing.Size(134, 32);
            btnKick.Visible  = true;
            btnKick.Text     = "Kick";
            btnKick.Click   += new EventHandler <MouseButtonEventArgs>(btnKick_Click);

            btnSetAccess          = new Button("btnSetAccess");
            btnSetAccess.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSetAccess.Location = new Point(200, 54);
            btnSetAccess.Size     = new System.Drawing.Size(134, 32);
            btnSetAccess.Visible  = true;
            btnSetAccess.Text     = "Set Access";
            btnSetAccess.Click   += new EventHandler <MouseButtonEventArgs>(btnSetAccess_Click);

            cbAccessLevel           = new ComboBox("cbAccessLevel");
            cbAccessLevel.Location  = new Point(174, 274);
            cbAccessLevel.Size      = new System.Drawing.Size(134, 18);
            cbAccessLevel.BackColor = Color.DarkGray;
            for (int i = 0; i < 7; i++)
            {
                ListBoxTextItem item = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), Enum.GetName(typeof(Enums.Rank), i));
                cbAccessLevel.Items.Add(item);
            }
            cbAccessLevel.SelectItem(0);

            btnRespawn          = new Button("btnRespawn");
            btnRespawn.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRespawn.Location = new Point(20, 88);
            btnRespawn.Size     = new System.Drawing.Size(134, 32);
            btnRespawn.Visible  = true;
            btnRespawn.Text     = "Respawn";
            btnRespawn.Click   += new EventHandler <MouseButtonEventArgs>(btnRespawn_Click);

            btnSetSprite          = new Button("btnSetSprite");
            btnSetSprite.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSetSprite.Location = new Point(200, 88);
            btnSetSprite.Size     = new System.Drawing.Size(134, 32);
            btnSetSprite.Visible  = true;
            btnSetSprite.Text     = "Set Species";
            btnSetSprite.Click   += new EventHandler <MouseButtonEventArgs>(btnSetSprite_Click);

            btnWarpMeTo          = new Button("btnWarpMeTo");
            btnWarpMeTo.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnWarpMeTo.Location = new Point(20, 122);
            btnWarpMeTo.Size     = new System.Drawing.Size(134, 32);
            btnWarpMeTo.Visible  = true;
            btnWarpMeTo.Text     = "Warp Me to";
            btnWarpMeTo.Click   += new EventHandler <MouseButtonEventArgs>(btnWarpMeTo_Click);

            btnSetPlayerSprite          = new Button("btnSetPlayerSprite");
            btnSetPlayerSprite.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSetPlayerSprite.Location = new Point(200, 122);
            btnSetPlayerSprite.Size     = new System.Drawing.Size(134, 32);
            btnSetPlayerSprite.Visible  = true;
            btnSetPlayerSprite.Text     = "Set Player Species";
            btnSetPlayerSprite.Click   += new EventHandler <MouseButtonEventArgs>(btnSetPlayerSprite_Click);

            btnWarpToMe          = new Button("btnWarpToMe");
            btnWarpToMe.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnWarpToMe.Location = new Point(110, 156);
            btnWarpToMe.Size     = new System.Drawing.Size(134, 32);
            btnWarpToMe.Visible  = true;
            btnWarpToMe.Text     = "Warp to Me";
            btnWarpToMe.Click   += new EventHandler <MouseButtonEventArgs>(btnWarpToMe_Click);

            lblPlayerName          = new Label("lblPlayerName");
            lblPlayerName.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblPlayerName.Location = new Point(20, 210);
            lblPlayerName.Size     = new System.Drawing.Size(134, 32);
            lblPlayerName.Text     = "Player Name:";
            lblPlayerName.Visible  = true;

            txtPlayerName          = new TextBox("txtPlayerName");
            txtPlayerName.Location = new Point(174, 219);
            txtPlayerName.Size     = new System.Drawing.Size(134, 18);
            txtPlayerName.Visible  = true;

            lblSpriteNumber          = new Label("lblSpriteNumber");
            lblSpriteNumber.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblSpriteNumber.Location = new Point(20, 242);
            lblSpriteNumber.Size     = new System.Drawing.Size(134, 32);
            lblSpriteNumber.Text     = "Species Number:";
            lblSpriteNumber.Visible  = true;

            txtSpriteNumber          = new TextBox("txtSpriteNumber");
            txtSpriteNumber.Location = new Point(174, 251);
            txtSpriteNumber.Size     = new System.Drawing.Size(134, 18);
            txtSpriteNumber.Visible  = true;

            lblAccessLevel          = new Label("lblAccessLevel");
            lblAccessLevel.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblAccessLevel.Location = new Point(20, 274);
            lblAccessLevel.Size     = new System.Drawing.Size(134, 32);
            lblAccessLevel.Text     = "Access Level:";
            lblAccessLevel.Visible  = true;

            //boxAccessLevel = new DropBox("boxAccessLevel");
            //boxAccessLevel.Location = new Point(174, 274);
            //boxAccessLevel.visible = false;

            lblMapNumber          = new Label("lblMapNumber");
            lblMapNumber.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            lblMapNumber.Location = new Point(20, 306);
            lblMapNumber.Size     = new System.Drawing.Size(134, 32);
            lblMapNumber.Text     = "Map Number:";
            lblMapNumber.Visible  = true;

            txtMapNumber          = new TextBox("txtMapNumber");
            txtMapNumber.Location = new Point(174, 315);
            txtMapNumber.Size     = new System.Drawing.Size(134, 18);
            txtMapNumber.Visible  = true;

            btnMapEditor          = new Button("btnMapEditor");
            btnMapEditor.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnMapEditor.Location = new Point(20, 20);
            btnMapEditor.Size     = new System.Drawing.Size(134, 32);
            btnMapEditor.Visible  = true;
            btnMapEditor.Text     = "Map Editor";
            btnMapEditor.Click   += new EventHandler <MouseButtonEventArgs>(btnMapEditor_Click);

            btnMapReport          = new Button("btnMapReport");
            btnMapReport.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnMapReport.Location = new Point(200, 20);
            btnMapReport.Size     = new System.Drawing.Size(134, 32);
            btnMapReport.Visible  = true;
            btnMapReport.Text     = "Map Report";
            btnMapReport.Click   += new EventHandler <MouseButtonEventArgs>(btnMapReport_Click);

            btnSpells          = new Button("btnSpells");
            btnSpells.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnSpells.Location = new Point(20, 54);
            btnSpells.Size     = new System.Drawing.Size(134, 32);
            btnSpells.Visible  = true;
            btnSpells.Text     = "Edit Moves";
            btnSpells.Click   += new EventHandler <MouseButtonEventArgs>(btnSpells_Click);

            btnItems          = new Button("btnItems");
            btnItems.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnItems.Location = new Point(200, 54);
            btnItems.Size     = new System.Drawing.Size(134, 32);
            btnItems.Visible  = true;
            btnItems.Text     = "Edit Items";
            btnItems.Click   += new EventHandler <MouseButtonEventArgs>(btnItems_Click);

            btnShops          = new Button("btnShops");
            btnShops.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnShops.Location = new Point(20, 88);
            btnShops.Size     = new System.Drawing.Size(134, 32);
            btnShops.Visible  = true;
            btnShops.Text     = "Edit Shops";
            btnShops.Click   += new EventHandler <MouseButtonEventArgs>(btnShops_Click);

            btnEvolutions          = new Button("btnEvolutions");
            btnEvolutions.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEvolutions.Location = new Point(200, 88);
            btnEvolutions.Size     = new System.Drawing.Size(134, 32);
            btnEvolutions.Visible  = true;
            btnEvolutions.Text     = "Edit Evolutions";
            btnEvolutions.Click   += new EventHandler <MouseButtonEventArgs>(btnEvolutions_Click);

            btnStories          = new Button("btnStories");
            btnStories.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnStories.Location = new Point(20, 122);
            btnStories.Size     = new System.Drawing.Size(134, 32);
            btnStories.Visible  = true;
            btnStories.Text     = "Story Editor";
            btnStories.Click   += new EventHandler <MouseButtonEventArgs>(btnStories_Click);

            btnNPC          = new Button("btnNPC");
            btnNPC.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnNPC.Location = new Point(200, 122);
            btnNPC.Size     = new System.Drawing.Size(134, 32);
            btnNPC.Visible  = true;
            btnNPC.Text     = "NPC Editor";
            btnNPC.Click   += new EventHandler <MouseButtonEventArgs>(btnNPC_Click);

            //btnArrows = new Button("btnArrows");
            //btnArrows.Font = Graphics.FontManager.LoadFont("tahoma", 10);
            //btnArrows.Location = new Point(20, 156);
            //btnArrows.Size = new System.Drawing.Size(134, 32);
            //btnArrows.Visible = true;
            //btnArrows.Text = "Edit Arrows";
            //btnArrows.Click += new EventHandler<MouseButtonEventArgs>(btnArrows_Click);

            btnEmotion          = new Button("btnEmotion");
            btnEmotion.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnEmotion.Location = new Point(200, 156);
            btnEmotion.Size     = new System.Drawing.Size(134, 32);
            btnEmotion.Visible  = true;
            btnEmotion.Text     = "Edit Emotions";
            btnEmotion.Click   += new EventHandler <MouseButtonEventArgs>(btnEmotion_Click);

            btnRDungeons          = new Button("btnRDungeons");
            btnRDungeons.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnRDungeons.Location = new Point(20, 156);
            btnRDungeons.Size     = new System.Drawing.Size(134, 32);
            btnRDungeons.Visible  = true;
            btnRDungeons.Text     = "Edit Random Dungeons";
            btnRDungeons.Click   += new EventHandler <MouseButtonEventArgs>(btnRDungeons_Click);

            btnMissions          = new Button("btnMissions");
            btnMissions.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnMissions.Location = new Point(20, 190);
            btnMissions.Size     = new System.Drawing.Size(134, 32);
            btnMissions.Visible  = true;
            btnMissions.Text     = "Edit Missions";
            btnMissions.Click   += new EventHandler <MouseButtonEventArgs>(btnMissions_Click);

            btnDungeons          = new Button("btnDungeons");
            btnDungeons.Font     = Graphics.FontManager.LoadFont("tahoma", 10);
            btnDungeons.Location = new Point(200, 190);
            btnDungeons.Size     = new System.Drawing.Size(134, 32);
            btnDungeons.Visible  = true;
            btnDungeons.Text     = "Edit Dungeons";
            btnDungeons.Click   += new EventHandler <MouseButtonEventArgs>(btnDungeons_Click);

            #region Addwidget

            pnlWeather.AddWidget(cbWeather);
            pnlWeather.AddWidget(btnApplyWeather);
            pnlPlayerInfo.AddWidget(btnBanish);
            pnlPlayerInfo.AddWidget(btnWarpTo);
            pnlPlayerInfo.AddWidget(btnKick);
            pnlPlayerInfo.AddWidget(btnSetAccess);
            pnlPlayerInfo.AddWidget(btnRespawn);
            pnlPlayerInfo.AddWidget(btnSetSprite);
            pnlPlayerInfo.AddWidget(btnWarpMeTo);
            pnlPlayerInfo.AddWidget(btnSetPlayerSprite);
            pnlPlayerInfo.AddWidget(btnWarpToMe);
            pnlPlayerInfo.AddWidget(lblPlayerName);
            pnlPlayerInfo.AddWidget(txtPlayerName);
            pnlPlayerInfo.AddWidget(lblSpriteNumber);
            pnlPlayerInfo.AddWidget(txtSpriteNumber);
            pnlPlayerInfo.AddWidget(lblAccessLevel);
            pnlPlayerInfo.AddWidget(cbAccessLevel);
            pnlPlayerInfo.AddWidget(lblMapNumber);
            pnlPlayerInfo.AddWidget(txtMapNumber);
            pnlCommands.AddWidget(btnMapEditor);
            pnlCommands.AddWidget(btnMapReport);
            pnlCommands.AddWidget(btnSpells);
            pnlCommands.AddWidget(btnItems);
            pnlCommands.AddWidget(btnShops);
            pnlCommands.AddWidget(btnEvolutions);
            pnlCommands.AddWidget(btnStories);
            pnlCommands.AddWidget(btnNPC);
            //pnlCommands.AddWidget(btnArrows);
            pnlCommands.AddWidget(btnEmotion);
            pnlCommands.AddWidget(btnRDungeons);
            pnlCommands.AddWidget(btnMissions);
            pnlCommands.AddWidget(btnDungeons);

            this.AddWidget(pnlWeather);
            this.AddWidget(btnWeather);
            this.AddWidget(pnlPlayerInfo);
            this.AddWidget(btnPlayerInfo);
            this.AddWidget(pnlCommands);
            this.AddWidget(btnCommands);

            this.LoadComplete();
            #endregion Addwidget

            #endregion Widgets
        }
示例#58
0
        public void AddMember(string name)
        {
            Color color = Color.LightSkyBlue;
            ListBoxTextItem lbiName = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "[" + Enums.GuildRank.Member + "] " + name + " (NEW)");
            ranks.Add(Enums.GuildRank.Member);
            lbiName.ForeColor = color;
            lbxMembers.Items.Add(lbiName);

            Refresh();
        }
示例#59
0
        void LoadPartyFromPacket(string[] parse)
        {
            int count = parse[1].ToInt();

            for (int i = 0; i < count; i++) {
                ListBoxTextItem lbiName = new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), parse[i + 2]);
                lbxMembers.Items.Add(lbiName);
            }
        }
示例#60
0
 void btnRemoveItem_Click(object sender, MouseButtonEventArgs e)
 {
     if (lbxMissionRewards.SelectedIndex > -1) {
         missionPool.Rewards.RemoveAt(lbxMissionRewards.SelectedIndex);
         lbxMissionRewards.Items.Clear();
         for (int rewards = 0; rewards < missionPool.Rewards.Count; rewards++) {
             ListBoxTextItem lbiReward = new ListBoxTextItem(Logic.Graphics.FontManager.LoadFont("tahoma", 10), (rewards + 1) + ": " + Items.ItemHelper.Items[missionPool.Rewards[rewards].ItemNum].Name + " x" + missionPool.Rewards[rewards].ItemAmount + " (Tag: " + missionPool.Rewards[rewards].ItemTag + ")");
             lbxMissionRewards.Items.Add(lbiReward);
         }
     }
 }