示例#1
0
        private void FindItemButton_Click(object sender, EventArgs e)
        {
            FindItemForm form = new FindItemForm();

            form.MainForm = this;
            form.Show(this);
        }
示例#2
0
        private void EditFindItemMenuItem_Click(object sender, EventArgs e)
        {
            FindItemForm form = new FindItemForm();

            form.MainForm = this;
            form.Show(this);
        }
示例#3
0
        public static void JumpToBrush()
        {
            FindItemForm form = new FindItemForm();

            form.Text = "Jump to Brush";
            List <Brush> listBrush = new List <Brush>();

            foreach (TileSet tileSet in Materials.getInstance().getTileSetList())
            {
                TilesetCategory terrainTC = tileSet.getCategory2(TilesetCategoryType.TILESET_TERRAIN);
                if (terrainTC != null)
                {
                    listBrush.AddRange(terrainTC.brushlist);
                }
                TilesetCategory doodadTC = tileSet.getCategory2(TilesetCategoryType.TILESET_DOODAD);
                if (doodadTC != null)
                {
                    listBrush.AddRange(doodadTC.brushlist);
                }

                TilesetCategory itemTc = tileSet.getCategory2(TilesetCategoryType.TILESET_ITEM);
                if (itemTc != null)
                {
                    listBrush.AddRange(itemTc.brushlist);
                }

                TilesetCategory creatureTc = tileSet.getCategory2(TilesetCategoryType.TILESET_CREATURE);
                if (creatureTc != null)
                {
                    listBrush.AddRange(creatureTc.brushlist);
                }
            }
            form.setBrushList(listBrush);
            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                Global.mapCanvas.SelectBrush(form.getSelectedBrush());
            }
        }
示例#4
0
        public static void JumpToItem()
        {
            FindItemForm form = new FindItemForm();

            form.Text = "Jump to Item";
            List <Brush> listBrush = new List <Brush>();

            foreach (TileSet tileSet in Materials.getInstance().getTileSetList())
            {
                TilesetCategory rawTc = tileSet.getCategory2(TilesetCategoryType.TILESET_RAW);
                if (rawTc != null)
                {
                    listBrush.AddRange(rawTc.brushlist);
                }
            }
            form.setBrushList(listBrush);
            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                EditorPalette.SelectBrush(form.getSelectedBrush(), PaletteType.RAW);
            }
        }