Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 26/09/2015
- --Last update: 26/12/2016
- --[[ Notes:
- Does:
- Adiciona uma textarea personalizada.
- Args:
- id --> Id da textarea
- player --> O jogador que verá a ui (pode ser nil)
- title --> Título da ui
- text --> Texto da ui
- x --> Posição horizontal da ui
- y --> Posição vertical da ui
- w --> Largura da ui
- h --> Altura da ui
- alpha --> Opacidade
- closeButton --> Caso true, terá um botão de fechar
- border --> Caso true, terá borda
- fixed --> Caso true, será livre pelo scroll, caso contrário, será fixo
- u --> Se for true, haverá sublinhado manual no título
- ]]--
- ui.smart = function(id,player,title,text,x,y,w,h,alpha,closeButton,border,fixed,u)
- id = id or 0
- alpha,text = alpha or 1,text or ""
- title = title~='' and ("<p align='center'><font size='15' face='verdana' ><V><B>"..title:upper().."</B></p></font>"..(u and "<R>"..("_"):rep(w/6/2) or "").."<p align='left'><font size='12' /><N>\n"..(u and "\n" or "")) or ("<p align='center'><font size='2'>\n</font>")
- x,y,w,h = x or 10,y or 15,w or 100,h or 100
- if border then
- ui.addTextArea(id + 0,"",player,x-2,y+18,w+24,h+14,0x1B252E,0x1B252E,alpha,fixed)
- ui.addTextArea(id + 1,"",player,x-1,y+19,w+22,h+12,0x1F6381,0x1F6381,alpha,fixed)
- ui.addTextArea(id + 2,"",player,x+2,y+22,w+16,h+6,0x111517,0x111517,alpha,fixed)
- end
- ui.addTextArea(id + 3,"",player,x+3,y+23,w+14,h+4,0x0C191C,0x0C191C,alpha,fixed)
- ui.addTextArea(id + 4,"",player,x+4,y+24,w+12,h+2,0x24474D,0x24474D,alpha,fixed)
- ui.addTextArea(id + 5,"",player,x+5,y+25,w+10,h,0x183337,0x183337,alpha,fixed)
- ui.addTextArea(id + 6,title..text,player,x+6,y+26,w+8,h-2,0x122528,0x122528,alpha,fixed)
- if closeButton then
- ui.addTextArea(id + 7,"",player,x+15,y+h+5,w-10,15,0x5D7D90,0x5D7D90,alpha,fixed)
- ui.addTextArea(id + 8,"",player,x+15,y+h+7,w-10,15,0x11171C,0x11171C,alpha,fixed)
- ui.addTextArea(id + 9,"<p align='center'><a href='event:closeUiSmart'><N>Close</a>",player,x+15,y+h+6,w-10,15,0x3C5064,0x3C5064,alpha,fixed)
- end
- end
- eventTextAreaCallback=function(id,name,callback)
- if callback == "closeUiSmart" then
- for i = id,id-9,-1 do
- ui.removeTextArea(i,name)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement