Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: charaldooo on September 28, 2012, 03:25:29 AM
-
I have a problem with the OnPress event it doesn't return false, if I didn't release the mousebutton on the same trigger as I pressed on.
Is it a bug?
I want it to return false when I release the button elsewhere too.
-
"return" a false? OnPress has a boolean parameter that's true or false depending on whether it was pressed or released.
-
I think what he meant is that OnPress is not fired with 'false' when you drag a pressed finger out of a widget ('does not return false when release of button is not on the same widget as the down')
-
It does though. OnPress(false) is always guaranteed to be sent to the same widget as OnPress(true) unless you manually changed UICamera.currentTouch.pressed to be something else.
-
Do I get OnPress(false) if press down my mouse button on a button and release on another button?
-
The first button will receive both OnPress(true) and OnPress(false).
-
Thank you for the help =D
I look at my code again and fix the problem.
So there wasn't any problem with OnPress(false) ;D