Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local donations = {
- {
- name = "V.I.P Rank"
- }
- }
- local dpanel = vgui.Create( "DPanel" )
- dpanel:SetPos( 0, 0 )
- dpanel:SetSize( 100, 100 )
- local dpanelscroll = vgui.Create( "DScrollPanel", dpanel )
- dpanelscroll:SetPos( 0, 0 )
- dpanelscroll:SetSize( dpanel:GetWide(), dpanel:GetTall() )
- for k, v in pairs( donations ) do
- local button = vgui.Create( "DButton", dpanelscroll )
- button:SetPos( 0, 55 * (k-1) )
- button:SetSize( dpanelscroll:GetWide(), 50 )
- button.Paint = function(s,w,h)
- draw.DrawText( donations[k].name, "Font", 5, h / 2 - 2, Color( 255, 255, 255 ), TEXT_ALIGN_CENTER )
- end
- button.DoClick = function()
- if donations[k].name == "V.I.P Rank" then
- if IsValid(info) then
- info:Remove()
- end
- local info = vgui.Create( "DPanel" )
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement