Beispiel #1
0
        public bool ResizeSelectedSprite(int tileNewWidth, int tileNewHeight)
        {
            Sprite sToResize = CurrentSprite;

            if (sToResize == null)
            {
                return(false);
            }

            int nOldTiles = sToResize.NumTiles;

            if (!sToResize.Resize(tileNewWidth, tileNewHeight))
            {
                return(false);
            }

            m_nTiles += sToResize.NumTiles - nOldTiles;

            //TODO: adjust the background map

            MoveToCorrectSpriteType(sToResize);
            return(true);
        }