Grab Cursor

Discussion and feedback on Construct 2

Post » Sat Jan 07, 2012 5:25 pm

It seems grabby hands aren't as easy as some of the other cursors, at least in CSS. Just wondering if they're going to make their way into the "Set Cursor Style" action.

I need to grab some stuff and it's be nice for the users computers settings to control the cursor size.

http://www.google.com/intl/en_ALL/mapfiles/openhand.cur
http://www.google.com/intl/en_ALL/mapfiles/closedhand.cur
B
51
S
13
G
8
Posts: 194
Reputation: 7,311

Post » Sat Jan 07, 2012 10:35 pm

You could just draw them in photoshop or another similar image editor,

Then set cursor style to "None"
Then -

System.EveryTick
     -> Set MouseIcon.Y(Mouse.X) // set its position to the mouse's X position
     -> Set MouseIcon.Y(Mouse.Y) // set its position to the mouse's Y position
Mouse.IsOverObject(ObjectToGrab) // If the mouse is over the object, Then set the mouse icon to frame 2(The frame with the grab icon)
     -> SetMouseIcon.CurrentFrame(2)

Mouse.IsOverObject(ObjectToGrab)[Invert] // Invert is to determine so we know were NOT over something we can grab
     -> SetMouseIcon.CurrentFrame(1) // If were not over something were able to grab set the Icons Frame to 2 the normal/hand icon

If you need me to provide a example, Let me know :)

If i completely failed to understand what you meant, Then please explain more.
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Sun Jan 08, 2012 1:08 am

Thanks, smitchell. That's almost exactly what I'm doing now, actually. I just tested it out on my buddies computer and he has a pretty large cursors relative to his low resolutions so when my little custom grabby hands comes into play, it looks tiny compared to the standard cursors because the Canvas is scaled to fit his screen. I "unscaled" the custom cursor graphic but it'd be nice if it was built in so that I didn't have to worry about cursor types and resolutions effecting the appearance of consistency.

My problem might be unique though; the easiest work around would be to use all custom cursors but I can't do that because of the design of the game. I was just wondering if there was a plan to put Mr. grabby cursor in.
B
51
S
13
G
8
Posts: 194
Reputation: 7,311


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests