Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- { DESIGN API } Created By: Nettoork#0000
- - Menu
- - Create
- id, text, username, x, y, w, h
- - Remove
- - id, username
- - Button
- - Create
- id, text, reference, username, x, y, w, h, clicked
- - Remove
- - id, username
- { EXAMPLES }
- design.menu:create(1, 'Batata', 'Nettoork#0000', 15, 38, 670, 276)
- design.menu:remove(1, 'Nettoork#0000')
- design.button:create(1, 'Batata', 'id_4', 'Nettoork#0000', 559, 48, 100, 18, false)
- design.button:remove(1, 'Nettoork#0000')
- ]]--
- do
- local idGlobal = 543212345
- design = {
- menu = function()
- local self = {}
- self.create = function(self, ...)
- local arg = {...}
- if arg[6] < 0 or arg[7] and arg[7] < 0 then return end if not arg[7] then arg[7] = arg[6]/2 end -- Protection
- local id = idGlobal+arg[1]*8
- ui.addTextArea(id, '', arg[3], arg[4], arg[5], arg[6]+100, arg[7]+70, 0x78462b, 0x78462b, 1, true)
- ui.addTextArea(id+1, '', arg[3], arg[4], arg[5]+(arg[7]+140)/4, arg[6]+100, arg[7]/2, 0x9d7043, 0x9d7043, 1, true)
- ui.addTextArea(id+2, '', arg[3], arg[4]+(arg[6]+180)/4, arg[5], (arg[6]+10)/2, arg[7]+70, 0x9d7043, 0x9d7043, 1, true)
- ui.addTextArea(id+3, '', arg[3], arg[4], arg[5], 20, 20, 0xbeb17d, 0xbeb17d, 1, true)
- ui.addTextArea(id+4, '', arg[3], arg[4]+arg[6]+80, arg[5], 20, 20, 0xbeb17d, 0xbeb17d, 1, true)
- ui.addTextArea(id+5, '', arg[3], arg[4], arg[5]+arg[7]+50, 20, 20, 0xbeb17d, 0xbeb17d, 1, true)
- ui.addTextArea(id+6, '', arg[3], arg[4]+arg[6]+80, arg[5]+arg[7]+50, 20, 20, 0xbeb17d, 0xbeb17d, 1, true)
- ui.addTextArea(id+7, arg[2], arg[3], arg[4]+3, arg[5]+3, arg[6]+94, arg[7]+64, 0x1c3a3e, 0x232a35, 1, true)
- end
- self.remove = function(self, id, name)
- for i = 0, 7 do
- ui.removeTextArea(idGlobal+id*8+i, name)
- end
- end
- return self
- end,
- button = function()
- local self = {}
- self.create = function(self, ...)
- local arg = {...}
- local id = -idGlobal+arg[1]*3
- local color = arg[9] and '0x2A424B' or '0x314e57'
- ui.addTextArea(id, '', arg[4], arg[5]-1, arg[6]-1, arg[7], arg[8], 0x7a8d93, 0x7a8d93, 1, true)
- ui.addTextArea(id-1, '', arg[4], arg[5]+1, arg[6]+1, arg[7], arg[8], 0x0e1619, 0x0e1619, 1, true)
- ui.addTextArea(id-2, '<p align="center"><a href="event:'..arg[3]..'">'..arg[2]..'</a></p>', arg[4], arg[5], arg[6] , arg[7], arg[8], color, color, 1, true)
- end
- self.remove = function(self, id, name)
- for i = 0, 2 do
- ui.removeTextArea(-idGlobal+id*3-i, name)
- end
- end
- return self
- end
- }
- design.menu = design.menu()
- design.button = design.button()
- end
Add Comment
Please, Sign In to add comment