Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.79 KB | None | 0 0
  1. concommand.Add( "initialisation", function( ply, cmd, args )
  2.  
  3. for i=1,100 do
  4. surface.CreateFont( "ALRPFont"..i, {
  5.   font = "Walkway SemiBold",
  6.   size = ScreenScale( i ),
  7.   weight = 500,
  8.   antialias = true,
  9. } )
  10. end
  11.  
  12. local blur = Material 'pp/blurscreen'
  13.  
  14. function drawPanelBlur( panel, layers, density, alpha )
  15.  
  16.   local ply = LocalPlayer()
  17.  
  18.   local density = 12
  19.   local x, y = panel:LocalToScreen( 0, 0 )
  20.   surface.SetDrawColor( 255, 255, 255, alpha )
  21.   surface.SetMaterial( blur )
  22.  
  23.   for i = 1, 3 do
  24.  
  25.   blur:SetFloat( "$blur", ( i / layers ) * density )
  26.   blur:Recompute()
  27.   render.UpdateScreenEffectTexture()
  28.   surface.DrawTexturedRect( -x, -y, ScrW(), ScrH() )
  29.  
  30.   end
  31.  
  32. end
  33.  
  34.   local InitialisationFrame = vgui.Create( "DFrame" )
  35.   InitialisationFrame:SetSize( ScrW(), ScrH() )
  36.   InitialisationFrame:Center()
  37.   InitialisationFrame:SetTitle( "" )
  38.   InitialisationFrame:MakePopup()
  39.   InitialisationFrame:SetDraggable( false )
  40.   InitialisationFrame:ShowCloseButton( true )
  41.   InitialisationFrame.Paint = function( self, w, h )
  42.     drawPanelBlur(self, 5, 12, 255)
  43.     draw.RoundedBox( 0, 0, 0, w, h, Color( 0, 0, 0, 100 ) )
  44.   end
  45.  
  46.   local BouttonConnexion = vgui.Create( "DButton", InitialisationFrame )
  47.   BouttonConnexion:SetText( "" )
  48.   BouttonConnexion:SetTextColor( Color( 255, 255, 255 ) )
  49.   BouttonConnexion:SetPos( ScrW() * 0.2  , ScrH() * 0.2 )
  50.   BouttonConnexion:SetSize( ScrW() * 0.122, ScrH() * 0.100 )
  51.   BouttonConnexion.Paint = function( self, w, h )
  52.     draw.RoundedBox( 0, 0, 0, w, h, Color( 34, 153, 84, 230 ) )
  53.     draw.DrawText( "REJOINDRE LE SERVEUR", "ALRPFont10", ScrW() * 0.06, ScrH() * 0.035,  Color(255, 255, 255), 1, 1 )
  54.   end
  55.   BouttonConnexion.DoClick = function()
  56.     InitialisationFrame:Remove()
  57.     LocalPlayer():ConCommand('job')
  58.   end
  59. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement