public void LeftOn(Actor o) { o.SetLocation(0, GetHeight() / 2 - o.GetHeight() / 2); }
public void RightOn(Actor o) { o.SetLocation(GetWidth() - o.GetWidth(), GetHeight() / 2 - o.GetHeight() / 2); }
public void CenterOn(Actor o) { o.SetLocation(GetWidth() / 2 - o.GetWidth() / 2, GetHeight() / 2 - o.GetHeight() / 2); }
public void TopOn(Actor o) { o.SetLocation(GetWidth() / 2 - o.GetWidth() / 2, 0); }
public void RightOn(Actor obj0) { obj0.SetLocation(GetWidth() - obj0.GetWidth(), GetHeight() / 2 - obj0.GetHeight() / 2); }
public void BottomOn(Actor obj0) { obj0.SetLocation(GetWidth() / 2 - obj0.GetWidth() / 2, GetHeight() - obj0.GetHeight()); }
public void TopOn(Actor obj0) { obj0.SetLocation(GetWidth() / 2 - obj0.GetWidth() / 2, 0); }
public void CenterOn(Actor obj0) { obj0.SetLocation(GetWidth() / 2 - obj0.GetWidth() / 2, GetHeight() / 2 - obj0.GetHeight() / 2); }
public void LeftOn(Actor obj0) { obj0.SetLocation(0, GetHeight() / 2 - obj0.GetHeight() / 2); }
public void BottomOn(Actor o) { o.SetLocation(GetWidth() / 2 - o.GetWidth() / 2, GetHeight() - o.GetHeight()); }
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); } } } } } } }