Within the script

Started by Vincent, Sat 18/10/2014 19:10:45

Previous topic - Next topic

Vincent

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.

Crimson Wizard

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.

Vincent

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.

Gurok

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.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Vincent

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.

RickJ

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.

Crimson Wizard

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.

Snarky

While on the subject, it'd also be nice to be able to change the background color of a GUI.

Vincent

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 ?

SMF spam blocked by CleanTalk