Advertisement
lavalevel

read ID from a button press

May 7th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1.  
  2. local ButtonPress_processEffect = function(event)
  3.  
  4. local id = event.id
  5. print ("id:".. id)
  6. -- print ("ActiveEffect:" .. ActiveEffect)
  7. -- shape1.fill.effect = "filter.".. ActiveEffect
  8. print ("well we are here...")
  9. end
  10.  
  11. local function EffectMenu()
  12.  
  13. --display.setDrawMode( "default" )
  14. print ("effect menu")
  15.  
  16. ButtonGroup_Effects= display.newGroup()
  17.  
  18. Btn_Effects_Pixel = widget.newButton
  19. {
  20.     id = "pixelate",
  21.     defaultFile = "images/Btn_Effect_Pixel_Up.png",
  22.     overFile = "images/Btn_Effect_Pixel_Down.png",
  23.     label = "PIXEL",
  24.     settings =
  25.     {
  26.         min=2, max=20, startAt=20
  27.     },
  28.     labelColor =
  29.     {
  30.         default = { 1, 1, 1 },
  31.     },
  32.     fontSize = 12,
  33.     emboss = true,
  34.     onPress = ButtonPress_processEffect,
  35.     labelYOffset = 40
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement