//////////////////////////////////////////////////////////////////////////
        public Sprite(WGame Game, SpriteOptimizer optimizer)
        {
            this.Game      = Game;
            this.Optimizer = optimizer;

            this.IsChanged = false;
        }
Exemple #2
0
        //////////////////////////////////////////////////////////////////////////
        private void OnProcess(object sender, EventArgs e)
        {
            string msg;

            msg  = "All sprites in the project will be scanned and empty borders (i.e. pixels with zero alpha) will be cut from images.\n";
            msg += "BACKUP YOUR PROJECT FIRST!\n\n";
            msg += "Continue?";

            if (MessageBox.Show(msg, this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                SpriteOptimizer opt = new SpriteOptimizer(TbProject.Text, this);
                opt.Process();
            }
        }
 //////////////////////////////////////////////////////////////////////////
 public ImageCropper(SpriteOptimizer optimizer)
 {
     Optimizer = optimizer;
 }