Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: strazer on Tue 20/04/2004 04:51:36

Title: Tracker: Enable/Disable mouse cursor animation
Post by: strazer on Tue 20/04/2004 04:51:36
Surprisingly, I couldn't find an earlier thread or a mention in the docs for this, so I don't know if this was asked before:

My inventory is on the screen the entire time.
I'd like to have my mouse cursors animate (>1 frames) not only when over hotspots or objects, but when over inventory items as well.
A function like AnimateMouseCursor to manually trigger the animation would be helpful.

This way it would also be easier to make the cursor animation in general depend on whether there is actually an interaction defined for the current cursor mode.
Title: Re:Suggestion: AnimateMouseCursor
Post by: Scummbuddy on Tue 20/04/2004 06:09:47
you can apply a view to a mouse cursor to make it animate.... is this what you are asking for?
Title: Re:Suggestion: AnimateMouseCursor
Post by: strazer on Tue 20/04/2004 06:16:15
No. I'm using that, but it doesn't work on inventory items.
If there were a function as described above, I could manually trigger this animation at mouseover.
Title: Re:Suggestion: AnimateMouseCursor
Post by: Kweepa on Tue 20/04/2004 08:51:51
Sounds like you're doing something like the MI2 style interface.
You could hack the behaviour you want by creating your own inventory (using buttons on a gui), keeping your own "interactionMode" variable, and having a bunch of cursor modes that are animated with views.
Title: Re:Suggestion: AnimateMouseCursor
Post by: Gilbert on Tue 20/04/2004 09:01:09
Yeah, something like:
If ((GetInvAt (mouse.x, mouse.y)>=0)&&(GetCursorMode()
!=ani_mode)) SetCursorMode(ani_mode);
else SetCursorMode(curmode);

Title: Re:Suggestion: AnimateMouseCursor
Post by: strazer on Tue 20/04/2004 09:29:27
Nice workaround, thanks, but a little messy for my tastes.
The missing animation is not that important anyway, but surely such a function can't be that hard to implement either?
Title: Re:Suggestion: AnimateMouseCursor
Post by: Kweepa on Tue 20/04/2004 12:02:11
It's only as messy as the code you write to implement it  ;D
Title: Re:Suggestion: AnimateMouseCursor
Post by: Proskrito on Tue 20/04/2004 21:32:56
i havent been able to work with ags for some time, so maybe im wrong, but i remember also missing a SetCursorView function. there is a 'SetCursorPic' or so, but it didnt alow to set an animated cursor as you can in the editor.
if im wrong please tell and forgive me ; )
Title: Re:Suggestion: AnimateMouseCursor
Post by: strazer on Tue 20/04/2004 21:41:25
QuoteIt's only as messy as the code you write to implement it

Hehe, sure. It's just that it's not worth to me losing the built-in interaction mechanics for such a thing.
After all, I would have to use "Any click on" and check the cursor modes myself, right?
Title: Re:Suggestion: AnimateMouseCursor
Post by: Pumaman on Tue 20/04/2004 23:17:55
So basically you're asking for DisableMouseCursorAnimation and EnableMouseCursorAnimation?
Title: Re:Suggestion: AnimateMouseCursor
Post by: strazer on Tue 20/04/2004 23:19:30
Hehe, that's the other way around.
Yes, that would work I guess.