User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Multiple colours in a string?

  1. #1
    Clicker Fusion 2.5 (Steam)
    GamerH2's Avatar
    Join Date
    Jul 2015
    Location
    Brazil
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Multiple colours in a string?

    It is possible to display multiple colours in string?

    I need this!!!

  2. #2
    Clicker Fusion 2.5 (Steam)
    GamerH2's Avatar
    Join Date
    Jul 2015
    Location
    Brazil
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bump bump, the mister bump

    It is possible to display multiple colours in string?

    I need this!!!

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,157
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    you'd probably need a second delimiter to mark the string end
    or indicate the string length that you would like to "color"


    i.e. "today I ate an ^3apple^"

    is the number "3" a fixed length number?
    could it be more digits than just one?

    you could simply use the parser (or tokenizer)
    to split the string at ^
    start a loop elementcount times

    on this loop:

    if element is even
    >> set font color to 0
    >> add elementstring to the rich text editor

    if element is odd
    >> set font color to >>> color code relative to val(left$(element,1))
    >> add right$(elementstring,len(elementstring)-1) to the rich text editor

    I can make an example maybe tomorrow if you need, got to go soon

  4. #4
    Clicker

    Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    J3sseM's Avatar
    Join Date
    Feb 2013
    Location
    Finland
    Posts
    868
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hot damn schrodinger if that works you're genius!




    Oh, I forgot you already are!

    But seriously, you're such an asset for CT and the community. Thanks for being around helping the fellow Clickers.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,157
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Jesse you're too kind man,
    I confess I have fun doing examples and trying to solve problems I never encountered before
    this really helps improving one's skills and also "logical-thinking", "problem-solving", this kind of stuff
    (but sometimes this doesn't fit well with lack of time...!)


    That *should* work (and be probably improved!),
    if GamerH2 needs an example I could probably provide one later

  6. #6
    Clicker Fusion 2.5 (Steam)
    GamerH2's Avatar
    Join Date
    Jul 2015
    Location
    Brazil
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Needs an example. What you have say are so confusing

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,157
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Here you go:

    color_string.mfa

    setup your color list doubleclicking the hidden list on top of frame (first entry will be default color)
    each entry can be referenced as a progressive number and contains RGB values of the color
    ^2= second line
    ^3= third
    etc.

    this will work for a single-digit list of colors (up to 9)
    if you need more you can slightly modify the example to fit two digits or more

  8. #8
    Clicker Fusion 2.5 (Steam)
    GamerH2's Avatar
    Join Date
    Jul 2015
    Location
    Brazil
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No. I need to do this in string object.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The string object only has support for one color unfortunately.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,157
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    would say the same as answers above,
    though creating different strings / setting their color would probably be a pain to properly "format" (wrap, newlines etc.)

    I would rather look into text blitting if I had to look for the kind of "display flexibility" you probably need the string object for

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Changing colours
    By Monokkel in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 3rd November 2010, 01:05 AM
  2. Global string multiple conditions
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 9th April 2010, 10:07 PM
  3. Multiple colours in a string
    By uprize in forum Multimedia Fusion 2 - Technical Support
    Replies: 26
    Last Post: 28th March 2010, 01:54 AM
  4. Setting Multiple source strings in String parser
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 1st March 2009, 07:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •