Author Topic: [SOLVED] How to start and end Drag&Drop only OnMouseDown events?  (Read 1580 times)

BrightBit

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 21
    • View Profile
[SOLVED] How to start and end Drag&Drop only OnMouseDown events?
« on: February 25, 2014, 05:01:54 AM »
Hi again,

is there a way to start the dragging of an instance of UIDragDropItem on a MouseDown event and only end it on a subsequent MouseDown event, i.e. the user doesn't need to hold the mouse down? I already looked into how the UICamera handles dragging and there it seems that any dragging will always end when the mouse gets unpressed. Can you think of an elegant way to change this behaviour?


Greetings
BrightBit
« Last Edit: March 02, 2014, 02:00:53 AM by BrightBit »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to start and end Drag&Drop only OnMouseDown events?
« Reply #1 on: February 25, 2014, 01:49:10 PM »
The inventory example has this functionality. It's able to drag both by press and drag, as well as click and drag. It's not using the UIDragDropItem logic, however.

BrightBit

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 21
    • View Profile
Re: How to start and end Drag&Drop only OnMouseDown events?
« Reply #2 on: February 25, 2014, 08:24:00 PM »
Thank you very much indeed! The example you mentioned was very helpful. :)