Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Danman on Fri 08/01/2010 15:47:26

Title: Gui Mouse y
Post by: Danman on Fri 08/01/2010 15:47:26
I need help please I have searched the manual a couple times and can't find anything to do with this.  ???

I am making a template and I need to know how to make 3 buttons animate when the mouse goes over 48 pixels at the top. I hope this make sense when the mouse goes to the top of the screen.

Also while I am asking how could I change a mouse.mode when the cursor is over an object,hotspot or character not animate. change.mode like to look or interact.

Please help
Title: Re: Gui Mouse y
Post by: Khris on Fri 08/01/2010 15:56:24
There are several threads about Broken Sword style GUIs. Search for them (before opening a new thread, ideally).

Also, in order to solve a coding problem, you have to combine the stuff in the manual. Not every little possible solution is in there, obviously.
Title: Re: Gui Mouse y
Post by: Joe on Fri 08/01/2010 16:03:46
Yeah you should do what Khris said... but anyway I'll give you a little shot which may help, I think...
But since there's no Button.Animating function you must do something extra to get when the button is animating or not...
For example, setting the last frame of the animatig view as the parameter to know if it has finished animating.

//at top of global script
bool animating=false;
//at repeatedly_execute
if(btn.Graphic== NUM)
 animating =false;
else
 animating=true;
if(mouse.y<48)
 if(!animating)
   btn.Animate(view,loop,delay,repeatStyle);


For the other question I'd use the mouse over event and use the function SaveCursorUntilItLeaves();

Hope it helps
Title: Re: Gui Mouse y
Post by: Danman on Fri 08/01/2010 16:09:39
Oh OK. I was searching for GUI Y something like that not broken sword. OK thanks.
I do know I have to combine the stuff in the manual I have been reading the manual for 3 days and thinking about it but couldn't find a solution.   ;)

EDIT: Thanks Joe Carl That worked thanks :D