private void picbox_width_Leave(object sender, EventArgs e)
        {
            TextBox tb    = (TextBox)sender;
            int     width = Convert.ToInt32(tb.Text);

            PictureBoxSize = new Size(width, PictureBoxSize.Height);
            mData.setSize(mState, new Vec2i(width, PictureBoxSize.Height));
            if (mData.getHotspot(mState).x > width)
            {
                mData.setHotspot(mState, new Vec2i(width, mData.getHotspot(mState).y));
            }
            pictureBox.Invalidate();
        }
Example #2
0
        private void equalizeAllSizesAndFootprintsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IStateFrameData data = stateFrameImage1.Data;
            Vec2i           size = data.getSize(stateFrameImage1.State);
            Vec2i           spot = data.getHotspot(stateFrameImage1.State);

            for (int i = 0; i < 36; ++i)
            {
                data.setSize(i, size);
                data.setHotspot(i, spot);
            }
        }
Example #3
0
        void copyState()
        {
            IStateFrameData data      = stateFrameImage1.Data;
            int             currState = stateFrameImage1.State;

            mCopiedFrames  = new Dictionary <int, string[]>();
            mCopiedOffsets = new Dictionary <int, ArrayList>();
            for (int i = 0; i < stateFrameImage1.Frames; ++i)
            {
                if (data.frameExists(currState, i))
                {
                    mCopiedFrames[i]  = (string[])data.getFrame(currState, i).Clone();
                    mCopiedOffsets[i] = new ArrayList();
                    for (int j = 0; j < stateFrameImage1.FrameParts; ++j)
                    {
                        Vec2i offset = data.getFramePartOffset(currState, i, j);
                        mCopiedOffsets[i].Add(offset);
                    }
                }
            }
            mCopiedSize    = data.getSize(currState);
            mCopiedHotspot = data.getHotspot(currState);
        }