private void SelectColor(int code) { ColorDialog dialog = new ColorDialog(); dialog.Color = TileBox.BackColor; if (dialog.ShowDialog() != DialogResult.OK) { return; } if (code == 1) { TileBox.Color1 = dialog.Color; } else if (code == 2) { TileBox.Color2 = dialog.Color; } else if (code == 3) { TileBox.Color3 = dialog.Color; } UpdateButtonColors(); TileBox.Refresh(); UpdateTilePreview(); }
private void MenuBackColor_Click(object sender, EventArgs e) { ColorDialog dialog = new ColorDialog(); dialog.Color = TileBox.BackColor; if (dialog.ShowDialog() != DialogResult.OK) { return; } TileBox.BackColor = dialog.Color; TileBox.Refresh(); UpdateTilePreview(); }
private void UpdateTileDisplay() { int count = Tileset.Count - 1; if (count < 0) { count = 0; } LblTileIndex.Text = TileIndex.ToString() + " / " + count.ToString(); if (TileIndex >= 0 && TileIndex < Tileset.Count) { TileBox.Tile = Tileset[TileIndex]; TileBox.Refresh(); UpdateTilePreview(); } }
private void BtnShiftDown_Click(object sender, EventArgs e) { TileBox.Tile.ShiftY(1); TileBox.Refresh(); UpdateTilePreview(); }
private void BtnFlipY_Click(object sender, EventArgs e) { TileBox.Tile.FlipY(); TileBox.Refresh(); UpdateTilePreview(); }
private void BtnRotate_Click(object sender, EventArgs e) { TileBox.Tile.Rotate(); TileBox.Refresh(); UpdateTilePreview(); }
private void BtnSwap_Click(object sender, EventArgs e) { TileBox.Tile.Swap(); TileBox.Refresh(); UpdateTilePreview(); }
private void BtnFill_Click(object sender, EventArgs e) { TileBox.Tile.Fill(TileBox.ColorCode); TileBox.Refresh(); UpdateTilePreview(); }
private void BtnClear_Click(object sender, EventArgs e) { TileBox.Tile.Clear(); TileBox.Refresh(); UpdateTilePreview(); }
private void MenuShowColorIndexes_Click(object sender, EventArgs e) { TileBox.ShowCodes = MenuShowColorIndexes.Checked; TileBox.Refresh(); UpdateTilePreview(); }
private void MenuShowGrid_Click(object sender, EventArgs e) { TileBox.ShowGrid = MenuShowGrid.Checked; TileBox.Refresh(); UpdateTilePreview(); }