User Tag List

Results 1 to 5 of 5

Thread: Syntax Colors

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,734
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Syntax Colors

    Hello everyone, Just another poopy problem.

    I know how to color syntax in the Rich Text Object, but what method do use after saving the file and reloading the same file. All the colored syntax defaults to black text when you load to file back in to the Rich Text Object.

    For an example:
    [color:#000099]<P> [/color] for HTML.

    Any ideas or thoughts?
    Thanks,

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Syntax Colors

    So you do all sorts of "local" syntax coloring as the user types the HTML?
    You just have to do it all over from the beginning of the document.

    MMF1.5 had a String Looper extension I found useful for my syntax coloring in my old HTML Forge html editing program. It worked like a fastloop but I could get the current character the object was looping. So when it met a '<' I stored the position in a counter and when it met a '>' I colored everything from the value in the counter to the current position in one color. That way all the tags got colored. I also had coloring for attributes in the tags in different colors.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,734
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Syntax Colors

    Thanks Andos for the tip. It will be as the user is typing and from buttons the user can press to place HTML code. All the HTML code would be one color. But on the flip side when loading the file, there is no extension that I know of for MMF2 that could assist me with this. I think that a code like "if text=" is out of the question as it would color all the text. Maybe find some way of using a qualifier and looping through the loaded text some way.

    This would be valuable for other editors as well.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Syntax Colors

    Try the Scintilla object beta: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=131527#Post1315 27

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,734
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Syntax Colors

    Thanks Jamie, I will give that a try.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. Syntax highlighting
    By Looki in forum Extension Development
    Replies: 5
    Last Post: 22nd October 2015, 05:06 PM
  2. ini++ subgroup syntax
    By keokeo in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 21st February 2011, 10:55 PM
  3. Red Syntax Text
    By olltwit in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 31st May 2010, 08:02 PM
  4. Set key syntax
    By Shmuper in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th May 2010, 08:19 AM
  5. Syntax Checker
    By LazyCoder in forum Hardware Accelerated Runtime
    Replies: 3
    Last Post: 7th March 2008, 11:20 PM

Posting Permissions

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