WoWInterface - View Single Post - Scorpio.UI - a new ui & skin system
View Single Post
10-15-20, 02:10 AM   #8
A Flamescale Wyrmkin
Join Date: Aug 2011
Posts: 143
Click image for larger version

Name:	Api.png
Views:	97
Size:	558.7 KB
ID:	9498

Just finished the new Cube, it's browser is using the SimpleHtml to show the contents, the main problem is how to simply generate the contents, since we need a complex string concat to generate the html.

I used a trick from my web framework called template string, so the Lua code can be embed into the string, and used to generate the html.

For the example in the pic, the template string is:


And the code that use it to generate the result is :


Just like build a tiny website in the game.

The template string's doc is on PLoop/template-strings if it interesting you.
  Reply With Quote