Advertisement
Patosho

Ejemplo colorPicker

Dec 1st, 2015
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. function main()
  2.     ui.addTextArea(0, "<p align='center'><a href='event:color'>Color</a></p>", nil, 10, 32, 120, 16, nil, nil, 1, true)
  3. end
  4.  
  5. function eventTextAreaCallback(id, name, cb)
  6.     if id==0 then
  7.         ui.showColorPicker(0, name, 0xC2C2DA, "Escoge un color para tu nombre")
  8.     end
  9. end
  10.  
  11. function eventColorPicked(id, name, color)
  12.     if id==0 and color~=-1 then
  13.         tfm.exec.setNameColor(name, color)
  14.     end
  15. end
  16.  
  17. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement