This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Magik6k's profile picture

'mouse_release' Event

Started by Magik6k, 22 January 2014 - 12:44 PM
Magik6k #1
Posted 22 January 2014 - 01:44 PM
I've just noticed, that CC lacks this feature - which is IMHO pretty important. It would be really useful, with it making stuff like drag-and-drop, shape drawing, etc. would be possible/easier.
CometWolf #2
Posted 22 January 2014 - 02:32 PM
Both of your examples are already easily doable with click and drag, i should know as i've done it. But yeah, i would love a release event anyways :P/>
Edited on 22 January 2014 - 01:33 PM
oeed #3
Posted 22 January 2014 - 05:42 PM
As much as I'd like this, it probably won't happen. There's a thing about key up/down events in the sticky, so this probably is similar.
  • KeyUp/KeyDown events - These may be added in the future, but due to limitations in a multi-user environment, such as SMP, they are rather non-trivial. There is no easy way to tell who is pressing what without some serious amounts of coding.

http://www.computercraft.info/forums2/index.php?/topic/10425-suggestions-not-to-make-read-this-first/
CometWolf #4
Posted 22 January 2014 - 05:56 PM
I don't really see the issue here, just consider all user input as the same user, like how it's already done. Surely that would be better than nothing?
Edited on 22 January 2014 - 04:57 PM
oeed #5
Posted 22 January 2014 - 07:05 PM
I don't really see the issue here, just consider all user input as the same user, like how it's already done. Surely that would be better than nothing?
Well, in the issue similar to the key events, consider two people using a computer. Person one starts drags the mouse, 1 second later person two starts dragging. When the player one/two releases the mouse, how do you know who it was?
Magik6k #6
Posted 23 January 2014 - 12:07 AM
IMO passing clicker name as last event parameter would be enough. It gives you choice betwen making tons od code or basic event handling. The other way would be just count clicks and releases, and then ignore click events until enough release events came(In case not having the user name in event).
Lyqyd #7
Posted 23 January 2014 - 12:54 AM
IMO passing clicker name as last event parameter would be enough.

Never gonna happen. I don't particularly see the suggestion getting implemented either, as it essentially falls under key down/up events. Locked.