[ISubPalette, “ZPlugin:ZBC Syntax Highlighting”]
[VarDef, features(5), “”]
[VarSet, features(0), “Colorizes commands, variable names, qoutations, comments and memory blocks.”]
[VarSet, features(1), “Capitalizes command names according to the ZScriptCommandsList.txt, making you look like a pro!”]
[VarSet, features(2), “Detects tabs in your code and indents accordingly.”]
[VarSet, features(3), “Prevents character combinations that will cause a smiley to appear on ZBC.”]
[VarSet, features(4), “A couple of themes, 2/3 of them horrible, and a choice of 3 font sizes!”]
// Coming soon: [VarSet, features(5), “Detection of memory block creation commands and highlighting of the memory block name”]
[VarSet, numberOfFeatures, [VarSize, features]]
[IButton, “ZPlugin:ZBC Syntax Highlighting:Show Amazing features”, “This will show you amazing features.”,[Loop, numberOfFeatures,
[Note, [StrMerge, "Feature ", featureID + 1, ": ", features(featureID)]]
, featureID]
, 0, 1, , /BUTTON ICON/, .2] // End of IButton
Or put another way…
[ISubPalette, “ZPlugin:ZBC Syntax Highlighting”]
[VarDef, features(5), “”]
[VarSet, features(0), “Colorizes commands, variable names, qoutations, comments and memory blocks.”]
[VarSet, features(1), “Capitalizes command names according to the ZScriptCommandsList.txt, making you look like a pro.”]
[VarSet, features(2), “Detects tabs in your code and indents accordingly.”]
[VarSet, features(3), “Prevents character combinations that will cause a smiley to appear on ZBC.”]
[VarSet, features(4), “A couple of themes, 2/3 of them horrible, and a choice of 3 font sizes!”]
// Coming soon: [VarSet, features(5), “Detection of memory block creation commands and highlighting of the memory block name”]
[VarSet, numberOfFeatures, [VarSize, features]]
[IButton, “ZPlugin:ZBC Syntax Highlighting:Show Amazing features”, “This will show you amazing features.”,[Loop,numberOfFeatures,
[Note, [StrMerge, "Feature ", featureID + 1, ": ", features(featureID)]]
, featureID]
, 0, 1, , /BUTTON ICON/, .2]
[HR][/HR]
Hi,
As you can see above I have managed to create a test for epilepsy or at the very least a showcase of my poor choice of colors ( apart from the green I actually like the second one ).
How did I do it? With a webpage called ZBrushCentral Syntax Highlighter.
I am not quite finished with the page so I could still use some feedback. Testing the Syntax Highlighter with your own code and posting it here would help a lot or if you don’t feel comfortable with that you can do a test in a thread that you never publish. Suggesting color themes would also help, but keep in mind that the colors must be displayed on a background of #333333, the background color of ZBC posts.
Single line comments are fine ( // ) but I have a feeling multi-line comments ( /* */ ) that actually span multiple lines, might become an issue. They seem to work fine in tests, but like most forums ZBrushCentral probably does some cleanup when a post is no longer editable, like removing empty INDENT tags? I hope Aurick can chime in on this.
So, how do you actually use it?
- Go to the [ZBrushCentral Syntax Highlighter](http://markoshea.dk/zscript-documentation/zbc-syntax-highlighting.html) page.
- Copy / paste your ZScript.
- Preview the font size and theme you want.
- Copy the BB Code ( Bulletin Board Code ).
- Back on ZBrushCentral reply to this thread or make your own and enter source mode (top left button of the new post interface)
- Paste the BB Code and exit source mode.
- Submit post and be happy that you have blinded someone with my terrible TVCode color theme.
I am open to suggestions so please try it out and let me know of any improvements you would like to see.
Take care,
ps. No, the other links on ZBrushCentral Syntax Highlighter are not yet active.