Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: steptoe on Mon 18/06/2012 06:26:53

Title: Inv GUI clickable=false but get Wait if clicked on problem
Post by: steptoe on Mon 18/06/2012 06:26:53
Hi

I seem to have a technical hitch. With the below code if I click somewhere on the Inv Gui it brings up the dreaded continual Wait cursor if I have Save/load GUI open.

In Global function repeatedly_execute_always()


// IF GUI'S VISIBLE

    if (gPanel.Visible==true)
    {
    gInventory.Clickable=false;
    }
    else if (gRestoreGame.Visible==true)
    {
    gInventory.Clickable=false;
    } 
    else if (gSaveGame.Visible==true)
    {
    gInventory.Clickable=false;
    }
    }


Can you help resolve?

cheers



Title: Re: Inv GUI clickable=false but get Wait if clicked on problem
Post by: Andail on Mon 18/06/2012 09:22:52
Can you describe how it's set up initially, and how all these GUIs are arranged?

If you don't want to allow the player to operate the inventory when those various save, load etc GUIs are visible, why not use the GUIControl.Enabled instead? Setting clickable as false will render the GUI "transparent", but it won't absorb the clicks.

If you want the Save button, or whatever it is you're using, to be the only clickable thing on the screen, simply set a background GUI to cover the entire screen, but make it transparent (=invisible), and don't let it respond to any clicks.

Just some thoughts.
Title: Re: Inv GUI clickable=false but get Wait if clicked on problem
Post by: steptoe on Mon 18/06/2012 10:11:43
Andail

well, I have the inventory GUI visible all the time. When user clicks 'Options' on the Inventory it opens the Control Panel. When the Control Panel is visible the Inventory should not be clickable (should be disabled). It is reset when Control Panel is closed. This applies to Load and Save GUI's as well.



Title: Re: Inv GUI clickable=false but get Wait if clicked on problem
Post by: Khris on Mon 18/06/2012 11:19:24
Try this:
Code (ags) Select
  gInventory.Clickable = !(gPanel.Visible || gRestoreGame.Visible || gSaveGame.Visible);
Title: Re: Inv GUI clickable=false but get Wait if clicked on problem
Post by: steptoe on Mon 18/06/2012 11:42:19
Cheers

Khris, used disable control buttons on Inv GUI.

I will look into what you have put.

Many cheers