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()); } }
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); } }