コード例 #1
0
        public AnimationPutEntirePattern(AnimationStudio parent, Animation animation, Int32 CurrentFrameIndex)
        {
            InitializeComponent();
            this.parent = parent;
            this.animation = animation;
            Buffer = new Bitmap(PN_Canvas.Size.Width, PN_Canvas.Size.Height);
            RulerWidth = parent.RulerWidth;
            AbsoluteCenter = new Point(PN_Canvas.Width / 2, PN_Canvas.Height / 2);

            FrameSize = animation.GetPattern().GetFrameSize();
            OriginalSize = animation.GetPattern().GetFrameSize();
            Position = new Point(-FrameSize.Width/2, -FrameSize.Height/2);

            NUM_StartIndex.Maximum = animation.GetPattern().GetFrameCount();
            NUM_StartIndex.Value = 0;

            NUM_EndIndex.Maximum = animation.GetPattern().GetFrameCount();
            NUM_EndIndex.Value = NUM_EndIndex.Maximum;

            NUM_FromFrame.Value = CurrentFrameIndex;
            DDL_Blending.SelectedIndex = 1;

            this.SetStyle(
                ControlStyles.UserPaint |
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.OptimizedDoubleBuffer, true);
        }
コード例 #2
0
        private void animationsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AnimationStudio dlg = new AnimationStudio(Project.Ressources.Animations, Project.Ressources.Battlers, MapBatch);
            dlg.ShowDialog();

            Project.Ressources.Animations = dlg.GetAnimationsFromList().ToList();
            RefreshDevice();
        }