Gui Mouse y

Started by Danman, Fri 08/01/2010 15:47:26

Previous topic - Next topic

Danman

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



Khris

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.

Joe

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.
Code: ags

//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
Copinstar © Oficial Site

Danman

#3
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



SMF spam blocked by CleanTalk