Problem with the funcionality of inv and dialog GUI

Started by Gribbler, Tue 13/01/2009 12:47:36

Previous topic - Next topic

Gribbler

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?


Khris

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.

Gribbler

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?

Dualnames

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

game.min_dialogoptionwidth=50;
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

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.

Dualnames

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)
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Gribbler

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.

Khris

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 :)

Gribbler

Hey, I changed inv gui visibility to normal and it worked. Thanks a lot, Khris.

SMF spam blocked by CleanTalk