Conversation
There was a problem hiding this comment.
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. | |||
There was a problem hiding this comment.
Could you make this description a bit more professional and reminiscent of the extension's qualities?
| document.addEventListener("mousewheel", (e) => { | ||
| this.mouseWheelDelta = e.deltaY; | ||
| Scratch.vm.runtime.startHats( | ||
| "legobrainbikerMoreMouseControls_onScroll" | ||
| ); | ||
| }); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Brackets-Coder
left a comment
There was a problem hiding this comment.
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
|
!format |
This comment was marked as abuse.
This comment was marked as abuse.
| this.mouseWheelDeltaX = 0; | ||
| this.mouseZoomDelta = 0; | ||
| this.buttons = []; | ||
| document.addEventListener("wheel", (e) => { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
if it has that api, I can't find it. even if it does, it needs to use values, not just when it's happening.
| console.log(this.buttons[Scratch.Cast.toNumber(button)]); | ||
| return this.buttons[Scratch.Cast.toNumber(button)] || false; | ||
| } | ||
| dissableContextMenu() { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
How can I fix it? which addons does it break? all of them with 'contex menu' or right click in their descriptions seem to work (although I didn't test them that much).
|
Hello, @LegoBrainBiker! I don't know if you want to or not, but because of issue #2271, I suggest a collaboration of my (#1122, Wheel Scroll) and your extensions, combining the blocks into one big extension. Agree? |
I would be happy to collaborate. it seems like our extensions do mostly the same things in terms in terms of scrolling, but if you would like, feel free to use or ask for help with anything. I just hope one of these can be merged. |
|
Fantastic, I'll let you two resolve it as you like. May I make a suggestion? Have one extension be the "main" version which will be merged. Have the other user fork the branch and submit a PR adding the other extension's feature. Make sure to include both |
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.