Пример #1
0
        private void toolStripButtonDelPartType_Click(object sender, EventArgs e)
        {
            int      index        = -1;
            TreeNode selectedNode = particleEffectProperties.SelectedNode;

            // check particle types
            for (int i = 0; i < particleEffectControl.ParticleEffect.Emitter.ParticleTypes.Count; i++)
            {
                // check the root
                if (selectedNode == particleEffectProperties.Nodes[0].Nodes[0].Nodes[i + 1])
                {
                    index = i;
                    break;
                }
            }
            if (index != -1)
            {
                if (MilkshakeForm.ShowWarningQuestion("Do you really want to delete this particle type?")
                    == true)
                {
                    particleEffectControl.RemoveParticleType(index);
                    UpdateParticleEffectTree();
                }
            }
        }
Пример #2
0
 private void toolStripButtonLayerClear_Click(object sender, EventArgs e)
 {
     if (MilkshakeForm.ShowWarningQuestion("Do you really want to clear the layer?"))
     {
         int layer = SelectedLayer;
         for (int y = 0; y < TileGrid.TileRows; y++)
         {
             for (int x = 0; x < TileGrid.TileCols; x++)
             {
                 TileGrid.TileLayers[layer].Tiles[x][y].Index    = -1;
                 TileGrid.TileLayers[layer].Tiles[x][y].Rotation = 0;
                 TileGrid.TileLayers[layer].Tiles[x][y].HFlip    = false;
                 TileGrid.TileLayers[layer].Tiles[x][y].VFlip    = false;
             }
         }
     }
 }