Example #1
0
        protected override void LoadContent()
        {
            _spriteBatch = new SpriteBatch(GraphicsDevice);

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