• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

If I want use [Jass] and [Trigger] on my Blog?

Status
Not open for further replies.
The algorithm for GUI is to get the lowest non-zero number of spaces in the beginning of the lines and considering that to be one tab. On each line, you would loop through all the tabs and if the current tab happens to be the last one before the actual text, you would create a
joinbottom.gif


Sometimes, you have to use a
joinminus.gif
if the line has the keywords Events, If, Then, etc...
And you'd have to register a click event. When it's clicked, you would change it to
joinplus.gif


Note: If there's nothing within that block, you would just use a
joinbottom.gif


Whenever you encounter a keyword in the beginning of the line, you would place an image corresponding to that key.

Set corresponds to
set.gif
, Unit corresponds to
unit.gif
, etc...

Eventually, you'd have to loop vertically to see if any
line.gif
need to be placed. If you ever have a
joinminus.gif
or a
joinbottom.gif
, you would have to place one
line.gif
while making sure that the tab index for each of the images is the same. (But since you're iterating vertically, you wouldn't have to do that.)

There are other things of course, but I'm not giving you a full algorithm because that would be taking the fun out of it :p

As for Jass, you would just need to search for keywords and color or bold-face them after creating a white background. :D

I came up with the GUI algorithm myself ^^
 
Status
Not open for further replies.
Top