private void importImageAsTile8bitToolStripMenuItem_Click(object sender, EventArgs e) { using (OpenFileDialog dlg = new OpenFileDialog()) { dlg.Title = "Import Image As Tile"; dlg.DefaultExt = "dds"; dlg.Filter = "DDS Image Files (*.dds)|*.dds|All files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { Cursor saveCursor = this.Cursor; this.Cursor = Cursors.WaitCursor; TileMaker tm = new TileMaker(dlg.FileName, 4); dds = new DDSFile32(tm.Width, tm.Height); tm.FillTile(dds); currentTileName = dlg.FileName; // grab colors from tilemaker for (int i = 0; i < 4; i++) { fileColors[i] = baseColors[i] = tm.Colors[i].HSVColor; } UpdateButtons(); ColorizeTile(); this.Cursor = saveCursor; } } }
private void importColorsFromImageToolStripMenuItem_Click(object sender, EventArgs e) { using (OpenFileDialog dlg = new OpenFileDialog()) { dlg.Title = "Import Colors From Image"; dlg.DefaultExt = "dds"; dlg.Filter = "DDS Image Files (*.dds)|*.dds|All files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { Cursor saveCursor = this.Cursor; this.Cursor = Cursors.WaitCursor; TileMaker tm = new TileMaker(dlg.FileName, 4); // grab colors from tilemaker ResetAdjust(); for (int i = 0; i < 4; i++) { fileColors[i] = baseColors[i] = tm.Colors[i].HSVColor; } UpdateButtons(); ColorizeTile(); this.Cursor = saveCursor; } } }