How to make text the ability to change colors?

dondan89dondan89 Member Posts: 150
edited January 2012 in Working with GS (Mac)
Hello,

How to make text the ability to change colors?

Like I want users to have the ability to change colors on text, so it not only be black, how can I do that?

Thank you

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited January 2012
    you mean at runtime or just select a differnt color? in the display text behavior theres the color option so you can change it to whatever. But if you mean at runtime have a text attribute called textColor and change that to the name of the color you want the text to change to. For example if you want to press a button and want the text to change to red, have when touch is pressed change textColor to red.

    Now youll need seperate rules for each posible color with a display text in each like so:

    when textColor=red display text with the red color selected in the behavior
    when textColor=blue display text with the blue color selected in the behavior

    and so on.

    You can even take it one step further and dynamicaly change the actual text thats displayed by having a attribute called setText. Inside all your display text behaviors have it display the setText attribute. Then change the setText attribute to whatever text you want it to display.

    cheers
  • dondan89dondan89 Member Posts: 150
    ok i will try now to see if i can do it or i might need a template
  • dondan89dondan89 Member Posts: 150
    edited January 2012
    I did mean that i want users to put text on the color I want them put text, so if i want them to put red text they have to put red, if i want them to blue then blue it is, also if you have time can you give me a small template about this?

    thank you
Sign In or Register to comment.