Guest User

Untitled

a guest
Sep 29th, 2017
57
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- soda bug
  2.  
  3. -- if two soda lists have the same width, height and parent, then the first will display as the second
  4.  
  5. function setup()
  6. Soda.setup()
  7. listRax()
  8. end
  9.  
  10. function draw()
  11. --do your updating here
  12. pushMatrix()
  13. Soda.camera()
  14. drawing()
  15. popMatrix()
  16. end
  17.  
  18. function drawing(breakPoint)
  19. --in order for gaussian blur to work, do all your drawing here
  20. background(40, 40, 50)
  21. sprite("Cargo Bot:Game Area", WIDTH*0.5, HEIGHT*0.5, WIDTH, HEIGHT)
  22. Soda.draw(breakPoint)
  23. end
  24.  
  25. --user inputs:
  26.  
  27. function touched(touch)
  28. if Soda.touched(touch) then return end
  29. --your touch code goes here
  30. end
  31.  
  32. function keyboard(key)
  33. Soda.keyboard(key)
  34. end
  35.  
  36. function orientationChanged(ori)
  37. Soda.orientationChanged(ori)
  38. end
  39.  
  40. function listRax()
  41. local panel = Soda.Window{
  42. title = "Unit Designer",
  43. hidden = false,
  44. x=0, y=0.5, w=0, h=0.7,
  45. blurred = true, --style = Soda.style.darkBlurred, --gaussian blurs what is underneath it
  46. shadow = true,
  47. shapeArgs = { corners = 1 | 3 | ~4 }
  48. }
  49. local unit_names = Soda.List{
  50. parent = panel,
  51. x = 20, y = 20, w = .3, h = -140,
  52. --text = getNames(rax),
  53. text = {'a','b','c'},
  54. default = 1}
  55. local x = 1024*.3
  56. local unit_keys = Soda.List{
  57. parent = panel,
  58. x = .6, y = 20, w = .3, h = -140,
  59. --text = getKeys(rax, unit_names.default)}
  60. text = {'d','e','f'}}
  61.  
  62.  
  63.  
  64. end
RAW Paste Data