Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.98 KB | None | 0 0
  1. local function InventaireBtn(frame)
  2.  
  3.     iconInv = vgui.Create("DIconLayout", frame)
  4.     iconInv:Dock(TOP)
  5.     iconInv:DockMargin(-5,ScrH() * 0.08,2,0)   
  6.     iconInv:SetSpaceX(0)
  7.     iconInv:SetSpaceY(1)
  8.  
  9.         btnID = vgui.Create("DButton", iconInv)
  10.         btnID:SetSize(ScrW() * 0.145, ScrH() * 0.06)
  11.         btnID:SetText("Retour")
  12.         btnID:SetTextColor(color_text)
  13.         btnID.Paint = function(s,w,h)
  14.             draw.RoundedBox(0,0,0,w,h,color_subtitle)
  15.             draw.RoundedBox(0,w-1.1,0,2,h,color_text)
  16.  
  17.         end
  18.         btnID.DoClick = function() 
  19.           if IsValid(scrollicon) then
  20.             scrollicon:Remove()
  21.             iconInv:Remove()
  22.             changeMenu(frame)
  23.           end
  24.         end
  25.  
  26.         btnInv = vgui.Create("DButton", iconInv)
  27.         btnInv:SetSize(ScrW() * 0.85, ScrH() * 0.06)
  28.         btnInv:SetText("Inventaire")
  29.         btnInv:SetTextColor(color_white)
  30.         btnInv.Paint = function(s,w,h)
  31.             draw.RoundedBox(0,0,0,w,h,color_invtbl)
  32.  
  33.         end
  34.  
  35. end
  36.  
  37. local function btnID(frame)
  38.  
  39.     iconID = vgui.Create("DIconLayout", frame)
  40.     iconID:Dock(TOP)
  41.     iconID:DockMargin(-4,ScrH() * 0.08,2,0)
  42.     iconID:SetSpaceX(0)
  43.     iconID:SetSpaceY(1)
  44.  
  45.     for k,v in pairs(Clothe.clothesTBL) do
  46.  
  47.         btnID = vgui.Create("DButton", iconID)
  48.         btnID:SetSize(ScrW() * 0.12, ScrH() * 0.06)
  49.         btnID:SetText(k)
  50.         btnID:SetTextColor(color_text)
  51.         btnID.Paint = function(s,w,h)
  52.             draw.RoundedBox(0,0,0,w,h,color_subtitle)
  53.             draw.RoundedBox(0,w-1.1,0,2,h,color_text)
  54.  
  55.         end
  56.         btnID.DoClick = function() 
  57.             id = k
  58.           if IsValid(scrollicon) then
  59.             scrollicon:Remove()
  60.             iconID:Hide()
  61.             changeMenu(frame)
  62.           end
  63.         end
  64.  
  65.     end  
  66.  
  67.         btnInv = vgui.Create("DButton", iconID)
  68.         btnInv:SetSize(ScrW() * 0.275, ScrH() * 0.06)
  69.         btnInv:SetText("Inventaire")
  70.         btnInv:SetTextColor(color_white)
  71.         btnInv.Paint = function(s,w,h)
  72.             draw.RoundedBox(0,0,0,w,h,color_invtbl)
  73.  
  74.         end
  75.         btnInv.DoClick = function()
  76.           btnID:Remove()
  77.           if IsValid(scrollicon) then
  78.             scrollicon:Remove()
  79.             iconID:Remove()
  80.             InventaireBtn(frame)
  81.             InvFct(frame)
  82.           end
  83.  
  84.         end
  85.  
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement