Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Gribbler on Tue 13/01/2009 12:47:36

Title: Problem with the funcionality of inv and dialog GUI
Post by: Gribbler on Tue 13/01/2009 12:47:36
Hi all

I'm using 320x150 locations with the inventory at the bottom (modified and resized default GUI with the option "always visible") but when a dialog starts it covers that inv gui. What can I do to hide the inv gui when the dialog starts?
My code doesn't work:

function cMarv_Talk()
{
gInventory.Visible = false; 
dMarv.Start();
gInventory.Visible = true;
}

any suggestions?

Title: Re: Problem with the funcionality of inv and dialog GUI
Post by: Khris on Tue 13/01/2009 13:40:57
Dialog.Start() isn't run until the end of the function, so you're turning it invisible, then immediately back to visible, then the dialog is run.
Plus it'd be tedious to have to do that for every talk interaction.

I'm not sure what the problem is, you say your dialog gui covers the inv gui but you still want to turn off the inv gui during a dialog?

Regardless, go to general settings, then
-in Dialog settings, set "Run game loops ..." to false
-in Visual settings, set "When player interface ..." to "Be hidden".

This should do it.
Title: Re: Problem with the funcionality of inv and dialog GUI
Post by: Gribbler on Tue 13/01/2009 13:53:34
thanks for quick reply but unfortunately that didn't help:-( And about the dialog gui covering inv gui, you're right, I didnt clear that up enough. By covering I meant that it covers it partially so you can see than one is displayed on another. What else can be done to overcome this problem? Maybe there is a possibility to resize the dialog gui so it covers up inv gui entirely?
Title: Re: Problem with the funcionality of inv and dialog GUI
Post by: Dualnames on Tue 13/01/2009 14:30:07
Quote from: Gribbler on Tue 13/01/2009 13:53:34
thanks for quick reply but unfortunately that didn't help:-( And about the dialog gui covering inv gui, you're right, I didnt clear that up enough. By covering I meant that it covers it partially so you can see than one is displayed on another. What else can be done to overcome this problem? Maybe there is a possibility to resize the dialog gui so it covers up inv gui entirely?

But yes you can resize and reposition the dialog GUI.

game.dialog_options_x:
Offset into dialog options GUI to compensate for borders

game.dialog_options_y:
Offset into dialog options GUI to compensate for borders

game.max_dialogoption_width:
Maximum width of textwindow-based dialog options box. Default 180.

game.min_dialogoption_width:
Minimum width of textwindow-based dialog options box. Default 0.

example:

game.min_dialogoptionwidth=50;
Title: Re: Problem with the funcionality of inv and dialog GUI
Post by: Khris on Tue 13/01/2009 15:12:07
Dualnames: How will any of that increase the DialogGUI's height?

Gribbler: Could you be a little more specific? What didn't work? The inv GUI didn't disappear?
You can add empty options to your dialogs (check Show but uncheck Say) and call just "return" if they are selected; the player shoudn't even notice that there are empty, clickable options that way. It's not pretty but should work.
Title: Re: Problem with the funcionality of inv and dialog GUI
Post by: Dualnames on Tue 13/01/2009 15:23:24
Quote from: KhrisMUC on Tue 13/01/2009 15:12:07
Dualnames: How will any of that increase the DialogGUI's height?

Gribbler: Could you be a little more specific? What didn't work? The inv GUI didn't disappear?
You can add empty options to your dialogs (check Show but uncheck Say) and call just "return" if they are selected; the player shoudn't even notice that there are empty, clickable options that way. It's not pretty but should work.

Oh..right he needs the height. Sometimes I think I'm not reading. 8)
Title: Re: Problem with the funcionality of inv and dialog GUI
Post by: Gribbler on Tue 13/01/2009 16:19:05
Yes, inv gui didn't disappear and dialog is displayed on it. Dialog gui covers about 60% of inv gui. It looks like a big black rectangle (with dialog lines) is displayed on the inv gui. I didn't tried adding empty options, there must be a way of resolving this in other, well, subtle way.
Title: Re: Problem with the funcionality of inv and dialog GUI
Post by: Khris on Tue 13/01/2009 17:43:39
After adjusting the settings I mentioned in my other post, could you try setting the invGUI's Visibility to Normal, initially on? I think the always on-setting overrides the being hidden during blocking events.

If your game has lots of blocking actions and you don't like the invgui hiding and showing constantly, do what I should've told you from the start:
Create a black GUI that covers the invGUI, then set it as dialog GUI in the General settings :)
Title: Re: Problem with the funcionality of inv and dialog GUI
Post by: Gribbler on Tue 13/01/2009 22:07:07
Hey, I changed inv gui visibility to normal and it worked. Thanks a lot, Khris.