Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: I<3Pindorama! on Mon 29/12/2014 16:09:59

Title: Cursor Invisible --but--> SubCursor Visible [disSOLVED]
Post by: I<3Pindorama! on Mon 29/12/2014 16:09:59
Hello!

I have some difficulty in a Gui that I created.

It will work as a panel of buttons:

(http://i.imgur.com/C4gR8WA.png)

In the properties panel I've added the buttons and also
selected the image to overwrite the button:

(http://i.imgur.com/Q2oULcd.png)

But the mouse cursor is appearing and covering image (cognomen:subcursor :P):

(http://i.imgur.com/QwWePqK.png)

I would like the cursor to stay invisible but still
working when over the panel:

(http://i.imgur.com/MtAMZqs.png)

Who can help me ... I give a pixel CAR!
And my gratitude ... of course!    (roll)
Title: Re: Cursor Invisible --but--> SubCursor Visible (Part ONE)
Post by: Cassiebsg on Mon 29/12/2014 16:42:47
You either need to deactivate the mouse cursor, or define an animated cursor when over the button, then you can either use the "animated" cursor with the picture on it or use an empty sprite for the animated cursor when it's hovering the button... (sounds more complicated than it really is, honest) (laugh) .
To make an animated cursor you need to use the mouse settings on the project tree.
(hope you can find out of what I wrote...)
Title: Re: Cursor Invisible --but--> SubCursor Visible (Part ONE)
Post by: Adeel on Mon 29/12/2014 17:00:22
Here's another solution. Put this code:
Code (ags) Select
  if (GUIControl.GetAtScreenXY(mouse.x, mouse.y) == Button1) mouse.UseModeGraphic(eModeUsermode1);
  else mouse.UseDefaultGraphic();


in your repeatedly_execute() function located in the GlobalScript.asc. Make sure that the Usermode1's image is set to 0 (by default it is already set to 0, unless you've changed it).

Haven't tested this code but, in theory, it should work.
Title: Re: Cursor Invisible --but--> SubCursor Visible (Part ONE)
Post by: I<3Pindorama! on Mon 29/12/2014 18:22:21
It's Works!
WONDERFULLY!
Thank you very much!
I did not expect two answers ...
So you two have to take turns with the car, okay?
No fight, please!
:-D

(http://i.imgur.com/jG7hU98.gif)
Title: Re: Cursor Invisible --but--> SubCursor Visible (Part ONE)
Post by: Adeel on Mon 29/12/2014 18:36:03
Quote from: I<3Pindorama! on Mon 29/12/2014 18:22:21
Spoiler
(http://i.imgur.com/jG7hU98.gif)
[close]

Hey, this gave me a nice idea for my new signature. Thank you! ;)
Title: Re: Cursor Invisible --but--> SubCursor Visible (Part ONE)
Post by: I<3Pindorama! on Mon 29/12/2014 19:25:14
Hahahahaha!
My good Ahmed
It was great!
(laugh)
I thank you for this honor!

Spoiler
(http://i.imgur.com/Bn18Py3.png)(http://i1341.photobucket.com/albums/o756/jwalt10705/myCB1_zps8deffa93.png)(http://i.imgur.com/W1Sx6tl.gif)
[close]
;)