Advertisement
ExtReMLapin

Untitled

Nov 24th, 2014
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.70 KB | None | 0 0
  1. --local DEMO = {}
  2. --DEMO.Title = "Windowstruct"
  3. --DEMO.Author = "Lapin"
  4.  
  5. local function MakeCirclePoly( _x, _y, _r, _points ) -- thx acecool // _if you fucking _dmca me im going to fucking _eat your family
  6.     local _u = ( _x + _r * 1 ) - _x;
  7.     local _v = ( _y + _r * 1 ) - _y;
  8.     local _slices = ( 2 * math.pi ) / _points;
  9.     local _poly = { };
  10.     for i = 0, _points - 1 do local _angle = ( _slices * i ) % _points;
  11.         local x = _x + _r * math.cos( _angle );
  12.         local y = _y + _r * math.sin( _angle );
  13.     table.insert( _poly, { x = x, y = y, u = _u, v = _v } ) end return _poly;
  14. end
  15.  
  16. local circle1 = MakeCirclePoly(443, 263, 10, 100)
  17. local circle2 = MakeCirclePoly(443, 263, 8.9, 100)
  18.  
  19. local thecross1 = -- i hate vectors
  20. {
  21.     { x = 732, y = 57 },
  22.     { x = 734, y = 57 },
  23.     { x = 742, y = 64 },
  24.     { x = 740, y = 64 }
  25.  
  26. }
  27.  
  28. local thecross2 = -- i still hate vectors (i n gmod)
  29. {
  30.     { x = 740, y = 57 },
  31.     { x = 742, y = 57 },
  32.     { x = 734, y = 64 },
  33.     { x = 732, y = 64 }
  34.  
  35. }
  36.  
  37. -- i tried
  38. local arrow =
  39. {
  40.     { x = 438, y = 264 },
  41.     { x = 438, y = 259 },
  42. --  { x = 342, y = 273 }, -- mid up -- fuck gmod poly system
  43.     { x = 448, y = 259 },
  44.     { x = 448   , y = 264 },
  45.     { x = 443, y = 269 }, -- mid down
  46. }
  47.  
  48. local arrow2 =  -- lets eat a part of the arrow
  49. {
  50.     { x = 437, y = 258 },
  51.     { x = 449, y = 258 },
  52.     { x = 443, y = 263.5 }, -- I FUCKIING HATE VECTORS
  53. }
  54.  
  55. surface.CreateFont( "WindowsPopUpTitle", {
  56.     font = "Segoe UI",
  57.     size = 24,
  58. } )
  59.  
  60. surface.CreateFont( "WindowsPopUpTitle2", {
  61.     font = "Segoe UI",
  62.     size = 20,
  63. } )
  64.  
  65. local function WindowsLoadingBar(xpos, ypos, x, y, speed, color1, color2, colorg1, colorg2, colorg3, colorg4, colorg5 )-- yess
  66.     local pos1 = xpos+x*math.tan(SysTime()*speed)
  67.     local bordermax =  math.Max(0, (pos1+x/5)-(xpos+x))
  68.     local bordermin =  math.Max(0, (xpos+x/5)-(pos1))
  69.        
  70.     surface.SetDrawColor(color1) -- Background
  71.     surface.DrawRect(xpos, ypos, x, y)
  72.    
  73.     surface.SetDrawColor(color2)
  74.     if (pos1+x/5 > xpos) and (pos1 < xpos+x) and pos1 > xpos then -- Last is a quick fix for 3d rendering
  75.         surface.SetDrawColor(color2)
  76.         surface.DrawRect(pos1, ypos,( (x/5)- bordermax - bordermin ), y*(8/13))
  77.        
  78.         surface.SetDrawColor(colorg1)
  79.         surface.DrawRect(pos1, ypos +  y*(8/13),( (x/5)- bordermax - bordermin ), y*(1/13))
  80.            
  81.         surface.SetDrawColor(colorg2)
  82.         surface.DrawRect(pos1, ypos +  y*(9/13),( (x/5)- bordermax - bordermin ), y*(1/13))
  83.            
  84.         surface.SetDrawColor(colorg3)
  85.         surface.DrawRect(pos1, ypos +  y*(10/13),( (x/5)- bordermax - bordermin ), y*(1/13))
  86.            
  87.         surface.SetDrawColor(colorg4)
  88.         surface.DrawRect(pos1, ypos +  y*(11/13),( (x/5)- bordermax - bordermin ), y*(1/13))
  89.            
  90.         surface.SetDrawColor(colorg5)
  91.         surface.DrawRect(pos1, ypos+y*(12/13),( (x/5)- bordermax - bordermin ), y*(1/13))
  92.     end
  93. end
  94.  
  95. hook.Add("HUDPaint", "WindowsStruct", function()
  96.  
  97.  
  98.     surface.SetDrawColor(Color(64, 134, 195, 250)) -- Background outline
  99.     surface.DrawRect(399, 49, 370, 250)
  100.    
  101.     surface.SetDrawColor(Color(84, 175, 255)) -- Background
  102.     surface.DrawRect(400, 50, 368, 248)
  103.  
  104.     draw.SimpleText("Metastruct OS Error", "WindowsPopUpTitle", 560, 62 , Color(0,0,0,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  105.  
  106.     surface.SetDrawColor(Color(64, 134, 195, 250)) -- Background grey for outline
  107.     surface.DrawRect(408, 81, 352, 210)
  108.  
  109.     surface.SetDrawColor(Color(255, 255, 255)) -- Main message background
  110.     surface.DrawRect(409, 82, 350, 208)
  111.  
  112.     surface.SetDrawColor(Color(200, 80, 80)) -- exit button
  113.     surface.DrawRect(714, 50, 45, 20)
  114.  
  115.     surface.SetDrawColor(Color(62, 107, 147)) -- BIGGGGER SCREEN PLS
  116.     surface.DrawRect(696, 55, 10, 8)
  117.    
  118.     surface.SetDrawColor(Color(84, 175, 225)) -- clear the interior this time
  119.     surface.DrawRect(697, 57, 8, 5)
  120.    
  121.     surface.SetDrawColor(Color(40, 40, 40)) -- reduce it pls
  122.     surface.DrawRect(670, 61, 8, 2)
  123.  
  124.     surface.SetDrawColor(Color(150, 150, 150, 225)) -- exit button background
  125.     surface.DrawRect(434, 209, 302, 17) -- loading bar outline
  126.  
  127.     surface.SetDrawColor(Color(227, 227, 227)) -- SEP BAR
  128.     surface.DrawRect(409, 240, 350, 1)
  129.  
  130.     --surface.SetTexture(surface.GetTextureID("msa/msa_logo_1_unlitgeneric_2")) -- msa logo
  131.     --surface.DrawTexturedRect(420, 90, 100, 100)
  132.  
  133.     --draw.SimpleText("Ding dong", "WindowsPopUpTitle2", 640, 110 , Color(60,50,50,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) -- Text
  134.     --draw.SimpleText("Bannu", "WindowsPopUpTitle2", 700, 110 , Color(60,50,50,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  135.     --draw.SimpleText("pls no", "WindowsPopUpTitle2", 660, 150 , Color(60,50,50,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  136.     --draw.SimpleText("Shit :<", "WindowsPopUpTitle2", 600, 180 , Color(60,50,50,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  137.     --draw.SimpleText("fukin admn", "WindowsPopUpTitle2", 690, 170 , Color(60,50,50,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  138.     --draw.SimpleText("no pls no ban", "WindowsPopUpTitle2", 570, 130 , Color(60,50,50,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  139.     --draw.SimpleText("More details", "WindowsPopUpTitle2", 500, 262 , Color(60,50,50,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  140.  
  141.     surface.SetDrawColor(84, 175, 225)
  142.     draw.NoTexture()
  143.     surface.DrawPoly( circle1 )
  144.    
  145.     surface.SetDrawColor( 255, 255, 255, 255 )
  146.     draw.NoTexture()
  147.     surface.DrawPoly( circle2 )
  148.    
  149.     surface.SetDrawColor( 255, 255, 255, 255 )
  150.     draw.NoTexture()
  151.     surface.DrawPoly( thecross1 )
  152.    
  153.     surface.SetDrawColor( 0, 0, 0, 255)
  154.     draw.NoTexture()
  155.     surface.DrawPoly( arrow )
  156.    
  157.     surface.SetDrawColor( 255,255,255)
  158.     draw.NoTexture()
  159.     surface.DrawPoly( arrow2 )
  160.    
  161.     surface.SetDrawColor( 255, 255, 255, 255 )
  162.     draw.NoTexture()
  163.     surface.DrawPoly( thecross2 )
  164.     WindowsLoadingBar(435, 210, 300, 15, 1.2, Color(230, 230, 230), Color(6, 176, 37), Color(16, 179, 46), Color(40, 187, 6), Color(62,194,86), Color(69,196,96), Color(77,199,99)) -- wow
  165.  
  166. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement