GUI grey-out problem

Started by James Kay, Mon 23/02/2004 15:26:57

Previous topic - Next topic

James Kay

I have set up AGS so that the GUI greys out when it can't be accessed.
I also use a custom inventory window.

Now, when I use "LOOK" on an item in the inventory, I switch off the GUI with GUIOff(2); have my charater say something, then switch back on the GUI with, obviously GUIOn(2);
However, at this point the GUI buttons are greyed out until the player moves the mouse cursor over a button, when they pop back to normal again.

Any remedies for this?

Scummbuddy

#1
RawRestoreScreen
RawSaveScreen

and i dont think that will help. so maybe this is a new suggestion, a screen refresh?
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Kweepa

You might be able to hack it by setting the text on a label in the GUI or setting the image on a button or something like that.
Still waiting for Purity of the Surf II

Gilbert

Hmmm I'm not quite sure if I gat your meaning. But did you try putting a Wait(1); line between that GUIoff(... and DisplaySpeech(... and see what happens?

James Kay

No, it's when the GUI is switched back on that the problem occurs. The buttons remains greyed out until rolled over.

Gilbert

Hmmm what did you use for displaying the speech, DisplaySpeech() or DisplaySpeechBackground() or what?

James Kay

Yeah, display speech.
On the top of my head, the "look at" script of an inventory item goes something like:

GUIOff(2);
DisplaySpeech(EGO, "It's a nuclear-thermal long-range missle launcher.");
GUIOn(2);

Then, at the end there, the LOOK, USE and CLOSE INVENTORY buttons on the GUI are greyed out until rolled over.  ???

Gilbert

Strange, okay to me, what mode was that GUI set to? "Normal" or whatever?

James Kay

The GUI is a pop-up one, set to "greyed out" when unusable in the prefs.
I tried UpdateInventory(); and RawSave and ResoreScreen. But to no avail.

I also found that it only stays greyed out if the player moves the mouse cursor in between the GUIOff and GUIOn commands. If I don't move the mouse at all and just carefully click to skip the speech text, the buttons are set to normal when the GUI is switched back on.  ??? ??? ???

Pumaman

can you try with 2.61 beta 1? I think this should be fixed now

James Kay

#10
Coolio. Let you know if it works (but I don't doubt your genius!).  ;D

SMF spam blocked by CleanTalk