0 Favourites

How do I apply BBCode inside of a Text object?

  • How can I use BBCode to apply style to a certain word in a Text object.

    For example: "<b>Hello</b>, I am a <color=#fff>regular</color> string."

    I don't want to use a million Text instances to accomplish that..

  • How can I use BBCode to apply style to a certain word in a Text object.

    For example: "<b>Hello</b>, I am a <color=#fff>regular</color> string."

    I don't want to use a million Text instances to accomplish that..

    <b>&"Hello"&</b>&", I am a"& <color=#fff>&"regular"&</color>&" string."[/code:2fi2hany]
    
    something like the above if you want to use the code inside the text itself, however Construct doesn't allow css directly in the text you have to manually edit it by events using a text input object and not a text object... and find each specific word and give it a css based on the text case sensitivity, however might be a headache, id just use sprite fonts or sprites directly instead of text, if that is just a message you want to use. 
    
    also it might work with js ... but ehm there not enough tutorials around about this. may i ask what is that you want to achieve? in what context like behavior will be used? that way il probably be able to help better.
    
    to use css on text inputs see this [url=https://www.scirra.com/tutorials/1283/easily-add-css-effects]tutorial[/url] < for C2 runtime and C3. if C3 runtime is not usable yet since is experimental.
    
    edited: i was about to say might be supported in C3 runtime, as Ashley said bellow.
    
    However personally i noticed, C3 runtime might not be compatible with some behaviors or plugins yet since is still in development.
  • It's currently supported in the C3 runtime. It's still experimental so is not in the manual yet but this forum post lists the tags you can use.

  • I read through your post on that yesterday, but I really couldn't figure out how I could implement anything, since there were no examples. I have the experimental features enabled, but I don't see the BBcode option on the Text or Text Input object. Ashley

    I need it to extend my narration text system, the system is already done via the Text object. It's basically a ton of text's getting written inside the Text object at all times. Like a chat being written by just one person and on text object that gets text, writes it and then clears the object, writes once again etc. And I prefer not using Text Input for things like that since, that is a text input and is made for getting input from the user. gamecorpstudio

  • See this blog post for information on how to try the new runtime.

  • Hi Ashley,

    I hope you are doing well. I have a weird question: I am unable to see any links, quotes, images, etc on these forums ... why is this? All I see is shortcode. For example, your last comment in this thread appears like this to me:

    "See this blog post for information on how to try the new runtime."

    Please advise. Thanks!

    Best regards,

    Belal

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • bsweileh

    Hi Ashley,

    I hope you are doing well. I have a weird question: I am unable to see any links, quotes, images, etc on these forums ... why is this? All I see is shortcode. For example, your last comment in this thread appears like this to me:

    "See this blog post for information on how to try the new runtime."

    Please advise. Thanks!

    Best regards,

    Belal

    Ashley has nothing to do with the forum - Tom is the main website guy.

    Also, anything to do with the forum/websites is obviously a 'Website Issue', so please post any issues you may have in the correct location.

    Cheers.

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