How do I change the opacity of the mouse cursor

Get help using Construct 2

Post » Sat Nov 08, 2014 6:28 pm

Hi.

I thought I had it figured it out by adding a sprite to the mouse cursor. But I need to change the opacity of the graphics, but even though I change the opacity of the sprite used as the mouse cursor, nothing happens.

Is the mouse cursor special, so you can't apply changes to the sprite used for the mouse cursor?

I found this in the manual, so it sounds kind of special.

"Set cursor from sprite
Set the cursor image from a Sprite object. This is preferable to setting a sprite to the mouse co-ordinates, because the input lag is significantly lower. Various limitations apply: the sprite image is used as it appears in the image editor, not taking in to account size or rotation in the layout; the image cannot be too large (64x64 is usually the limit); and support varies depending on browser and OS."
B
5
S
1
Posts: 59
Reputation: 493

Post » Sat Nov 08, 2014 9:30 pm

Well I guess the answer is: YOU CAN'T

I have made more tests, and it looks as the only thing you can do, is to change the graphics, by changing the cursor to a different sprite, or switch to the build in standards.

What I still do no know is if you are able to animate the sprite, or if you are stuck with a static image.
B
5
S
1
Posts: 59
Reputation: 493

Post » Sat Nov 08, 2014 9:59 pm

......
You do not have the required permissions to view the files attached to this post.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Nov 08, 2014 10:01 pm

But I can suggest you a one answer to change the opacity of mouse cursor!.(even you can use a animation for cursor with this solution)
Try this :
On the start of layout -> set cursor style to "none"
in System every tick -> set position of sprite ( that you need to use as cursor sprite ) to Mouse.X and Mouse.Y
When you need to change the opacity, just call set opacity on that sprite
Image
Image
B
24
S
2
G
1
Posts: 46
Reputation: 1,112

Post » Wed Nov 12, 2014 9:25 pm

korbaach wrote:......

Hi Korbaach.

I have downloaded your project but is is the latest beta update. I will have a look as soon as a new stable layout is released, since I always stick with stable releases in all my software.

I am new to construct 2, though so maybe that is a mistake :-)
B
5
S
1
Posts: 59
Reputation: 493

Post » Wed Nov 12, 2014 9:28 pm

tharindutpd wrote:But I can suggest you a one answer to change the opacity of mouse cursor!.(even you can use a animation for cursor with this solution)
Try this :
On the start of layout -> set cursor style to "none"
in System every tick -> set position of sprite ( that you need to use as cursor sprite ) to Mouse.X and Mouse.Y
When you need to change the opacity, just call set opacity on that sprite
Image


Hi tharindutpd

What you are doing is basically moving the sprite to the cursor position. I understand that, but when I read the manual, it is not recommended to do that (performance wise). Is the manual wrong?
B
5
S
1
Posts: 59
Reputation: 493


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot], YoHoho and 21 guests