Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: suicidal pencil on Tue 08/09/2009 21:38:00

Title: Gui from a script
Post by: suicidal pencil on Tue 08/09/2009 21:38:00
is there any way for me to create a GUI and it's buttons purely from a script, without having to create it in the AGS editor first?
Title: Re: Gui from a script
Post by: Akatosh on Tue 08/09/2009 21:44:22
None I know of, sorry. IIRC, you can't create stuff like objects, characters or GUIs at run-time. You'll have to do a workaround.
Title: Re: Gui from a script
Post by: OneDollar on Tue 08/09/2009 22:35:25
No, you'd have to create a generic GUI with all the lables, buttons etc. you might need, then customise/turn them on or off using script commands before displaying it.
Title: Re: Gui from a script
Post by: NsMn on Tue 08/09/2009 22:37:00
Now that I'm thinkin about this more... is there something like a "Overlay.GetAtXY();"?

Because, then, it WOULD be possible using DynamicSprites and Overlays...
Title: Re: Gui from a script
Post by: Khris on Tue 08/09/2009 22:40:30
Yeah, in theory you could always script everything. It's just a huge load of work.
Do you want to create a module that needs a GUI?
Title: Re: Gui from a script
Post by: suicidal pencil on Wed 09/09/2009 02:22:40
Quote from: Khris on Tue 08/09/2009 22:40:30
Do you want to create a module that needs a GUI?

In the middle of creating it. Currently, the workaround is just having the GUI created, along with the buttons. I'd rather not want someone using it to have to create the GUI, and would rather keep it down to one function call to build the GUI
Title: Re: Gui from a script
Post by: Khris on Wed 09/09/2009 13:42:17
You could include the GUI, then the module's user would just have to import it.