[Textbox] How do I change text color of a single line?

0 favourites
  • 5 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • I have read the section "Styling Textbox objects" textbox manual in scirra.com/manual/117/textbox but I can't find a way to make only a line in the text box to be colored. Is it even possible?

    I would like it to look something like this:

    ------------------------------------------------------------------

    Enemy is approaching

    You received an item

    ------------------------------------------------------------------

    Or even better only a piece of string in a line:

    ------------------------------------------------------------------

    Enemy: is approaching

    You: received an item

    ------------------------------------------------------------------

    I have tried to use the "Set CSS style" action to change the text color but it changes the color of every single text which is what i don't want. It looked something like this:

    ------------------------------------------------------------------

    Enemy is approaching

    You received an item

    ------------------------------------------------------------------

    Any help would be appreciated

  • This is very easy to do but difficult to explain. Ill try to upload a capx for you in a bit.

    Edit:

    Look at the image below and adjust it accordingly to suit your game. Hope that helped.

  • Thank you for helping. But I think you misunderstood my problem.

    I'm trying to change the color of a single line of text in a Textbox and not a Text

    I attached a screenshot of my textbox

  • It would be the same concept. Just add the colour change before the text is added.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If i use the "Set CSS style" action for my Textbox then everything will become red

    The only option i can think of right now is making a new Text object for every message sent instead of using the Textbook object which would be a hassle

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