Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mouse.up & Mouse.down #308

Closed
jinjor opened this issue Jul 23, 2015 · 3 comments
Closed

Add Mouse.up & Mouse.down #308

jinjor opened this issue Jul 23, 2015 · 3 comments

Comments

@jinjor
Copy link
Contributor

jinjor commented Jul 23, 2015

I am trying to render selection rectangle that starts by mousedown and ends by mouseup. The start position should be memorized when mouse state changes to isDown == True.

Currently we have to filter Mouse.isDown. I think better to provide two more functions below

Mouse.down : Signal ()
Mouse.up : Signal ()

and Mouse.isDown can be made by their combination.

isDown = merge (always True <~ down) (always False <~ up)

Does this implementation cause any trouble?

Thanks.

@jinjor jinjor changed the title provide Mouse.up & Mouse.down Add Mouse.up & Mouse.down Jul 23, 2015
@evancz
Copy link
Member

evancz commented Aug 3, 2015

Seems plausible, adding to #322 for future consideration in a broader redesign of core.

@evancz evancz closed this as completed Aug 3, 2015
@evancz evancz mentioned this issue Aug 3, 2015
@jinjor
Copy link
Contributor Author

jinjor commented Aug 3, 2015

Thanks :)

@evancz
Copy link
Member

evancz commented Aug 3, 2015

No problem, thanks for raising the idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants