some vgui help

Hi there, I was wondering if anybody could tell me how to do some things.

Firstly, I was wondering how I could make model and trail icons like on _Undefineds point shop (picture below)

http://puu.sh/1AAxv

[lua]
local pos = 70
local mat = Material(“materials/logo.png”)
catbutton = {“Shop Tutorial”, “Hats and Masks”, “Models”, “Trails”, “Weapons”, “Classes”, “Weapon Customization”, “Loadouts”, “Inventory and Trading”, “Exit”}

local SHEET = vgui.Create( “DPropertySheet” )
SHEET:SetSize(780, 650)
SHEET:Center()
SHEET.Paint = function()
draw.RoundedBox( 0, 0, 0, SHEET:GetWide(), SHEET:GetTall(), Color(50, 50, 50, 255))
end
SHEET:SetMouseInputEnabled(true)
SHEET:MakePopup( )

local ITEMS = vgui.Create( “DPanel”, SHEET )
ITEMS:SetSize( SHEET:GetWide() - 220, SHEET:GetTall() - 140 )
ITEMS:SetPos(20,120)
ITEMS.Paint = function() – Paint function
surface.SetDrawColor( 30, 30, 30, 255 ) – Set our rect color below us; we do this so you can see items added to this panel
surface.DrawRect( 0, 0, ITEMS:GetWide(), ITEMS:GetTall() ) – Draw the rect
end

local LOGO = vgui.Create( “DPanel”, SHEET )
LOGO:SetSize( 525, 110 )
LOGO:SetPos((SHEET:GetWide() / 2) - (LOGO:GetWide() / 2), 5)
LOGO.Paint = function() – Paint function
surface.SetMaterial(mat)
surface.SetDrawColor( 50, 50, 90, 255 ) – Set our rect color below us; we do this so you can see items added to this panel
surface.DrawRect( 0, 0, LOGO:GetWide(), LOGO:GetTall() ) – Draw the rect
end
LOGO.DoClick = function()
SHEET:SetVisible(false)
end

ITEMS.Refresh = function()
for k, v in SortedPairs(catbutton) do
pos = pos + 50

local btn = vgui.Create( “DButton”, SHEET )
btn:SetSize( 180, 40 )
btn:SetPos(590, pos)
btn:SetText(v)
btn.Paint = function() – Paint function
surface.SetDrawColor( 30, 30, 30, 255 ) – Set our rect color below us; we do this so you can see items added to this panel
surface.DrawRect( 0, 0, btn:GetWide(), btn:GetTall() ) – Draw the rect
end
btn.DoClick = function()
SHEET:SetVisible(false)
end
end
end
ITEMS:Refresh()
[/lua]

I was also wondering how I would go about actually making my logo work. At the moment it doesn’t load the picture I’ve given it. I think it’s a problem with my resource.AddFile(). Does that go in a shared file, a serverside file, or a clientside file?

For models, you could use DModelPanel, or create your own derma element using DModelPanel as a base.
For trails, you can just use DPanel, and in the paint hook paint a rectangle with the trail texture.

resource library is serverside.

Okay, thanks for the info.

Any chance you give me an example of how I could do the DModelPanel thing in a list? I’m kinda confused.

Dock the modelpanel to a DPanelList.

Why not just look at the code for PointShop?