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); } }
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(); }
void pasteState(int state) { deleteState(state); IStateFrameData data = stateFrameImage1.Data; data.setSize(state, mCopiedSize); data.setHotspot(state, mCopiedHotspot); foreach (KeyValuePair <int, string[]> frames in mCopiedFrames) { for (int i = 0; i < frames.Value.Length; ++i) { data.setFramePart(state, frames.Key, i, frames.Value[i]); data.setFramePartOffset(state, frames.Key, i, (Vec2i)mCopiedOffsets[frames.Key][i]); } } }