public TileOptions(Level aLevel) { mLevel = aLevel; InitializeComponent(); mCurrentSel = colorSelection1; }
public TileOptions() { mLevel = new Level(); InitializeComponent(); mCurrentSel = colorSelection1; }
private void ColorSelected(object sender, EventArgs e) { mCurrentSel.Selected = false; mCurrentSel = sender as ColorSelection; switch (mOption) { case ColorOption.Block: if (mSelection != null) foreach (GridEntry entry in mSelection) entry.BlockPaletteIndex = mCurrentSel.PaletteIndex; blockColor.PaletteIndex = mCurrentSel.PaletteIndex; blockGraphic1.BlockColor = mLevel.Palette[mCurrentSel.PaletteIndex]; blockColor.Invalidate(); if (EntryUpdated != null) EntryUpdated(); break; case ColorOption.Tile: if (mSelection != null) foreach (GridEntry entry in mSelection) entry.TilePaletteIndex = mCurrentSel.PaletteIndex; tileColor.PaletteIndex = mCurrentSel.PaletteIndex; blockGraphic1.TileColor = mLevel.Palette[mCurrentSel.PaletteIndex]; tileColor.Invalidate(); if (EntryUpdated != null) EntryUpdated(); break; default: break; } }