No, sorry. That isn't how input events work. This is how you should be using the event.Nystul wrote:had to make minor changes to the BaseScreenComponent class in update() function to make OnMouseDown event behave like I would expect it.
What I would expect is that the event is fired repeatedly as long as the left mouse button is pressed (it was behaving basically like a simple mouseclick event - just fired on first mouse button down)
that way I was able to implement drag and drop easily in the automap script which would otherwise be tedious...
Do you agree with my opinion?
- You handle the OnMouseDown event. Set a flag called called something like mouseDown.
- You handle the OnMouseUp event. Clear mouseDown flag.
- In your Update(), do something like: if (mouseDown) { // do stuff }
Edit: If you ever do feel changes are needed to the core files to support your work, please email me first to discuss before putting it into code.