GUI interaction on mouse over

Started by Brian925, Tue 03/01/2023 09:18:21

Previous topic - Next topic

Brian925

Hello,

I have a top bar GUI that appears only when the cursor is at the top of the screen.

 Is there a simple way for a different GUI to be closed upon this action?(when the top bar is revealed).I'm having trouble because the top bar isn't simply visible or not visible, it's dependent on mouse placement.

In a perfect world I'd roll over the top bar to reveal it (gInvbar), and that would close a different GUI.(gRaiseArrow)

Any help is appreciated. Thanks.

Khris

Open GlobalScript.asc and find/add this:
Code: ags
function repeatedly_execute_always()
{
...
}

Put this inside:
Code: ags
  if (gInvbar.Visible && gRaiseArrow.Visible) gRaiseArrow.Visible = false;

eri0o

@Brian925 you can disable that behavior from the top bar by looking into the GUI properties, it has a specific setting there (I forgot the name) that does this behavior. You can disable that and handle it through script, so you would have full control.

Brian925

Thanks guys.
Khris, worked fine, appreciate it.
eri0o, I actually like the function, gives the option to have a tool bar without constantly taking up space, I just have one exception that I was trying to cover.

SMF spam blocked by CleanTalk