Guest User

Untitled

a guest
Apr 17th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. function widget:GetInfo()
  2.   return {
  3.     name      = "special texture draw test",
  4.     desc      = "http://springrts.com/phpbb/viewtopic.php?f=23&t=30196",
  5.     author    = "knorke",
  6.     date      = "2013",
  7.     license   = "horses. horses everywhere.",
  8.     layer     = -3,
  9.     enabled   = true
  10.   }
  11. end
  12.  
  13.  
  14. local wat =
  15. {"$shadow",
  16. "$specular",
  17. "$reflection",
  18. "$shadow",
  19. "$shading",
  20. "$grass",
  21. "$heightmap",
  22. "$minimap",
  23. "#20",
  24. "%20:0",
  25. "$info",
  26. }
  27.  
  28. function widget:DrawScreen()
  29.     local i = 1
  30.         for y = 700, 0, -250 do
  31.         for x=100, 1024, 250 do    
  32.             drawThing (x,y, wat[i], i)         
  33.             i = i +1
  34.             if i > #wat then return end
  35.         end
  36.     end
  37. end
  38.  
  39. function drawThing (x,y,s, i)
  40.     gl.Texture(s)
  41.     gl.TexRect (x, y, x+200, y+200)
  42.     gl.Text (i..")" .. s, x,y-20, 20)
  43.     gl.Texture (false)
  44. end
Advertisement
Add Comment
Please, Sign In to add comment