• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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