Created
September 12, 2016 18:41
-
-
Save Patosito/e265c87d59264cd0cdb77819be0981ca to your computer and use it in GitHub Desktop.
Ejemplo colorPicker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() | |
ui.addTextArea(0, "<p align='center'><a href='event:color'>Color</a></p>", nil, 10, 32, 120, 16, nil, nil, 1, true) | |
end | |
function eventTextAreaCallback(id, name, cb) | |
if id==0 then | |
ui.showColorPicker(0, name, 0xC2C2DA, "Escoge un color para tu nombre") | |
end | |
end | |
function eventColorPicked(id, name, color) | |
if id==0 and color~=-1 then | |
tfm.exec.setNameColor(name, color) | |
end | |
end | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment