Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. local PANEL = { }
  2.  
  3. function PANEL:Init( )
  4. self:AddCategory( "Props", "application_view_detail.vmf", "PropPanel", list.Get( LIST_PROPS ) )
  5. self:AddCategory( "Weapons", "bomb.vtf", "WeaponPanel", list.Get( LIST_WEAPONS ) )
  6. self:AddCategory( "Powerups", "star.vtf", "PowerupPanel", list.Get( LIST_POWERUPS ) )
  7. self:AddCategiry( "Player Model", "star.vtf", "PlayerPanel", list.Get( LIST_PlAYER ) )
  8. end
  9.  
  10. function PANEL:AddCategory( name, icon, class, contents )
  11.  
  12. icon = "gui/silkicons/"..icon
  13. local category = vgui.Create( class, self )
  14.  
  15. for k, v in ipairs( contents ) do
  16. category:AddModel( v )
  17. end
  18.  
  19. self:AddSheet( name, category, icon )
  20.  
  21. end
  22. vgui.Register( "BuyMenu", PANEL, "DPropertySheet" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement