Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- eventTextAreaCallback = function(i,n,c)
- local p = string.split(c,"[^%.]+")
- -- Keyboard
- if p[1] == "keyboard" then
- if p[2] == "name" then
- if p[3] == "submit" then
- -- envia e fecha
- mode.universe.uicloseSplash(n)
- else
- if p[3] == "backspace" then
- -- apaga a ultima index da tabela do nome (nome é uma tabela pra ser mais facil de manusear dps)
- table.remove(mode.universe.info[n].settings.name)
- elseif p[3] == "clear" then
- -- reseta o nome
- mode.universe.info[n].settings.name = {}
- elseif p[3] == "insert" then
- -- poe a letra
- if #mode.universe.info[n].settings.name < 16 then
- mode.universe.info[n].settings.name[#mode.universe.info[n].settings.name + 1] = string.char(p[4])
- end
- end
- -- atualiza a textarea com a tabela name (usa o table.concat)
- mode.universe.uikeyboard(p[2],mode.universe.info[n].settings.name,n)
- end
- end
- return
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement