Inv GUI clickable=false but get Wait if clicked on problem

Started by steptoe, Mon 18/06/2012 06:26:53

Previous topic - Next topic

steptoe

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()
Code: ags


// 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




Andail

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.

steptoe

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.




Khris

Try this:
Code: ags
  gInventory.Clickable = !(gPanel.Visible || gRestoreGame.Visible || gSaveGame.Visible);

steptoe

Cheers

Khris, used disable control buttons on Inv GUI.

I will look into what you have put.

Many cheers

SMF spam blocked by CleanTalk