Text with more then one color

0 favourites
  • 4 posts
From the Asset Store
OpenAI TTS
$10 USD
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • Hi,

    How to create a text object which has more then one color (designer could assign the color of each character)? It seems only one color in a text object.

    For example,

    <font color="red">Hi

    <font color="blue">Hi

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey,

    The code of the text plugin doesn't seem to enable such a behavior. Only once color is saved in the object, the only function setting the color is overwriting it, and it is only used 2 times in the whole object : savetoJSON, and draw, witch fills the whole text with the selected color. Sounds like this needs a specific plugin for such a behavior, or multiple texts :/

  • Guizmus

    Since Ashley said Please do not adjust official plugins or behaviors, it is better to build this feature in official text plugin. I thought it could change color by added some code.

  • rexrainbow

    I know creating copies of a built-in plugin or behavior is bad, I don't suggest you do it at all, but you know this a lot better than me.

    I spent some more time inside this plugin code though, and I don't see any way of doing what you describe with the core plugin without adding any javascript.

    Of course, creating a "text_ext" behaviour that would overwrite the draw function could do the trick too, but I have hard time finding a good way to store texts and color in the behavior parameters.

    There seem to be another way though, by creating a plugin that would automatically create N text objects and manipulate himself, each text object being of one color only. This would require, for what I know, to link the 2 object types at the start of the layout (a little like this plugin) so the "multicolored text" would know what to create. This could be impossible to propagate the Pin behavior though, no idea, you may know better.

    Sorry if this didn't help, I tried my best ^^

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