Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function InventaireBtn(frame)
- iconInv = vgui.Create("DIconLayout", frame)
- iconInv:Dock(TOP)
- iconInv:DockMargin(-5,ScrH() * 0.08,2,0)
- iconInv:SetSpaceX(0)
- iconInv:SetSpaceY(1)
- btnID = vgui.Create("DButton", iconInv)
- btnID:SetSize(ScrW() * 0.145, ScrH() * 0.06)
- btnID:SetText("Retour")
- btnID:SetTextColor(color_text)
- btnID.Paint = function(s,w,h)
- draw.RoundedBox(0,0,0,w,h,color_subtitle)
- draw.RoundedBox(0,w-1.1,0,2,h,color_text)
- end
- btnID.DoClick = function()
- if IsValid(scrollicon) then
- scrollicon:Remove()
- iconInv:Remove()
- changeMenu(frame)
- end
- end
- btnInv = vgui.Create("DButton", iconInv)
- btnInv:SetSize(ScrW() * 0.85, ScrH() * 0.06)
- btnInv:SetText("Inventaire")
- btnInv:SetTextColor(color_white)
- btnInv.Paint = function(s,w,h)
- draw.RoundedBox(0,0,0,w,h,color_invtbl)
- end
- end
- local function btnID(frame)
- iconID = vgui.Create("DIconLayout", frame)
- iconID:Dock(TOP)
- iconID:DockMargin(-4,ScrH() * 0.08,2,0)
- iconID:SetSpaceX(0)
- iconID:SetSpaceY(1)
- for k,v in pairs(Clothe.clothesTBL) do
- btnID = vgui.Create("DButton", iconID)
- btnID:SetSize(ScrW() * 0.12, ScrH() * 0.06)
- btnID:SetText(k)
- btnID:SetTextColor(color_text)
- btnID.Paint = function(s,w,h)
- draw.RoundedBox(0,0,0,w,h,color_subtitle)
- draw.RoundedBox(0,w-1.1,0,2,h,color_text)
- end
- btnID.DoClick = function()
- id = k
- if IsValid(scrollicon) then
- scrollicon:Remove()
- iconID:Hide()
- changeMenu(frame)
- end
- end
- end
- btnInv = vgui.Create("DButton", iconID)
- btnInv:SetSize(ScrW() * 0.275, ScrH() * 0.06)
- btnInv:SetText("Inventaire")
- btnInv:SetTextColor(color_white)
- btnInv.Paint = function(s,w,h)
- draw.RoundedBox(0,0,0,w,h,color_invtbl)
- end
- btnInv.DoClick = function()
- btnID:Remove()
- if IsValid(scrollicon) then
- scrollicon:Remove()
- iconID:Remove()
- InventaireBtn(frame)
- InvFct(frame)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement