Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- surface.DrawTexturedRect( 100, 61, 16, 16 )
- draw.SimpleText( data.name, "bleur_menu16", 120, 9, Color( 255, 255, 255, 200 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
- draw.SimpleText( "$" .. self.price, "bleur_menu16", 120, 35, Color( 255, 255, 255, 200 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
- draw.SimpleText( data.category, "bleur_menu16", 120, 61, Color( 255, 255, 255, 200 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP )
- end
- function ent:OnCursorEntered()
- self:SetCursor( "hand" )
- end
- function ent:OnCursorExited()
- self:SetCursor( "arrow" )
- end
- function ent:OnMousePressed()
- RunConsoleCommand( "say", "/" .. data.cmd )
- end
- local model = vgui.Create( "DModelPanel", ent )
- model:SetSize( 90, 90 )
- model:SetPos( 5, 5 )
- model:SetModel( data.model )
- local mn, mx = model.Entity:GetRenderBounds()
- local size = 0
- size = math.max( size, math.abs(mn.x) + math.abs(mx.x) )
- size = math.max( size, math.abs(mn.y) + math.abs(mx.y) )
- size = math.max( size, math.abs(mn.z) + math.abs(mx.z) )
- model:SetFOV( 50 )
- model:SetCamPos( Vector( size, size, size ) )
- model:SetLookAt( ( mn + mx ) * 0.5 )
- function model:LayoutEntity()
- return false
- end
- end
- end }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement