Dialog with buttons

Started by CharleeMK, Tue 22/07/2025 18:51:32

Previous topic - Next topic

CharleeMK

I'm sure this is totally a noob question but I'm getting crazy trying to have working buttons with my dialog. Is there any chance to enable another GUI while the Dialog is on?

Crimson Wizard

#1
No, you cannot have any GUIs active during a dialog.

If you like to have buttons for dialog options, look into the Custom dialog options rendering:
https://adventuregamestudio.github.io/ags-manual/CustomDialogOptions.html
Or use existing module:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-customdialoggui-1-9/

If you want certain game GUIs to work along with the dialog, then you'll have to either script your own custom dialog system, or script particular scene without a use of a standard dialog. I cannot give any other advice here without knowing details about what you are trying to do. Please tell more about your case and goal.

CharleeMK

Thanks so much for the quick response. Yes, I saw both solutions that you mention but I was hoping for a easier one cause I couldn't believe that such a "simple" feature wasn't built in the engine. Also as I don't have any programming background at all I saw them a little too complicated to implement due to my absence of skills. Well, I guess that if I want those damn buttons I'll have to earn them by learning.

Thanks again Crimson Wizard, I'll follow your advice

Crimson Wizard

I still don't know what were you trying to do, but if you like to use GUIs in dialog, here's another method.

Dialogs may have their options turned on and off, and there's also a rule that if only 1 option is enabled at a time, then it's run automatically as soon as Dialog starts.

In summary the method therefore is this:
1. Disable all dialog's options.
2. Bring your GUI on and let player do something with it.
3. Depending on player's actions, enable a single dialog option, and start a dialog.
4. After dialog stops, disable that option and continue.

Khris

What are the buttons supposed to do? Maybe there is in fact a simpler way of achieving whatever it is you're trying to implement but we're fishing in the dark right now.

CharleeMK

I want one button to stop the dialog an another to go back to the previous dialog, that's it, no scrolling or fancy stuff. I know that the easiest way is using the dialog options for that but I wanted to include those buttons for design reasons.

Khris

I don't think there's a way to do this without custom dialog rendering. You essentially need to draw the buttons when you draw the dialog lines (dialog_options_render), then manually check the mouse position versus the button (dialog_options_repexec) and mouse button state (dialog_options_mouse_click).

Rik_Vargard

Quote from: CharleeMK on Yesterday at 07:35:10I want one button to stop the dialog an another to go back to the previous dialog, that's it, no scrolling or fancy stuff. I know that the easiest way is using the dialog options for that but I wanted to include those buttons for design reasons.

If you just need those two buttons, you could have two normal dialog GUIs and then add a GUI under that with those two buttons and then have the dialog GUIs being Visible or not by clicking on the buttons?

If you need a dialog GUI with all options being buttons, you could create a GUI and the buttons you place in it. Then you could make the option buttons visible or not when choosing options. Then you could even add those two buttons to make those GUIs Visible or not again.

CharleeMK

I already tried with two GUIs, one for the Dialog and another for the buttons but when the dialog is running any other GUI won't work. My initial thinking was to try to enable player interface when dialog is on or the GUI with the buttons but I couldn't find the way to do neither of those things. I think I'll try the custom dialog rendering so I'm reading the whole scripting tutorial to understand better how to do it.

Also I saw that the Custom Dialog GUI module may achieve what I'm looking for but again, I think I need to understand much better the script to know what might suit my needs and what not, so back to the manual.

Thanks so much for all the help. Now I have a lot of reading and learning to do but whenever I make this thing work properly I think I'll post the script here in a way other noobs like me can understand it.

SMF spam blocked by CleanTalk