Ejemplo n.º 1
0
 // Edit texture set
 private void edittextureset_Click(object sender, EventArgs e)
 {
     // Texture Set selected?
     if (listtextures.SelectedItems.Count > 0)
     {
         DefinedTextureSet s    = (listtextures.SelectedItems[0].Tag as DefinedTextureSet);
         TextureSetForm    form = new TextureSetForm();
         form.Setup(s);
         form.ShowDialog(this);
         listtextures.SelectedItems[0].Text = s.Name;
         listtextures.Sort();
         reloadresources = true;
     }
 }
Ejemplo n.º 2
0
        // Make new texture set
        private void addtextureset_Click(object sender, EventArgs e)
        {
            DefinedTextureSet s    = new DefinedTextureSet("New Texture Set");
            TextureSetForm    form = new TextureSetForm();

            form.Setup(s);
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                // Add to texture sets
                configinfo.TextureSets.Add(s);
                ListViewItem item = listtextures.Items.Add(s.Name);
                item.Tag        = s;
                item.ImageIndex = 0;
                listtextures.Sort();
                reloadresources = true;
            }
        }