0 Members and 1 Guest are viewing this topic.
-- Lua generated by DermaDesignerfunction dermatest() -- allows the box to not run on start print("loading lua box") -- tell the world we are loading DFrame1 = vgui.Create('DFrame') DFrame1:SetPos(0, 600) DFrame1:SetSize(235, 216) DFrame1:SetTitle('points:'.. tostring(LocalPlayer():PS_GetPoints())) -- set this so its not blank and this is where the points are DFrame1:SetSizable(false) -- we dont have scaleing on our objects DFrame1:SetDeleteOnClose(false) -- you will not be able to delete this anyways DFrame1:ShowCloseButton(true) -- debug abilty DFrame1:SetVisible(true) -- need this or it will not work DFrame1.Paint = function() -- paints the trans of the back panel draw.RoundedBox( 8, 0, 0, DFrame1:GetWide(), DFrame1:GetTall(), Color( 0, 0, 0, 150 ) ) end ------------------ fTextEntry5 = vgui.Create('DTextEntry',DFrame1) -- text box create fTextEntry5:SetPos(8, 33) -- set that pos fTextEntry5:SetSize(218, 170) -- how big is this fTextEntry5:SetText('') -- we want this blank fTextEntry5:AllowInput(false) -- we dont want them to screw with our text fTextEntry5.OnEnter = function() end -- place holder ----------------- ----------------- minibutton = vgui.Create('DImageButton',DFrame1) --create button to make box smaller minibutton:SetPos(100, 3) minibutton:SetSize(20, 20) minibutton:SetImage("gui/silkicons/add") -- place holder icon minibutton:SizeToContents() minibutton.DoClick = function() -- clicker function DFrame1:SetSize(235,30) minibutton:SetVisible(false) -- hide it because its small now immagefact:SetVisible(true) -- show it because we want to be able to make this big once more end minibutton.DoRightClick = function() end -- place holder ------------------- immagefact = vgui.Create('DImageButton',DFrame1) -- create the make big button immagefact:SetPos(100, 3) -- set that pos immagefact:SetSize(20, 20) -- that size (roughly the same as the other) immagefact:SetImage("gui/silkicons/add") immagefact:SizeToContents() -- idk seems like a great idea immagefact:SetVisible(false) -- hide this because its big already immagefact.DoClick = function() -- clicker function DFrame1:SetSize(235, 216) -- make big minibutton:SetVisible(true) -- show make small immagefact:SetVisible(false) -- hide make big end immagefact.DoRightClick = function() end ------------------------ print("done!") -- the derma panel booted and nothing went wrong we should yell this timer.Create("update cash", 5, 0,function() -- update this every so often because we need to DFrame1:SetTitle('points:'.. tostring(LocalPlayer():PS_GetPoints())) end)endlocal function mydatacapture (data) -- catch the data the server throws at us words = data:ReadString() fTextEntry5:SetText(words) -- show the dataend-- add hooksusermessage.Hook( "sendpointinfo", mydatacapture )concommand.Add("dermatest",dermatest)