Esempio n. 1
0
 public void LeftOn(Actor o)
 {
     o.SetLocation(0, GetHeight() / 2 - o.GetHeight() / 2);
 }
Esempio n. 2
0
 public void RightOn(Actor o)
 {
     o.SetLocation(GetWidth() - o.GetWidth(), GetHeight() / 2
                   - o.GetHeight() / 2);
 }
Esempio n. 3
0
 public void CenterOn(Actor o)
 {
     o.SetLocation(GetWidth() / 2 - o.GetWidth() / 2, GetHeight()
                   / 2 - o.GetHeight() / 2);
 }
Esempio n. 4
0
 public void TopOn(Actor o)
 {
     o.SetLocation(GetWidth() / 2 - o.GetWidth() / 2, 0);
 }
Esempio n. 5
0
 public void RightOn(Actor obj0)
 {
     obj0.SetLocation(GetWidth() - obj0.GetWidth(), GetHeight() / 2
             - obj0.GetHeight() / 2);
 }
Esempio n. 6
0
 public void BottomOn(Actor obj0)
 {
     obj0.SetLocation(GetWidth() / 2 - obj0.GetWidth() / 2, GetHeight()
             - obj0.GetHeight());
 }
Esempio n. 7
0
 public void TopOn(Actor obj0)
 {
     obj0.SetLocation(GetWidth() / 2 - obj0.GetWidth() / 2, 0);
 }
Esempio n. 8
0
 public void RightOn(Actor o)
 {
     o.SetLocation(GetWidth() - o.GetWidth(), GetHeight() / 2
             - o.GetHeight() / 2);
 }
Esempio n. 9
0
 public void RightOn(Actor obj0)
 {
     obj0.SetLocation(GetWidth() - obj0.GetWidth(), GetHeight() / 2
                      - obj0.GetHeight() / 2);
 }
Esempio n. 10
0
 public void CenterOn(Actor obj0)
 {
     obj0.SetLocation(GetWidth() / 2 - obj0.GetWidth() / 2, GetHeight()
             / 2 - obj0.GetHeight() / 2);
 }
Esempio n. 11
0
 public void LeftOn(Actor obj0)
 {
     obj0.SetLocation(0, GetHeight() / 2 - obj0.GetHeight() / 2);
 }
Esempio n. 12
0
 public void TopOn(Actor obj0)
 {
     obj0.SetLocation(GetWidth() / 2 - obj0.GetWidth() / 2, 0);
 }
Esempio n. 13
0
 public void TopOn(Actor o)
 {
     o.SetLocation(GetWidth() / 2 - o.GetWidth() / 2, 0);
 }
Esempio n. 14
0
 public void BottomOn(Actor o)
 {
     o.SetLocation(GetWidth() / 2 - o.GetWidth() / 2, GetHeight()
                   - o.GetHeight());
 }
Esempio n. 15
0
 public void LeftOn(Actor obj0)
 {
     obj0.SetLocation(0, GetHeight() / 2 - obj0.GetHeight() / 2);
 }
Esempio n. 16
0
        protected internal override void ProcessTouchDragged()
        {
            int dropX = 0;
            int dropY = 0;

            if (!locked)
            {
                bool moveActor = false;
                if (actorDrag)
                {
                    lock (objects)
                    {
                        dropX = this.input.GetTouchX() - this.GetScreenX();
                        dropY = this.input.GetTouchY() - this.GetScreenY();
                        if (dragActor == null)
                        {
                            dragActor = GetSynchronizedObject(dropX, dropY);
                        }
                        if (dragActor != null && dragActor.IsDrag())
                        {
                            lock (dragActor)
                            {
                                objects.SendToFront(dragActor);
                                RectBox rect = dragActor.GetBoundingRect();
                                int     dx   = (dropX - (rect.width / 2));
                                int     dy   = (dropY - (rect.height / 2));
                                if (dragActor.GetLLayer() != null)
                                {
                                    dragActor.SetLocation(dx, dy);
                                    dragActor.Drag(dropX, dropY);
                                    if (dragActor.actorListener != null)
                                    {
                                        dragActor.actorListener.Drag(dropX, dropY);
                                    }
                                }
                                moveActor = true;
                            }
                        }
                    }
                }
                if (!moveActor)
                {
                    lock (input)
                    {
                        dropX = this.input.GetTouchDX();
                        dropY = this.input.GetTouchDY();
                        if (IsNotMoveInScreen(dropX + this.X(), dropY + this.Y()))
                        {
                            return;
                        }
                        if (GetContainer() != null)
                        {
                            GetContainer().SendToFront(this);
                        }
                        this.Move(dropX, dropY);
                        this.Drag(dropX, dropY);
                    }
                }
            }
            else
            {
                if (!actorDrag)
                {
                    return;
                }
                lock (objects)
                {
                    dropX = this.input.GetTouchX() - this.GetScreenX();
                    dropY = this.input.GetTouchY() - this.GetScreenY();
                    if (dragActor == null)
                    {
                        dragActor = GetSynchronizedObject(dropX, dropY);
                    }
                    if (dragActor != null && dragActor.IsDrag())
                    {
                        lock (dragActor)
                        {
                            objects.SendToFront(dragActor);
                            RectBox rect = dragActor.GetBoundingRect();
                            int     dx   = (dropX - (rect.width / 2));
                            int     dy   = (dropY - (rect.height / 2));
                            if (dragActor.GetLLayer() != null)
                            {
                                dragActor.SetLocation(dx, dy);
                                dragActor.Drag(dropX, dropY);
                                if (dragActor.actorListener != null)
                                {
                                    dragActor.actorListener.Drag(dropX, dropY);
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 17
0
 public void LeftOn(Actor o)
 {
     o.SetLocation(0, GetHeight() / 2 - o.GetHeight() / 2);
 }