How do I use different styles within the textbox?

0 favourites
  • 5 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • I am using it as a chat window and would like different messages to have different colors. Maybe there is a way to add a class or id name to certain messages and then override their style but I can't find such an option.

    Is this achievable?

    Thanks

    Tagged:

  • I believe this might help:

    Set a variable to a string with the color name - this can be changed at any time so you can update colors whenever you need to. Simply add a [color=variable] .. text..[\color]

    This video will go into some detail for you

    youtu.be/wda5h_QcX5U

  • Hey, thank you so much :) I didn't know that textboxes support bbcode, this makes things naturally much easier!

  • I believe this might help:

    Set a variable to a string with the color name - this can be changed at any time so you can update colors whenever you need to. Simply add a [color=variable] .. text..[\color]

    This video will go into some detail for you

    https://youtu.be/wda5h_QcX5U

    so I tried this solution but it seems that textareas don't support bbcode, but textinputs do like shown in your video. I would need to use a textarea for the automatic scrolling behaviour which is missing with textinputs.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hmm Sadly I don't know anything about Text Areas off hand but If you want to link some of your code I can try to look into it for you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)