Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Vincent on Sat 18/10/2014 19:10:45

Title: Within the script
Post by: Vincent on Sat 18/10/2014 19:10:45
Hello guys, good evening to all.

I was wondering to know if it is possible to change the border color of an list box via script...

Thanks in advance.
Title: Re: Within the script
Post by: Crimson Wizard on Sat 18/10/2014 23:25:06
The ListBox border uses the color from TextColor property. Unfortunately that property can not be accessed from script...
There are also few more GUI properties that aren't in script.
Title: Re: Within the script
Post by: Vincent on Mon 20/10/2014 14:28:39
Thanks Crimson Wizard,

I'm sorry because I would like to have access to these properties via script,
although they don't seem so extremely necessary to be inspected by that way.

But strangely I find it in having to do it, but i can not.
Title: Re: Within the script
Post by: Gurok on Mon 20/10/2014 14:39:07
Vincent, set ShowBorder to false on the listbox. You can then fake a border using a graphic. If you just want the border colour to be different from the text (but don't need to change it at runtime), I would suggest incorporating the border into the background graphic of the GUI. If you wanted to get really tricky, you could draw the border on a dynamic sprite and use that. I'm not saying the current system is perfect, but there are workarounds.
Title: Re: Within the script
Post by: Vincent on Mon 20/10/2014 15:02:41
Thanks Gurok for answering.

I was asking if it was possible to change the color border of an listbox by via script... because,
i was not understanding at all if it was possible or not.

I was not asking any workarounds / tricks to do a "fake border using a graphic",
I still know how to do my tricks, :)

but your advice was glowing, thanks, you've been very kind.
Title: Re: Within the script
Post by: RickJ on Tue 21/10/2014 00:59:02
Most people use their own graphics rather than the default border.  IMHO the default border is much like the default GUI controls.  They are there for the sake of functionality and not really meant to have production value in released games.
Title: Re: Within the script
Post by: Crimson Wizard on Tue 21/10/2014 09:22:14
I suppose that if the object's property is available in the editor, it should be available in script too.
This is not a high priority, because has easy workaround using dynamic sprite, but should eventually be implemented, in my opinion.
Title: Re: Within the script
Post by: Snarky on Tue 21/10/2014 12:01:43
While on the subject, it'd also be nice to be able to change the background color of a GUI.
Title: Re: Within the script
Post by: Vincent on Thu 23/10/2014 00:24:56
Quote from: Crimson Wizard on Tue 21/10/2014 09:22:14
if the object's property is available in the editor, it should be available in script too.

For example, on the Label editor there's the Textcolor command and via script too


Quote from: RickJ on Tue 21/10/2014 00:59:02
Most people use their own graphics rather than the default border.  IMHO the default border is much like the default GUI controls.  They are there for the sake of functionality and not really meant to have production value in released games.

You assume that i have my own graphic or that i'm on releasing a game ?