Force "Top Of Screen" GUI Visible temporarily

Started by SilverSpook, Sat 02/05/2015 00:04:09

Previous topic - Next topic

SilverSpook

I have a GUI at the top of the screen similar to the default AGS GUI  whose visibility is set to, "When mouse moves to top of the screen."

I want to have this GUI visible temporarily during an intro portion of the game while I'm explaining what the GUI buttons do. 

I tried setting the GUI's "Visible" parameter to true but it seems to stay invisible.  I tried setting the mouse cursor to the top of the screen, but the mouse.x and mouse.y are read-only, it says.

Is there a way to force this GUI to show for a bit?

Thanks

xil

I'm certainly no expert but a quick hack could be to set the PopupYPos coordinate to the height of the resolution perhaps?
Calico Reverie - Independent Game Development, Pixel Art & Other Stuff
Games: Mi - Starlit Grave - IAMJASON - Aractaur - blind to siberia - Wrong Channel - Memoriae - Point Of No Return

Mandle

Quote from: xil on Sat 02/05/2015 00:19:31
I'm certainly no expert but a quick hack could be to set the PopupYPos coordinate to the height of the resolution perhaps?

That might do it. But I'm concerned that it might only make the menu appear if the player moves the mouse. I don't know for sure though.

I would probably just take a screenshot of the game with the GUI visible and use that to make a dummy GUI which looks exactly the same as the real one. Then make that visible during the tutorial instead of the actual one.

There's probably a better way though.

SilverSpook

I did consider doing that, Mandle, although I figured there might be something simpler, and less likely to have issues if anything about the UI changes.  Thanks for the suggestion though.

Crimson Wizard

#4
Set visibility style to normal, and script the behavior yourself.

Simple example:
Code: ags

function repeatedly_execute()
{
    if (!InTutorial)
    {
        if (gGui1.Visible && mouse.Y > 40)
            gGui1.Visible = false;
        else if (!gGui1.Visible && mouse.Y < 40)
            gGui1.Visible = true;
    }
}

Mandle

See...I knew someone who knew what they are talking about would come along soon!

Cheers Crimson Wizard! I learned something today too!

SMF spam blocked by CleanTalk