Is it possible to change the Text Color attribute of a Text Window GUI from within a script?
(Found this post (http://www.adventuregamestudio.co.uk/forums/index.php?topic=33569.msg435715) from 2008, but no definitive answer was provided.)
Thanx,
-arj0n
Can't you just use
textBoxName.TextColor = int color
where you switch "textBoxName" with the name of the text window, and "int color" with the number of the color you want to change to?
Nope, that would only work for a regular GUI that does contain a text box.
In my case it's about a Text Window GUI, which does has a text property which apparently cannot be set/changed via scripting (?)
I see ???
I'm using these for my dialog text GUI (that what you are after? if not ignore me (laugh)).
game.read_dialog_option_color
game.dialog_options_highlight_color
Sorry, Cassiebsg, that's not what I am after.
In the editor, go to the 'explore project' panel.
In the GUIs section, rightmouse click on GUIs and add New Text Window GUI.
When you open this new gui, you will see the following attributes in the Appearance section:
* BackgroundColour
* BackgroundColourNumber
* BackgroundImage
* Padding
* TextColor
Now when you are in a script, either global or local, you can't set these Appearance attributes for this (type of) GUI.
(You can set the BackgroundGraphic though.)
You can of course change in-game the text window to use as the Display which has the color you want.
Something like:
SetTextWindowGUI(14); // change 14 to the text window gui number you want to use.
Yeh, that's what I've done, but I was still wondering if it's possible to change the textcolor attribute from within a script...
I guess it cannot be done that way...
Only way I can see to do that is create a different text window gui with each of the different colors you will use then switch between them.
That's what I did. But that way I had to create 10 variants for each only because of a different text color... :(