0
\$\begingroup\$

I have a problem with my toggle buttons. When a user performs the Mouse Up of the toggle button outside the button area, the click is not counted.

Mouse Down and Mouse Up on the button area works. Mouse Down on the button and Mouse Up outside, does not work..

Just to avoid confusion, the Mouse Down is when you click, the Mouse Up is when you lift the finger from the mouse button.

Do you have any idea how to solve this?

I'm using Unity. Thanks for your help!

\$\endgroup\$
3
  • 1
    \$\begingroup\$ How about including the code that produces this unexpected behaviour? \$\endgroup\$
    – dot_Sp0T
    Commented Oct 29, 2017 at 13:32
  • \$\begingroup\$ There is no code, I am using the toggle of unity, I am not creating the script for the behaviour \$\endgroup\$ Commented Oct 29, 2017 at 14:33
  • 6
    \$\begingroup\$ This is how it is intended to work. It lets users cancel their clicks and also allows to differentiate between a click or a drag on a UI element. \$\endgroup\$ Commented Oct 29, 2017 at 14:40

1 Answer 1

1
\$\begingroup\$

I guess you could record the mouse down event on the button and then instead of waiting for mouse up on that button, waiting for Input.MouseUp before triggering the event.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .