Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- soda bug
- -- if two soda lists have the same width, height and parent, then the first will display as the second
- function setup()
- Soda.setup()
- listRax()
- end
- function draw()
- --do your updating here
- pushMatrix()
- Soda.camera()
- drawing()
- popMatrix()
- end
- function drawing(breakPoint)
- --in order for gaussian blur to work, do all your drawing here
- background(40, 40, 50)
- sprite("Cargo Bot:Game Area", WIDTH*0.5, HEIGHT*0.5, WIDTH, HEIGHT)
- Soda.draw(breakPoint)
- end
- --user inputs:
- function touched(touch)
- if Soda.touched(touch) then return end
- --your touch code goes here
- end
- function keyboard(key)
- Soda.keyboard(key)
- end
- function orientationChanged(ori)
- Soda.orientationChanged(ori)
- end
- function listRax()
- local panel = Soda.Window{
- title = "Unit Designer",
- hidden = false,
- x=0, y=0.5, w=0, h=0.7,
- blurred = true, --style = Soda.style.darkBlurred, --gaussian blurs what is underneath it
- shadow = true,
- shapeArgs = { corners = 1 | 3 | ~4 }
- }
- local unit_names = Soda.List{
- parent = panel,
- x = 20, y = 20, w = .3, h = -140,
- --text = getNames(rax),
- text = {'a','b','c'},
- default = 1}
- local x = 1024*.3
- local unit_keys = Soda.List{
- parent = panel,
- x = .6, y = 20, w = .3, h = -140,
- --text = getKeys(rax, unit_names.default)}
- text = {'d','e','f'}}
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement