Hachem16

Simple Color Picker

Oct 29th, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. ui.addTextArea(1,"<a href='event:colour'><font size='30' color='#FF00F0'>Ø</font></a>",nil, 50, 50, nil, nil, nil, nil, 0, true)
  2.  
  3. function eventTextAreaCallback(id, name, cb)
  4.     if id == 1 and cb == "colour" then
  5.         ui.showColorPicker(1, name, 0xF1A41B, "Chose you're name's color!")
  6.     end
  7. end
  8.  
  9. function eventColorPicked( id, name, color)
  10.     tfm.exec.setNameColor(name, color)
  11. end
Advertisement
Add Comment
Please, Sign In to add comment