changing font color for the displayat command

Started by jamesreg, Thu 15/10/2009 14:25:30

Previous topic - Next topic

jamesreg

I been looking around for this but find multiple answers all different and most about text windows.

All I am doing is using the displayat command to display text to a certain location so it appears to be written on a gui

I need to know how to change that font color Im not using a text box or anything just the displayat command

jamesreg

#1
Quote from: jamesreg on Thu 15/10/2009 14:25:30
I been looking around for this but find multiple answers all different and most about text windows.

All I am doing is using the displayat command to display text to a certain location so it appears to be written on a gui

I need to know how to change that font color Im not using a text box or anything just the displayat command

Ok just checked and guess even though i didnt remember creating a text window gui one exist and its font color is set to whats displaying now so I guess its using that

so basicaly I need to know eighter how to tell that text window gui to change font colors or how to call it up

SetNormalFont(..)  was the command someone said to do on another post but says it does not recognize this command

sorry didnt mean to double post this now it wont let me delete my own message so sorry.

also if it is not simple to just change the font back and forth in script is it possible to have multiple text window gui and have them different font colors and switch to them easily in script

NsMn

Have you activated "Enforce object-based scripting"?

jamesreg

#3
Quote from: NsMn on Thu 15/10/2009 15:11:13
Have you activated "Enforce object-based scripting"?

it is set to true but I dont know what it does

I have it working the way I want it displays the text down on the regular gui im wanting it to display the text on
and it waits till mouse click to display next text this is all im wanting it to do and it works fine

I guess its using a text window gui text color as the text color

so basicaly I need to know how i change that text color back and forth as I need.

or if i can have multiple text window gui and switch back and forth to do the same thing.

I am displaying my text with the displayat command if there is another way to do it and be able to still pause the text
between displays and make it view on my gui like im doing then im open to that

I tried text overlay but that appears under my gui and cant seem to get it to display on my gui

I know this is simple and the simple things seems to be the hardest things to figure out lol

Khris

Use a custom TextWindow GUI, set its border image to a 1x1 pixel of the desired color, then change it's foreground color to the text color you want to use.

jamesreg

#5
Ok I have the text color in the settings panel set to a blue color which is what displays now
and I created a 1x1 pixel of red

i added that as the gui background image

I then scripted

gTextbox.BackgroundGraphic=268;

268 Being the sprite number the red dot is

text stays blue

I am assuming background image is what was meant as its the only place in gui panel to display an image

Khris

I believe you need to right-click the GUI and select the "make text window" option.
You'll end up with eight corner images.

I just saw that this is explained in the first paragraph in the manual's explanation I linked you to...

SMF spam blocked by CleanTalk