Help with popup GUI (SOLVED)

Started by Chicky, Tue 22/08/2006 15:22:49

Previous topic - Next topic

Chicky

Howdy,

Monkey was helping me with some of the HTMI scripting untill 4am this morning and we made a good deal of progress.

But he's asleep now and i'm having a problem :P

See ive got this code

gIconbar.Visible = (mouse.y >= 180);

which is under repeatedly execute in my global script, its there to make the gui visible when the curser goes to the bottom of the screen. But i have two problems.

If i have used the gui off command to turn it off it still comes up when my curser heads to the bottom of the screen, i'm guessing because it's in repeatedly execute. How would i go by fixing this?

And also i want there to be a 2 second or so delay so the gui stays at the bottom after i move my mouse to the botton of the screen...

So basicly, the GUI takes up about 25% of the bottom of the screen, but the hotspot to make the gui popup only takes 10% or so. What i want is after the gui has popped up i want it to stay there for 2 seconds or so, so that the user can click the buttons at the top of the GUI.

Sorry if this doesn't make much sense but I'm tired and rambling.

thanks in advance.

monkey0506

So Nathan, if I understand you correctly, what you want is, any time you move the mouse to the bottom of the screen, the GUI is on for at least two seconds, but longer if the mouse stays at the bottom of the screen?

Or maybe it should be that if the mouse is over the GUI it should stay on during that time until the mouse moves off the GUI?

And...what code did you use to turn it off...or was it the interaction editor? You could set a variable to determine if it should be able to come on or not...just let me know what it is you have done and how you want it to work.

SSH

Quote from: Chicky on Tue 22/08/2006 15:22:49
gIconbar.Visible = (mouse.y >= 180);

Just chaneg this to:

Code: ags

gIconbar.Visible = (mouse.y >= 180) || GUI.GetAtScreenXY(mouse.x, mouse.y)==gIconbar;

12

Chicky

Wow, awesome. That worked! Thanks!

Now how do i prevent the gui from coming up hen im on the menu screen?

SSH

Code: ags

  gIconbar.Visible = (player.Room != ROOM_NUMBER_OF_MENU_SCREEN) && ((mouse.y >= 180) || GUI.GetAtScreenXY(mouse.x, mouse.y)==gIconbar);
12

Chicky


monkey0506

You know Nathan, if you would answer me on MSN I could have told you that...-.-

Letting SSH step in on my work...pshhh...

:=

SSH

I'm faster than a speeding monkey...
12

SMF spam blocked by CleanTalk