Ejemplo n.º 1
0
        void mSavePaletteButton_Click(object sender, EventArgs e)
        {
            SaveFileDialog d = new SaveFileDialog();

            d.Filter           = "Terrain Texture Set (*" + SimTerrainType.mTextureSetExtention + ")|*" + SimTerrainType.mTextureSetExtention;
            d.InitialDirectory = CoreGlobals.getWorkPaths().mTerrainTexturesPath;
            if (d.ShowDialog() == DialogResult.OK)
            {
                string fname = d.FileName;
                if (!Path.HasExtension(fname))
                {
                    fname += SimTerrainType.mTextureSetExtention;
                }

                List <string> texSet = SimTerrainType.getTypeNamesOfActiveSet();
                SimTerrainType.writeTerrainPalette(fname, texSet);
            }
        }