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

[Feature Request] Mouse support? #11

Open
teadrinker opened this issue Sep 12, 2023 · 0 comments
Open

[Feature Request] Mouse support? #11

teadrinker opened this issue Sep 12, 2023 · 0 comments

Comments

@teadrinker
Copy link

mouse support is great for quickly exploring a parameter space (2 variables) interactively.

currently the mouse cursor is hidden, I feel this could still be the behaviour, no need to support built-in cursor (if you want to a graphical cursor, you have to draw it yourself)

for good behavior in a browser or window, I think it's important that the coordinate range is not clamped to 320x240. Also, if the mouse is clicked inside the screen ("mouse-capture") and dragged out, mouse buttons should still report as down when cursor is outside 320x240

maybe something like this? (aligns with tic-80):

float mouseX();
float mouseY();
unsigned int mouseButtons(); // 1 = left, 2 = middle, 4 = right
float mouseScrollX();
float mouseScrollY();

(Float precision is nice cos it enables subpixel accuracy for higher resolutions)

@teadrinker teadrinker changed the title Feature Request: Mouse support? [Feature Request] Mouse support? Sep 12, 2023
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

1 participant