Skip to content

more mouse controlls #2104

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

LegoBrainBiker
Copy link

adds the ability to detect more data from the mouse that would be difficult or imaposible to get otherwise. it's small now, but I'm open to more blocks.

@github-actions github-actions bot added the pr: new extension Pull requests that add a new extension label May 2, 2025
Copy link
Contributor

@Brackets-Coder Brackets-Coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it's generally fine syntax-wise, I don't see why or how this can be merged. All of the functionality here is available in native Scratch or through the already existing TurboWarp Blocks extension (e.g., middle mouse button). It would just be a bloat to the gallery

@@ -0,0 +1,137 @@
// Name: More Mouse Controls
// ID: legobrainbikerMoreMouseControls
// Description: Some features I felt were missing from the mouse, including right click detection.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make this description a bit more professional and reminiscent of the extension's qualities?

Comment on lines 14 to 19
document.addEventListener("mousewheel", (e) => {
this.mouseWheelDelta = e.deltaY;
Scratch.vm.runtime.startHats(
"legobrainbikerMoreMouseControls_onScroll"
);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On scroll is available in native scratch when doing:

when [up/down arrow] pressed
if <not <up/down arrow pressed>> ?:
    scroll action
endif

Because the hat block detects scrolling but the key boolean doesn't, so you can detect scrolling like this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this, but I thought this would make it easier, especialy when using the other scroll block. also it works with both at the say time.

Copy link
Contributor

@Brackets-Coder Brackets-Coder May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this, but I thought this would make it easier, especialy when using the other scroll block. also it works with both at the say time.

That's a valid point, but it's still probably not worth adding a whole new extension to the gallery though

Copy link
Contributor

@Brackets-Coder Brackets-Coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that it looks fine but we'll have to check with a moderator to see if this small extension is worth merging since I have no say in the matter

@LegoBrainBiker
Copy link
Author

!format

@LegoBrainBiker LegoBrainBiker changed the title legobrainbiker/more mouse controlls: implementation more mouse controlls May 2, 2025
@yuri-kiss
Copy link
Member

Duplicate of a lot of the other mouse extension pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: new extension Pull requests that add a new extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants