Page 1 of 1

Mouse Cursors

PostPosted: Sat Nov 08, 2008 4:56 am
by smillz
Is there a way to change the mouse cursor without hiding the real mouse while having another actor use a Follow Mouse event?(I don't like doing that because it creates many z-depth issues if your game has any Mouse Button Down events and it has a small lag)

Re: Mouse Cursors

PostPosted: Sat Nov 08, 2008 7:10 am
by DilloDude
You can use the ChangeCursor function. This only changes the cursor on the actor you select, so you have to change it for all actors that can be on top. So to make a default cursor, you need to make an actor (such as a filled region) that covers the whole screen. If you disable the MOUSEBUTTONDOWN event on that actor, you can still click on actors beneath it in z-depth. If you want to hide the mouse, you need to make a 1x1 pixel png image, with 0% opacity, and make hat the cursor.

Re: Mouse Cursors

PostPosted: Sat Nov 08, 2008 5:34 pm
by j2graves
btw, I'm having a little trouble with something cause the mouse button down events only allow for the mouse clicking on the object that has the event. could there please be an alternate mouse button down type event which is like a keydown event?

Re: Mouse Cursors

PostPosted: Sun Nov 09, 2008 2:41 am
by smillz
thanks Dillo Dude! :D And J2graves:

1: create an actor with no animation (or an animation about the size of the standard game-editor pacman symbol), and let's call him "click"
2: give "click" a z-depth greater than every other actor so he always gets clicked
3: Disable "click's" visibility state to make him invisible (if you want to)
4: give "click" a Draw Actor -> Follow Mouse event so he's always with the mouse
5: give "click" a Mouse Button Down event

with "click" always recieving the Mouse Button Down events once you click the mouse, use him to then redirect actions to the desired actor. It's kind of confusing, so feel free to ask questions if you don't understand. :)

Re: Mouse Cursors

PostPosted: Sun Nov 09, 2008 3:26 am
by BlarghNRawr
theres an easier way to invisible mouse by changing in the game properties to show mouse *no*

Re: Mouse Cursors

PostPosted: Sun Nov 09, 2008 5:02 am
by DilloDude
BlarghNRawr wrote:theres an easier way to invisible mouse by changing in the game properties to show mouse *no*

If you want there to never be a mouse, then yes; however, if you want sometimes to be a mouse (for menus and stuff) and sometimes to be none (like for scenes and things) then you either need to make an invisible cursor, or make a separate actor.

smillz wrote:1: create an actor with no animation (or an animation about the size of the standard game-editor pacman symbol), and let's call him "click"
2: give "click" a z-depth greater than every other actor so he always gets clicked
3: Disable "click's" visibility state to make him invisible (if you want to)
4: give "click" a Draw Actor -> Follow Mouse event so he's always with the mouse
5: give "click" a Mouse Button Down event
I find that sometimes with this if you move the mouse to quickly you can leave the actor momentarily. It's a good idea to either make it a large circle, or just make a filled region that covers the whole view.

Re: Mouse Cursors

PostPosted: Mon Nov 10, 2008 7:04 am
by smillz
DilloDude wrote:I find that sometimes with this if you move the mouse to quickly you can leave the actor momentarily. It's a good idea to either make it a large circle, or just make a filled region that covers the whole view.


yeah, that's a better idea

Re: Mouse Cursors

PostPosted: Wed Nov 12, 2008 1:40 am
by BlarghNRawr
mouse still works like that :wink: but youer probably smarter than me