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

Comments

Projects
None yet
2 participants
@jinjor
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 from provide Mouse.up & Mouse.down to Add Mouse.up & Mouse.down Jul 23, 2015

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Aug 3, 2015

Member

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

Member

evancz commented Aug 3, 2015

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

@evancz evancz closed this Aug 3, 2015

@evancz evancz referenced this issue Aug 3, 2015

Open

API Ideas #322

@jinjor

This comment has been minimized.

Show comment
Hide comment
@jinjor

jinjor Aug 3, 2015

Contributor

Thanks :)

Contributor

jinjor commented Aug 3, 2015

Thanks :)

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Aug 3, 2015

Member

No problem, thanks for raising the idea!

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