fork(2) download
  1. if ( CLIENT ) then
  2.  
  3. -- Lua generated by DermaDesigner
  4. function dermatest() -- allows the box to not run on start
  5. print("loading lua box") -- tell the world we are loading
  6.  
  7. DFrame1 = vgui.Create('DFrame')
  8. DFrame1:SetPos(0, 600)
  9. DFrame1:SetSize(235, 216)
  10.  
  11. DFrame1:SetTitle('points:'.. tostring(LocalPlayer():PS_GetPoints())) -- set this so its not blank and this is where the points are
  12. DFrame1:SetSizable(false) -- we dont have scaleing on our objects
  13. DFrame1:SetDeleteOnClose(false) -- you will not be able to delete this anyways
  14. DFrame1:ShowCloseButton(true) -- debug abilty
  15. DFrame1:SetVisible(true) -- need this or it will not work
  16. DFrame1.Paint = function() -- paints the trans of the back panel
  17. draw.RoundedBox( 8, 0, 0, DFrame1:GetWide(), DFrame1:GetTall(), Color( 0, 0, 0, 150 ) )
  18. end
  19.  
  20.  
  21.  
  22. ------------------
  23. fTextEntry5 = vgui.Create('DTextEntry',DFrame1) -- text box create
  24. fTextEntry5:SetPos(8, 33) -- set that pos
  25. fTextEntry5:SetSize(218, 170) -- how big is this
  26. fTextEntry5:SetText('') -- we want this blank
  27. fTextEntry5:AllowInput(false) -- we dont want them to screw with our text
  28. fTextEntry5.OnEnter = function() end -- place holder
  29. -----------------
  30.  
  31. -----------------
  32. minibutton = vgui.Create('DImageButton',DFrame1) --create button to make box smaller
  33. minibutton:SetPos(100, 3)
  34. minibutton:SetSize(20, 20)
  35. minibutton:SetImage("gui/silkicons/add") -- place holder icon
  36. minibutton:SizeToContents()
  37. minibutton.DoClick = function() -- clicker function
  38. DFrame1:SetSize(235,30)
  39. minibutton:SetVisible(false) -- hide it because its small now
  40. immagefact:SetVisible(true) -- show it because we want to be able to make this big once more
  41. end
  42. minibutton.DoRightClick = function() end -- place holder
  43. -------------------
  44. immagefact = vgui.Create('DImageButton',DFrame1) -- create the make big button
  45. immagefact:SetPos(100, 3) -- set that pos
  46. immagefact:SetSize(20, 20) -- that size (roughly the same as the other)
  47. immagefact:SetImage("gui/silkicons/add")
  48. immagefact:SizeToContents() -- idk seems like a great idea
  49. immagefact:SetVisible(false) -- hide this because its big already
  50. immagefact.DoClick = function() -- clicker function
  51. DFrame1:SetSize(235, 216) -- make big
  52. minibutton:SetVisible(true) -- show make small
  53. immagefact:SetVisible(false) -- hide make big
  54. end
  55. immagefact.DoRightClick = function() end
  56.  
  57.  
  58.  
  59. ------------------------
  60. print("done!") -- the derma panel booted and nothing went wrong we should yell this
  61.  
  62. timer.Create("update cash", 5, 0,function() -- update this every so often because we need to
  63. DFrame1:SetTitle('points:'.. tostring(LocalPlayer():PS_GetPoints()))
  64. end)
  65. end
  66. local function mydatacapture (data) -- catch the data the server throws at us
  67. words = data:ReadString()
  68. fTextEntry5:SetText(words) -- show the data
  69. end
  70.  
  71. -- add hooks
  72. usermessage.Hook( "sendpointinfo", mydatacapture )
  73. concommand.Add("dermatest",dermatest)
  74. end
  75.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty