Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MRollins on Tue 28/04/2009 16:52:30

Title: Can a MouseYPos GUI remain visible after an icon is selected?
Post by: MRollins on Tue 28/04/2009 16:52:30
Hello,

Is there a way to make a MouseYPos GUI remain visible after an icon is selected? I am using the drop down gui in the old sierra style but I am also incorporating the inventory in the same gui so there is essentially an inventory window in the main gui but I am finding that once I click the "Select" icon to pick an item the gui is disappearing and then I have to mouse back up to make it reappear. Is there a way to eliminate the disappearance?

Thanks in advance.

Matt
Title: Re: Can a MouseYPos GUI remain visible after an icon is selected?
Post by: Trent R on Tue 28/04/2009 17:56:20
Change the visibility to 'Normal, initially on' for the gui. Then you'll have to script some code that lets it scroll in in your rep_exec. There was a thread recently that asked this, here (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37421.0).

The behavior you mention is just what happens (AFAIK) with the 'When mouse moves to top of screen' visibility mode.


~Trent
Title: Re: Can a MouseYPos GUI remain visible after an icon is selected?
Post by: RickJ on Wed 29/04/2009 17:28:52
Here is simple example of how to turn such a GUI on when the mouse is over top and off when mouse is away.  It Assumes that hte GUI is at the very to of screen.


*** Global Script ***
function repeatedlt_execute() (

     // Make Y Gui visible
     if (mouse.Y<gMyGui.Height) {
          gMyGui.Visible = true;
     }
     else {
          gMyGui.Visible = false;
     }
)


To make it slide in and out of view it wouold be necessary to increment/decrement the Gui's Y position eaqch scan until it got to the desired position.