packager icon indicating copy to clipboard operation
packager copied to clipboard

is there a way to change/show/hide custom cursor at runtime?

Open DemonLordDiablo opened this issue 2 years ago • 6 comments

i am looking for a way to show and hide the custom cursor at certan times when the project is running.

DemonLordDiablo avatar May 22 '22 11:05 DemonLordDiablo

You can probably do this with JavaScript and the Eval special variable. Something with style.cursor = 'none'; .

TheShovel avatar May 22 '22 11:05 TheShovel

For now you can use the unsafe cloud behaviors and the eval var

For hiding the cursor, run scaffolding._canvas.style.cursor = 'none'

For showing the cursor, run scaffolding._canvas.style.cursor = ''

GarboMuffin avatar May 22 '22 16:05 GarboMuffin

thanks, and is there also a way to change the custom cursor to a different image too somehow?

DemonLordDiablo avatar May 23 '22 01:05 DemonLordDiablo

That's going to be more complicated

I will have to direct you towards https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

GarboMuffin avatar May 23 '22 01:05 GarboMuffin

Related: https://github.com/TurboWarp/extensions/pull/95

GarboMuffin avatar Dec 28 '22 23:12 GarboMuffin

I would now suggest using the "Cursor" extension on extensions.turbowarp.org

It has some cool blocks:

image

GarboMuffin avatar Dec 31 '22 06:12 GarboMuffin

see above

GarboMuffin avatar May 23 '24 07:05 GarboMuffin