Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: isatche on Sun 24/01/2021 11:53:01

Title: [SOLVED] Variable GUI height depending on the number of dialog options?
Post by: isatche on Sun 24/01/2021 11:53:01
 Hello,

I am trying to style the dialog options selection with GUI.

Is it possible to have GUI adjusting height depending on how much dialog options I have?
Sometimes I have a lot of space below and sometimes the options go out of GUI frame.

I am sorry if it's an obvious question, but I tried searching the forum and consulting the help in the engine and couldn't find and answer.

Thank you.
Title: Re: Variable GUI height depending on the number of dialog options?
Post by: Khris on Sun 24/01/2021 13:09:19
If you're using custom dialog options rendering, you can get the .Height from the DialogOptionsRenderingInfo object that is passed to the functions.
Title: Re: Variable GUI height depending on the number of dialog options?
Post by: isatche on Mon 25/01/2021 05:51:05
I have NO idea what any of it means, but it seems like a great starting point to begin exploring.
Thank you!
Title: Re: Variable GUI height depending on the number of dialog options?
Post by: Khris on Tue 26/01/2021 00:09:08
Right :)

People usually use a TextWindowGUI (https://www.adventuregamestudio.co.uk/manual/ags13.htm#TextWin) for their Dialog choices, it will get resized to fit all options automatically.
If you want even more customization, you can use Custom Dialog rendering (https://www.adventuregamestudio.co.uk/manual/ags41.htm#CustomDialogOptions); this basically means that AGS will call a bunch of functions written by you during a dialog. The DialogOptionsRenderingInfo object is passed to these function. See here:
Title: Re: Variable GUI height depending on the number of dialog options?
Post by: isatche on Fri 29/01/2021 08:45:23
That's awesome, thank you very much!