Advertisement
duaiwe

knob api test program

Feb 15th, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. os.loadAPI("knob")
  2.  
  3. knob.init("left", 1, colors.white, colors.brown)
  4.  
  5. local k = knob.new("test", 5, 25, 5, 10, "1234567890", colors.blue, colors.red)
  6.  
  7. k.onClick = function(self)
  8.     print("clicked: "..self.name)
  9. end
  10.  
  11. k.onActivate = function(self)
  12.     print("activated: "..self.name)
  13. end
  14.  
  15. k.onDeactivate = function(self)
  16.     print("deactivated: "..self.name)
  17. end
  18.  
  19. knob.run(true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement