Ejemplo n.º 1
0
        protected override void LoadContent()
        {
            _spriteBatch = new SpriteBatch(GraphicsDevice);

            _dragDropController = new DragAndDropController<Item>(this, _spriteBatch);
            Components.Add(_dragDropController);
            SetupDraggableItems();
        }
Ejemplo n.º 2
0
 protected void OnMouseOver()
 {
     DragAndDropController.Instance()?.HoverOn(this);
     this.OnOver();
 }
Ejemplo n.º 3
0
 protected void OnMouseExit()
 {
     DragAndDropController.Instance().HoverOff(this);
     this.OnExit();
 }
Ejemplo n.º 4
0
 // Default implementation is to reset position when dropped on top of another interface object
 public virtual void OnDrop()
 {
     DragAndDropController.Instance().ResetDrop();
 }