Exemple #1
0
        private void mouse_down(object o, MouseEventArgs e)
        {
            if (MouseButtons.Left == e.Button)
            {
                for (int index = 0; index < animations.Count; ++index)
                {
                    actions_animation animation = animations[index];
                    wzvector          location  = locations[index];
                    Point             point     = new Point(e.X - location.x - animation.x, e.Y - location.y - animation.y);

                    if (new Rectangle(Point.Empty, animation.frame.Size).Contains(point))
                    {
                        if (0 != animation.frame.GetPixel(point.X, point.Y).A)
                        {
                            current = index;
                            origin  = new Point(e.X, e.Y);
                        }
                    }
                }

                if (-1 != current)
                {
                    (Parent as momiji_host).scene_selected(animations[current]);
                }
            }
        }
Exemple #2
0
    internal void delete_animation(int index)
    {
        actions_animation animation = animations[index];

        animations.RemoveAt(index);

        animation.dispose();
    }
Exemple #3
0
    internal void move_animation(int index, int delta)
    {
        int position = index + delta;

        if (0 <= position && animations.Count > position)
        {
            actions_animation animation = animations[index];

            animations.RemoveAt(index);

            animations.Insert(position, animation);
        }
    }
Exemple #4
0
        internal void add_animation(actions_animation animation)
        {
            double radius = ClientSize.Height / 4.0;
            double radian = Math.PI * degree / 180.0;
            double sin    = Math.Sin(radian);
            double cos    = Math.Cos(radian);

            degree = degree + 25;

            animations.Add(animation);
            locations.Add(new wzvector((int)(ClientSize.Width / 2.0 + cos * radius), (int)(ClientSize.Height / 2.0 + sin * radius)));

            Refresh();
        }
Exemple #5
0
        private void paint(object o, PaintEventArgs e)
        {
            Brush brush = new SolidBrush(BackColor);

            e.Graphics.FillRectangle(brush, ClientRectangle);

            brush.Dispose();

            for (int index = 0; index < animations.Count; ++index)
            {
                actions_animation animation = animations[index];

                if (null != animation.animation)
                {
                    wzvector location = locations[index];

                    e.Graphics.DrawImage(animation.frame, location.x + animation.x, location.y + animation.y);
                }
            }
        }
Exemple #6
0
 private void scene_selected(actions_animation animation)
 {
     scenes.scene_selected(animation.container);
 }
Exemple #7
0
 internal void add_animation(actions_animation animation)
 {
     canva.add_animation(animation);
 }