Discuss Scratch

Seth_Zaw
Scratcher
100+ posts

"[] mouse pointer" block

These blocks should be added to Scratch:
hidemousepointershowmousepointer
Basically, it makes the mouse pointer hide or disappear, like sprites. It would be useful for a hard game. Please add!
StevenTheSquare
Scratcher
100+ posts

"[] mouse pointer" block

The mouse pointer isn't a part of the Scratch site though, it's a part of your computer. Scratch has no control over that, I don't think.
minor-edit
Scratcher
500+ posts

"[] mouse pointer" block

I am on a tablet and there is no mouse pointer.
PkmnQ
Scratcher
1000+ posts

"[] mouse pointer" block

StevenTheSquare wrote:

The mouse pointer isn't a part of the Scratch site though, it's a part of your computer. Scratch has no control over that, I don't think.
Apparently, you can use CSS to hide it, but I'm not sure if it'll work here.
CuriousGamer
Scratcher
60 posts

"[] mouse pointer" block

There's an inbuilt javascript function to hide the mouse cursor:
document.getElementByTagName('canvas').style.cursor = ‘none’;
It works by getting the <canvas> tag from the HTML (where is project is on show) and sets the CSS to hide the mouse.

I'm not entirely sure how it could be defined, but it should work as follows:
if (mouseOnShow) {
document.getElementByTagName('canvas').style.cursor = ‘auto’;
// auto basically means set the mouse to show it's default state
} else {
document.getElementByTagName('canvas').style.cursor = ‘none’;
// none basically means make the mouse invisible
};
minor-edit
Scratcher
500+ posts

"[] mouse pointer" block

Is this a duplicate?
Za-Chary
Scratcher
1000+ posts

"[] mouse pointer" block

It looks like this is a duplicate topic of this one over here so I'll close it to keep the conversation all in one place.

Feel free to continue the discussion in the link above.

Powered by DjangoBB