Public feed
#598852
function EasyVGUI(class,name,xpos,ypos,length,height,parent,txt)
if parent == nil then
ClassPanel = vgui.Create( class )
else
ClassPanel = vgui.Create( class, parent )
end
ClassPanel:SetName( name )
ClassPanel:SetZPos(290)
ClassPanel:SetSize(length,height)
ClassPanel:SetKeyBoardInputEnabled( true )
ClassPanel:SetMouseInputEnabled( true )
ClassPanel:SetPos( xpos, ypos )
ClassPanel:SetVisible( true )
if text != nil then
ClassPanel.Text = text
end
ClassPanel:LoadControlsFromString( [["resource/ui/vgui_inv.res"
{
"]]..name..[["
{
"sizable" "0"
}
]] )
return ClassPanel
end
function Inventory_VGUI()
local base = EasyVGUI("Frame_Border","base panel",500,500,400,200)
EasyVGUI("Button_Border","test button",5,30,40,20,base,"Test.")
end
concommand.Add("ws_inv",Inventory_VGUI)